Re: struts 1.x, how to create packge and jar file ...?

2009-07-27 Thread Lukasz Lenart
2009/7/27 john lee :
> how can i generate 1 single .jar? and put into which folder, then i can 
> delete those many *.class files, and delete folder packageX as well?

Why do you want do that?


Regards
-- 
Lukasz
http://www.lenart.org.pl/
http://dailylog.lenart.org.pl/

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



Re: Cleaner way to create this page?

2009-07-27 Thread Paweł Wielgus
Hi,
or use logic:equals, and as David stated put
RoutingEnginePropertiesMgr.getInstance() in form,
there is no client side in struts, page is rendered to html on the
server side and travels from server to client as pure html.

Best greetings,
Paweł Wielgus.

2009/7/27 Musachy Barroso :
> add RoutingEnginePropertiesMgr.getInstance() to the request attributes
> map, and use jstl or struts tags in the jsp:
>
> 
> ...
> 
>
> Dare to stay away from scriptlets ;)
>
> musachy
>
> On Mon, Jul 27, 2009 at 9:35 AM, laredotornado wrote:
>>
>> A couple of things ...
>>
>> 1. Struts tag libraries wouldn't apply here, right?  I'm trying to do some
>> conditional if logic and I don't see which of the Struts libraries would
>> fit.  I'm using Struts 1.3.
>>
>> 2. You mention to put this, "<%= rePropMgr.getCaptchaPublicKey() %>" in the
>> ActionForm, but I need this output to the client side because the script src
>> requires that information.  Knowing that, any other advice there?
>>
>> Thanks , - Dave
>>
>>
>>
>> Kawczynski, David wrote:
>>>
>>> Write a taglib or put a getCaptchaPublicKey() method in the
>>> ActionForm, and use struts taglibs.
>>>
 -Original Message-
 From: laredotornado [mailto:laredotorn...@gmail.com]
 Sent: Monday, July 27, 2009 11:51 AM
 To: user@struts.apache.org
 Subject: Cleaner way to create this page?


 Hi,

 I'm using Struts 1.3.  I have this in my JSP page ...

 <%
      final RoutingEnginePropertiesMgr rePropMgr =
 RoutingEnginePropertiesMgr.getInstance();
      if (rePropMgr.isUseCaptcha()) {
 %>
              >>> src="https://api-secure.recaptcha.net/challenge?k=<%=
 rePropMgr.getCaptchaPublicKey() %>">
 <%
      }   // if
 %>

 Is there a cleaner way to write this that avoids using scriptlets?

 Thanks for any advice, - Dave
 --
 View this message in context:
 http://www.nabble.com/Cleaner-way-to-create-this-page--tp24683
>>> 147p24683147.html
 Sent from the Struts - User mailing list archive at Nabble.com.


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


>>> Notice:  This e-mail message, together with any attachments, contains
>>> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
>>> New Jersey, USA 08889), and/or its affiliates (which may be known
>>> outside the United States as Merck Frosst, Merck Sharp & Dohme or
>>> MSD and in Japan, as Banyu - direct contact information for affiliates is
>>> available at http://www.merck.com/contact/contacts.html) that may be
>>> confidential, proprietary copyrighted and/or legally privileged. It is
>>> intended solely for the use of the individual or entity named on this
>>> message. If you are not the intended recipient, and have received this
>>> message in error, please notify us immediately by reply e-mail and
>>> then delete it from your system.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context: 
>> http://www.nabble.com/Cleaner-way-to-create-this-page--tp24683147p24683970.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

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



Re: Struts2 portlet bug found

2009-07-27 Thread Tracy12

For some reason whole application looks very slow,
I might choose the other approach where do jsp code changes to access raw
Portlet Session.

Doest this mean I have to use  
> Hi Nils-H,
> 
> Thanks for the reply, unfortunately in production we got lot of
> functionalities written with #session.studentId  etc, in the jsps to
> access PORTLET APPLICATION SCOPE variables.
> 
> Those references are not only  but
>  
> As suggested by you if we want to fix this we need to use the portlet tag
> library and introduce bit of scripting to access the raw portlet session.
> This involves bit of coding, also not sure how to code  test="#session  might have to introduce jstl if etc...
> 
> 
> Without doing that way, I though why not introduce a interceptor that will
> put all the portlet application scope variables to the portlet session
> scope. This way, there would not be any jsp code change. I tried this
> approach and worked beautifully, basically introduce a interceptor ref
> my-sessionScopeHandler to the bottom of the following stack.
> 
> But certainly for new developments I agree with what you stated
> 
> 
> 
>  class="org.apache.struts2.portlet.interceptor.PortletPreferencesInterceptor"/>
>  class="my.SessionApplicationScopeHandleInterceptor" />
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> What is your opinion regarding this, practically I prefer this option,
> 
> Pls let me know your thoughts in terms of issues which can pop up by doing
> this.
> 
> Thanks
> 
> 
> 
> 
> Nils-Helge Garli wrote:
>> 
>> Ah, sorry, I think I misunderstood
>> 
>> As they say in the uPortal forum, this is probably due to the older
>> version of uPortal returning all session attributes regardless of
>> scope. When this was fixed, you need to specify the correct scope to
>> retrieve application scoped attributes, but they are still in the
>> session. The "application" object is for attributes in the
>> PortletContext (or ServletContext if it's a servlet). Since the
>> session is represented as a Map object in Struts 2, there is no
>> support for "scope" (just simple "get" and "put" operations). To
>> retrieve the application scoped session attribute, you need to do as I
>> suggested in the previous reply, get the raw session and access it
>> directly.
>> 
>> Nils-H
>> 
>> On Wed, Jul 22, 2009 at 8:50 AM, Nils-Helge Garli
>> Hegvik wrote:
>>> Does it work if you access the session "raw" (get the session and do
>>> session.getAttribute("studentId", PortletSession.APPLICATION_SCOPE)?
>>> Have you tried deploying to a different portlet container such as
>>> jboss portal or just plain pluto? I assume that the resources you're
>>> sharing session between are in the same war file? Unless you're
>>> calling "clear()" on the session map, Struts 2 doesn't do anything to
>>> the session, so it should not just disappear like that. Considering
>>> you're using the same Struts 2 version in both deployments, I'm not
>>> sure what could be wrong...
>>>
>>> Nils-H
>>>
>>> On Wed, Jul 22, 2009 at 3:48 AM, Tracy12 wrote:

 Hi,

 We got a  struts 2.0.6 portlet application with uPortal  2.5.3 ( inside
 Pluto 1.0.x) with no issues and running fine.

 Now we deployed the same struts 2.0.6 application in uPortal 3.1.1
 (inside
 pluto 1.1.7) and found following issue.

 in our action classes we had the following,  where session is of type
 PortletSession.

 session.setAttribute("studentId","111",PortletSession.APPLICATION_SCOPE)

 We trieved the above studentId in the jsp as follows.
 

 The above worked with no issues in uPortal 2.5.3 but with uPortal 3.1.1
 this
 is not working,
 Then I tried the following
  but didnt work,


 I  interacted with the uPortal forum and this is what it
 tells...http://www.nabble.com/Re%3A-is-this-a-bug-in-struts2-portlets-td24581733.html

 I thought based on that 
 should
 work,

 What else could I try, This looks to me a bug. Can't understand why it
 is
 not in the value stack.

 If not pls let me know how to retrieve the above
 PortletSession.APPLICATION_SCOPE variable in the jsp.

 If this has been fixed let me know which struts 2 version is that.


 I did try the following also with no luck

 

 waiting for a quick reply


 Thanks





 --
 View this message in context:
 http://www.nabble.com/Struts2-portlet-bug-found-tp24598748p24598748.html
 Sent from the Struts - User mailing list archive at Nabble.com.


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


>>>
>> 
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For ad

Re: Struts vs Other competitors

2009-07-27 Thread Musachy Barroso
I would say the biggest help we can get right now is on the
documentation and get help testing releases. One thing I have always
seems lacking in the struts community, is support from users to help
testing releases *before* they are actually released.

As for coordinating effort, I am not sure it would work (besides the
usual.."hey I am working on this cool X thing.." email in dev@), I
think that working as volunteers doesn't fit well with commitment
because we also have other priorities, you know, like playing video
games and stuff :)

musachy

On Mon, Jul 27, 2009 at 8:35 PM, Zoran
Avtarovski wrote:
> I have to agree. Our touch with the JSF Oracle was both painful and
> fruitless and lead us to truly appreciate how bad things could be.
>
> Having said that, I think Martin has raised some points about how S2 can be
> improved and I think S2 is at a stage where there needs to be some general
> discussion on where all interested parties (devs and users)  think the
> framework should be heading and where there are deficiencies.
>
> I for one think, that with S2¹s improved plugin architecture, there is a
> huge amount of scope in what can be achieved. We need a few key people to
> guide the process. I know my biggest fear is over committing and not having
> the time to deliver. If there was a centralised coordinator who could
> organise a second tier of developers, for example, who can help on a smaller
> scale then I believe more of the niche development could be achieved.
>
> Z.
>>
>> On Mon, Jul 27, 2009 at 4:42 AM, Andrey Rogov wrote:
>>> > I agree with Matt Rable that JSF programming based on RAD methods makes us
>>> > transition to JSF.
>>
>> I think many, many people have crossed that bridge and came back in
>> rush after a while.
>>
>> musachy
>
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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



Re: Struts vs Other competitors

2009-07-27 Thread Zoran Avtarovski
I have to agree. Our touch with the JSF Oracle was both painful and
fruitless and lead us to truly appreciate how bad things could be.

Having said that, I think Martin has raised some points about how S2 can be
improved and I think S2 is at a stage where there needs to be some general
discussion on where all interested parties (devs and users)  think the
framework should be heading and where there are deficiencies.

I for one think, that with S2¹s improved plugin architecture, there is a
huge amount of scope in what can be achieved. We need a few key people to
guide the process. I know my biggest fear is over committing and not having
the time to deliver. If there was a centralised coordinator who could
organise a second tier of developers, for example, who can help on a smaller
scale then I believe more of the niche development could be achieved.

Z. 
> 
> On Mon, Jul 27, 2009 at 4:42 AM, Andrey Rogov wrote:
>> > I agree with Matt Rable that JSF programming based on RAD methods makes us
>> > transition to JSF.
> 
> I think many, many people have crossed that bridge and came back in
> rush after a while.
> 
> musachy




Re: getting listValue back to actionclass from s:select tag

2009-07-27 Thread musomesa

 Not sure what you mean when you say it is dynamic -- Why not keep track of the 
original key-value pairs in the user session?
You only need the key.
Chris


 


 

-Original Message-
From: Bhaarat Sharma 
To: Struts Users Mailing List 
Sent: Mon, Jul 27, 2009 9:52 pm
Subject: getting listValue back to actionclass from s:select tag










I have a s:select tag which is working fine.


html code made out of that is:

Reason1*
Reason2
Reason3*


when user selects stuff from this select box and submits what is sent back
is listKey.  Is there any way to get the listValue (content) back to the
action class?

I want to do this because as you can see some reasons have * behind them and
I want to have some logic for when users select reasons with *.  I can not
just go by value because it is dynamic.

Is there a way to get around this hurdle?



 



Re: struts 1.x, how to create package ?

2009-07-27 Thread musomesa

 No offence intended, John but I would strongly counsel you to read some Tomcat 
documentation before trying to launch your shopping cart.
At the very least the official Tomcat docs for you version of Tomcat 
(http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html) or some such url
and a book or two like
http://www.amazon.com/Tomcat-Definitive-Guide-Jason-Brittain/dp/0596101066/ref=sr_1_1?ie=UTF8&qid=1248749758&sr=8-1

Cheers
Chris



 


 

-Original Message-
From: john lee 
To: Struts Users Mailing List 
Sent: Mon, Jul 27, 2009 6:11 pm
Subject: Re: struts 1.x, how to create package ?










tks for reply, but should put it in which folder/directory ? then tomcat/struts 
can serve to online user?
?
?

--- On Mon, 7/27/09, Musachy Barroso  wrote:


From: Musachy Barroso 
Subject: Re: struts 1.x, how to create package ?
To: "Struts Users Mailing List" 
Date: Monday, July 27, 2009, 4:07 PM


http://www.google.com/search?q=how+to+make+a+jar

musachy

On Mon, Jul 27, 2009 at 1:45 PM, john lee wrote:
>
> i build online store by struts 1.x, and working fine, and all the classes 
> file 
under
>
> /var/apache-tomcat-6.0.16/webapps/store/WEB-INF/classes/packageX/cart/*.class
> 
>  
/mail/*.class
> /security/*.class
>
> how can i generate 1 single .jar? and put into which folder, then i can 
> delete 
those many *.class files, and delete folder packageX as well?
>
> tks in advance
>
> john
>
>
>
>
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd



  



 



Struts 2.x and Java 6 and/or Servlet 2.5

2009-07-27 Thread Lee Clemens
With Java 5's EOL coming on October 30th and the additional features
available in Servlet API 2.5 - is there any timeline for updating Struts
2.x's platform requirements?

Or have I misunderstood and these are only Minimum requirements?



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



RE: getting listValue back to actionclass from s:select tag

2009-07-27 Thread Lee Clemens
I believe the Label is rather meaningless (from a data point-of-view).

Do you know which options have a * after them when you create the drop down?
So you would know that key=1 has a *, key=2 does not, etc? 

Not sure I understand the reason for the label in this scenario, since the
key is - the key.

But afaik, the key is submitted (as would be during any other HTML form's
submission) - not the label.

-Original Message-
From: Bhaarat Sharma [mailto:bhaara...@gmail.com] 
Sent: Monday, July 27, 2009 9:53 PM
To: Struts Users Mailing List
Subject: getting listValue back to actionclass from s:select tag

I have a s:select tag which is working fine.


html code made out of that is:

Reason1*
Reason2
Reason3*


when user selects stuff from this select box and submits what is sent back
is listKey.  Is there any way to get the listValue (content) back to the
action class?

I want to do this because as you can see some reasons have * behind them and
I want to have some logic for when users select reasons with *.  I can not
just go by value because it is dynamic.

Is there a way to get around this hurdle?



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



getting listValue back to actionclass from s:select tag

2009-07-27 Thread Bhaarat Sharma
I have a s:select tag which is working fine.


html code made out of that is:

Reason1*
Reason2
Reason3*


when user selects stuff from this select box and submits what is sent back
is listKey.  Is there any way to get the listValue (content) back to the
action class?

I want to do this because as you can see some reasons have * behind them and
I want to have some logic for when users select reasons with *.  I can not
just go by value because it is dynamic.

Is there a way to get around this hurdle?


Re: Error creating bean with name 'org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor'

2009-07-27 Thread Musachy Barroso
On Mon, Jul 27, 2009 at 4:44 PM, desi wrote:
> is java.lang.Unsupport
> edClassVersionError: Bad version number in .class file

That means that you are running the application on a jvm whose version
is older that the version that the code was compiled for, the code was
probably compiled with/for 1.6 and it is running in 1.5

musachy

-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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



Error creating bean with name 'org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor'

2009-07-27 Thread desi

Hello,

I just created a sample application from the blank war and added jars for
hibernate and spring. I followed instructions from Struts2InAction book.
When I start tomcat I get the following error. I have the persistence.xml in
the right spot ie Web-Inf\classes\META-INF\persistence.xml. This is what I
have in it

http://java.sun.com/xml/ns/persistence";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"; version="1.0">
   
   
  
   
   


Also my applicationContext.xml reads like this



http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:tx="http://www.springframework.org/schema/tx";
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.0.xsd";>

   
   
   
   











   
 
   











   




ringframework.transaction.interceptor.TransactionAttributeSourceAdvisor];
root of factory hierarchy
Jul 27, 2009 12:23:55 AM org.springframework.web.context.ContextLoader
initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.springframework.or
m.jpa.support.PersistenceAnnotationBeanPostProcessor' defined in
ServletContext resource [/WEB-INF/application
Context.xml]: Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreatio
nException: Error creating bean with name
'org.springframework.transaction.interceptor.TransactionAttributeSou
rceAdvisor': Cannot create inner bean '(inner bean)' of type
[org.springframework.transaction.interceptor.Tran
sactionInterceptor] while setting bean property 'transactionInterceptor';
nested exception is org.springframew
ork.beans.factory.BeanCreationException: Error creating bean with name
'(inner bean)': Cannot resolve referenc
e to bean 'transactionManager' while setting bean property
'transactionManager'; nested exception is org.sprin
gframework.beans.factory.BeanCreationException: Error creating bean with
name 'transactionManager' defined in
ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve
reference to bean 'entityManagerFact
ory' while setting bean property 'entityManagerFactory'; nested exception is
org.springframework.beans.factory
.BeanCreationException: Error creating bean with name 'entityManagerFactory'
defined in ServletContext resourc
e [/WEB-INF/applicationContext.xml]: Invocation of init method failed;
nested exception is java.lang.Unsupport
edClassVersionError: Bad version number in .class file (unable to load class
com.docconnect.server.model.User)

Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'org.springf
ramework.transaction.interceptor.TransactionAttributeSourceAdvisor': Cannot
create inner bean '(inner bean)' o
f type [org.springframework.transaction.interceptor.TransactionInterceptor]
while setting bean property 'trans
actionInterceptor'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creatin
g bean with name '(inner bean)': Cannot resolve reference to bean
'transactionManager' while setting bean prop
erty 'transactionManager'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'transactionManager' defined in ServletContext
resource [/WEB-INF/applicationContext.x
ml]: Cannot resolve reference to bean 'entityManagerFactory' while setting
bean property 'entityManagerFactory
'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name
'entityManagerFactory' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Invocation of ini
t method failed; nested exception is java.lang.UnsupportedClassVersionError:
Bad version number in .class file
 (unable to load class com.docconnect.server.model.User)
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name '(inner bean
)': Cannot resolve reference to bean 'transactionManager' while setting bean
property 'transactionManager'; ne
sted exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'tran
sactionManager' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Cannot resolve reference
 to bean 'entityManagerFactory' while setting bean property
'entityManagerFactory'; nested exception is org.sp
ringframework.beans.factory.BeanCreationException: Error creating bean with
name 'entityManagerFactory' define
d in Servlet

Re: struts 1.x, how to create package ?

2009-07-27 Thread Jon Senior
On Mon, 27 Jul 2009 15:11:11 -0700 (PDT)
john lee  wrote:

> tks for reply, but should put it in which folder/directory ? then 
> tomcat/struts can serve to online user?

You need to build a war file which can then go in the tomcat webapps directory. 
See your ant build.xml for details of any war process that already exists.

-- 
Jon Senior 


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



Re: struts 1.x, how to create package ?

2009-07-27 Thread john lee
tks for reply, but should put it in which folder/directory ? then tomcat/struts 
can serve to online user?
 
 

--- On Mon, 7/27/09, Musachy Barroso  wrote:


From: Musachy Barroso 
Subject: Re: struts 1.x, how to create package ?
To: "Struts Users Mailing List" 
Date: Monday, July 27, 2009, 4:07 PM


http://www.google.com/search?q=how+to+make+a+jar

musachy

On Mon, Jul 27, 2009 at 1:45 PM, john lee wrote:
>
> i build online store by struts 1.x, and working fine, and all the classes 
> file under
>
> /var/apache-tomcat-6.0.16/webapps/store/WEB-INF/classes/packageX/cart/*.class
> 
>  /mail/*.class
> /security/*.class
>
> how can i generate 1 single .jar? and put into which folder, then i can 
> delete those many *.class files, and delete folder packageX as well?
>
> tks in advance
>
> john
>
>
>
>
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd



  

Re: struts 1.x, how to create package ?

2009-07-27 Thread Musachy Barroso
http://www.google.com/search?q=how+to+make+a+jar

musachy

On Mon, Jul 27, 2009 at 1:45 PM, john lee wrote:
>
> i build online store by struts 1.x, and working fine, and all the classes 
> file under
>
> /var/apache-tomcat-6.0.16/webapps/store/WEB-INF/classes/packageX/cart/*.class
> 
>  /mail/*.class
> /security/*.class
>
> how can i generate 1 single .jar? and put into which folder, then i can 
> delete those many *.class files, and delete folder packageX as well?
>
> tks in advance
>
> john
>
>
>
>
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd


struts 1.x, how to create packge and jar file ...?

2009-07-27 Thread john lee
 I build online store by struts 1.x, and working fine, and all the classes file 
under 
 
/var/apache-tomcat-6.0.16/webapps/storeX/WEB-INF/classes/packageX/cart/*.class

 /mail/*.class
/security/*.class
 
how can i generate 1 single .jar? and put into which folder, then i can delete 
those many *.class files, and delete folder packageX as well?
 
tks in advance
 
john


  

struts 1.x, how to create package ?

2009-07-27 Thread john lee
 
i build online store by struts 1.x, and working fine, and all the classes file 
under 
 
/var/apache-tomcat-6.0.16/webapps/store/WEB-INF/classes/packageX/cart/*.class

 /mail/*.class
/security/*.class
 
how can i generate 1 single .jar? and put into which folder, then i can delete 
those many *.class files, and delete folder packageX as well?
 
tks in advance
 
john
 
 
 
  


  

Re: Handle Japanese characters from jsp page into ActionClass

2009-07-27 Thread Greg Lindholm
That filter will work with struts 1. Just be sure it's early in the filter
chain before anyone is reading the request.
I always make it the first filter.

On Mon, Jul 27, 2009 at 4:23 PM, Ashish Kulkarni <
ashish.kulkarn...@gmail.com> wrote:

> HiI am using struts 1.2.6 and not yes in struts 2,
> So should i just put in a general filter to do encoding?
>
> Ashish
>
> On Mon, Jul 27, 2009 at 4:10 PM, Greg Lindholm  >wrote:
>
> > On Mon, Jul 27, 2009 at 3:34 PM, Ashish Kulkarni <
> > ashish.kulkarn...@gmail.com> wrote:
> >
> > > HiI have a jsp page which displays data in UTF-8 encoding, there is a
> > input
> > > text field, when user enter japanese characters in this input text and
> > data
> > > is transferred to Actionclass i get junk value,
> > >
> > > How do i handle japanese characters in ActionClass, do i have to do
> > > anything
> > > special in servlet or in JSP?
> > >
> > > I did try to put request.setCharacterEncoding("UTF-8"); in my Action
> > class,
> > > but still does not work.
> > >
> > > JSP page displays proper japanese characters as it is uses UTF-8 for
> > > encoding,
> > >
> > > Is there a solution which will work for tomcat, weblogic and websphere
> > > application server? or is encoding handled seperately by different app
> > > servers
> > >
> >
> > Setting character encoding in your action is too late, the parameters
> have
> > already been read from the request.
> > You need to set the character encoding in a filter that runs before the
> > struts2 filter.
> >
> > There is a simple filter that will do it.  You just need to add this
> filter
> > to your web.xml before the struts2 filter.
> >
> > public class CharacterEncodingFilter implements Filter
> > {
> >public void doFilter(ServletRequest request, ServletResponse response,
> > FilterChain next)
> >throws IOException, ServletException
> >{
> >String encoding = request.getCharacterEncoding();
> >if (encoding == null || encoding.length() == 0)
> >{
> >request.setCharacterEncoding("UTF-8");
> >}
> >
> >next.doFilter(request, response);
> >}
> >
> > }
> >
>


Re: Handle Japanese characters from jsp page into ActionClass

2009-07-27 Thread Ashish Kulkarni
HiI am using struts 1.2.6 and not yes in struts 2,
So should i just put in a general filter to do encoding?

Ashish

On Mon, Jul 27, 2009 at 4:10 PM, Greg Lindholm wrote:

> On Mon, Jul 27, 2009 at 3:34 PM, Ashish Kulkarni <
> ashish.kulkarn...@gmail.com> wrote:
>
> > HiI have a jsp page which displays data in UTF-8 encoding, there is a
> input
> > text field, when user enter japanese characters in this input text and
> data
> > is transferred to Actionclass i get junk value,
> >
> > How do i handle japanese characters in ActionClass, do i have to do
> > anything
> > special in servlet or in JSP?
> >
> > I did try to put request.setCharacterEncoding("UTF-8"); in my Action
> class,
> > but still does not work.
> >
> > JSP page displays proper japanese characters as it is uses UTF-8 for
> > encoding,
> >
> > Is there a solution which will work for tomcat, weblogic and websphere
> > application server? or is encoding handled seperately by different app
> > servers
> >
>
> Setting character encoding in your action is too late, the parameters have
> already been read from the request.
> You need to set the character encoding in a filter that runs before the
> struts2 filter.
>
> There is a simple filter that will do it.  You just need to add this filter
> to your web.xml before the struts2 filter.
>
> public class CharacterEncodingFilter implements Filter
> {
>public void doFilter(ServletRequest request, ServletResponse response,
> FilterChain next)
>throws IOException, ServletException
>{
>String encoding = request.getCharacterEncoding();
>if (encoding == null || encoding.length() == 0)
>{
>request.setCharacterEncoding("UTF-8");
>}
>
>next.doFilter(request, response);
>}
>
> }
>


Re: Handle Japanese characters from jsp page into ActionClass

2009-07-27 Thread Greg Lindholm
On Mon, Jul 27, 2009 at 3:34 PM, Ashish Kulkarni <
ashish.kulkarn...@gmail.com> wrote:

> HiI have a jsp page which displays data in UTF-8 encoding, there is a input
> text field, when user enter japanese characters in this input text and data
> is transferred to Actionclass i get junk value,
>
> How do i handle japanese characters in ActionClass, do i have to do
> anything
> special in servlet or in JSP?
>
> I did try to put request.setCharacterEncoding("UTF-8"); in my Action class,
> but still does not work.
>
> JSP page displays proper japanese characters as it is uses UTF-8 for
> encoding,
>
> Is there a solution which will work for tomcat, weblogic and websphere
> application server? or is encoding handled seperately by different app
> servers
>

Setting character encoding in your action is too late, the parameters have
already been read from the request.
You need to set the character encoding in a filter that runs before the
struts2 filter.

There is a simple filter that will do it.  You just need to add this filter
to your web.xml before the struts2 filter.

public class CharacterEncodingFilter implements Filter
{
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain next)
throws IOException, ServletException
{
String encoding = request.getCharacterEncoding();
if (encoding == null || encoding.length() == 0)
{
request.setCharacterEncoding("UTF-8");
}

next.doFilter(request, response);
}

}


Handle Japanese characters from jsp page into ActionClass

2009-07-27 Thread Ashish Kulkarni
HiI have a jsp page which displays data in UTF-8 encoding, there is a input
text field, when user enter japanese characters in this input text and data
is transferred to Actionclass i get junk value,

How do i handle japanese characters in ActionClass, do i have to do anything
special in servlet or in JSP?

I did try to put request.setCharacterEncoding("UTF-8"); in my Action class,
but still does not work.

JSP page displays proper japanese characters as it is uses UTF-8 for
encoding,

Is there a solution which will work for tomcat, weblogic and websphere
application server? or is encoding handled seperately by different app
servers


Re: Struts vs Other competitors

2009-07-27 Thread Frank W. Zammetti
The phrase "OH GOD KILL IT! KILL IT WITH FIRE!" has been heard exclaimed
in relation to JSF on more than one occassion.

-- 
Frank W. Zammetti
Author of "Practical Ext JS Projects with Gears"
  and "Practical Dojo Projects"
  and "Practical DWR 2 Projects"
  and "Practical JavaScript, DOM Scripting and Ajax Projects"
  and "Practical Ajax Projects with Java Technology"
  (For info: apress.com/book/search?searchterm=zammetti&act=search)
All you could possibly want is here: zammetti.com

On Mon, July 27, 2009 12:07 pm, Musachy Barroso wrote:
> On Mon, Jul 27, 2009 at 4:42 AM, Andrey Rogov wrote:
>> I agree with Matt Rable that JSF programming based on RAD methods makes
>> us
>> transition to JSF.
>
> I think many, many people have crossed that bridge and came back in
> rush after a while.
>
> musachy
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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



Re: How to set Array properties?

2009-07-27 Thread mailtolouis2020-struts
Thank You!




From: Musachy Barroso 
To: Struts Users Mailing List 
Sent: Monday, July 27, 2009 5:58:02 PM
Subject: Re: How to set Array properties?


   
   
   


On Mon, Jul 27, 2009 at 7:55 AM, Louis Voo wrote:
> Hi,
>
> For e.g, I've this iteration in my jsp page
>
> 
> 
> 
>
> 
>
> and this in action
>
> public User[] getUsers(){
> return this.users;
> }
>
> public User[] setUsers(){
> return this.users;
> }
>
>
> When the user submit the form, I want struts set the firstName & lastName 
> back to users array, how to achieve this?
>
>
> Regards
> Louis



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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

Re: How to set Array properties?

2009-07-27 Thread Musachy Barroso

   
   
   


On Mon, Jul 27, 2009 at 7:55 AM, Louis Voo wrote:
> Hi,
>
> For e.g, I've this iteration in my jsp page
>
> 
> 
> 
>    
> 
>
> and this in action
>
> public User[] getUsers(){
> return this.users;
> }
>
> public User[] setUsers(){
> return this.users;
> }
>
>
> When the user submit the form, I want struts set the firstName & lastName 
> back to users array, how to achieve this?
>
>
> Regards
> Louis



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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



Re: Cleaner way to create this page?

2009-07-27 Thread Musachy Barroso
add RoutingEnginePropertiesMgr.getInstance() to the request attributes
map, and use jstl or struts tags in the jsp:


...


Dare to stay away from scriptlets ;)

musachy

On Mon, Jul 27, 2009 at 9:35 AM, laredotornado wrote:
>
> A couple of things ...
>
> 1. Struts tag libraries wouldn't apply here, right?  I'm trying to do some
> conditional if logic and I don't see which of the Struts libraries would
> fit.  I'm using Struts 1.3.
>
> 2. You mention to put this, "<%= rePropMgr.getCaptchaPublicKey() %>" in the
> ActionForm, but I need this output to the client side because the script src
> requires that information.  Knowing that, any other advice there?
>
> Thanks , - Dave
>
>
>
> Kawczynski, David wrote:
>>
>> Write a taglib or put a getCaptchaPublicKey() method in the
>> ActionForm, and use struts taglibs.
>>
>>> -Original Message-
>>> From: laredotornado [mailto:laredotorn...@gmail.com]
>>> Sent: Monday, July 27, 2009 11:51 AM
>>> To: user@struts.apache.org
>>> Subject: Cleaner way to create this page?
>>>
>>>
>>> Hi,
>>>
>>> I'm using Struts 1.3.  I have this in my JSP page ...
>>>
>>> <%
>>>      final RoutingEnginePropertiesMgr rePropMgr =
>>> RoutingEnginePropertiesMgr.getInstance();
>>>      if (rePropMgr.isUseCaptcha()) {
>>> %>
>>>              >> src="https://api-secure.recaptcha.net/challenge?k=<%=
>>> rePropMgr.getCaptchaPublicKey() %>">
>>> <%
>>>      }   // if
>>> %>
>>>
>>> Is there a cleaner way to write this that avoids using scriptlets?
>>>
>>> Thanks for any advice, - Dave
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Cleaner-way-to-create-this-page--tp24683
>> 147p24683147.html
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>> Notice:  This e-mail message, together with any attachments, contains
>> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
>> New Jersey, USA 08889), and/or its affiliates (which may be known
>> outside the United States as Merck Frosst, Merck Sharp & Dohme or
>> MSD and in Japan, as Banyu - direct contact information for affiliates is
>> available at http://www.merck.com/contact/contacts.html) that may be
>> confidential, proprietary copyrighted and/or legally privileged. It is
>> intended solely for the use of the individual or entity named on this
>> message. If you are not the intended recipient, and have received this
>> message in error, please notify us immediately by reply e-mail and
>> then delete it from your system.
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Cleaner-way-to-create-this-page--tp24683147p24683970.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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



[S2] Get struts.url.http.port value

2009-07-27 Thread Louis Voo
Hi,

How to get the value of struts.url.http.port and struts.url.https.port  in the 
Action?

Regards
Louis

RE: Cleaner way to create this page?

2009-07-27 Thread laredotornado

A couple of things ...

1. Struts tag libraries wouldn't apply here, right?  I'm trying to do some
conditional if logic and I don't see which of the Struts libraries would
fit.  I'm using Struts 1.3.

2. You mention to put this, "<%= rePropMgr.getCaptchaPublicKey() %>" in the
ActionForm, but I need this output to the client side because the script src
requires that information.  Knowing that, any other advice there?

Thanks , - Dave



Kawczynski, David wrote:
> 
> Write a taglib or put a getCaptchaPublicKey() method in the 
> ActionForm, and use struts taglibs.
> 
>> -Original Message-
>> From: laredotornado [mailto:laredotorn...@gmail.com] 
>> Sent: Monday, July 27, 2009 11:51 AM
>> To: user@struts.apache.org
>> Subject: Cleaner way to create this page?
>> 
>> 
>> Hi,
>> 
>> I'm using Struts 1.3.  I have this in my JSP page ...
>> 
>> <%
>>  final RoutingEnginePropertiesMgr rePropMgr =
>> RoutingEnginePropertiesMgr.getInstance(); 
>>  if (rePropMgr.isUseCaptcha()) { 
>> %>
>>  > src="https://api-secure.recaptcha.net/challenge?k=<%=
>> rePropMgr.getCaptchaPublicKey() %>">
>> <%
>>  }   // if 
>> %>
>> 
>> Is there a cleaner way to write this that avoids using scriptlets?
>> 
>> Thanks for any advice, - Dave
>> -- 
>> View this message in context: 
>> http://www.nabble.com/Cleaner-way-to-create-this-page--tp24683
> 147p24683147.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>> 
>> 
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>> 
>> 
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> New Jersey, USA 08889), and/or its affiliates (which may be known
> outside the United States as Merck Frosst, Merck Sharp & Dohme or
> MSD and in Japan, as Banyu - direct contact information for affiliates is
> available at http://www.merck.com/contact/contacts.html) that may be
> confidential, proprietary copyrighted and/or legally privileged. It is
> intended solely for the use of the individual or entity named on this
> message. If you are not the intended recipient, and have received this
> message in error, please notify us immediately by reply e-mail and
> then delete it from your system.
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Cleaner-way-to-create-this-page--tp24683147p24683970.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Date Validation using session Locale

2009-07-27 Thread David T. Webb
I am using Struts 1.3.10  and I am trying to achieve client side javascript 
date validation using the default datePattern from the user's session Locale.  
Objective is to validate any date format based on Locale without specifying a 
specific pattern.

My Form field validation rule is this:


  


I have intentionally left the datePattern blank because I want the default 
SimpleDateFormat.SHORT Pattern from the session Locale to be used.

>From http://struts.apache.org/1.3.10/faqs/validator.html with regard to the 
>builtin "date" validation

"If no pattern is specified the default short date format is assumed."

The session Locale is set to en_US.

I am getting an error on the javascript length ("datePattern.length") because 
datePattern is not set properly in the cliet side js.

As you can see below, from the  javascript generated on the page, it looks for 
the datePatternStrict and datePattern settings from the validation.xml file.  
But it never defaults to the SHORT format from the session Locale using 
SimpleDateFormat as specified in the validator docs.

   var value = field.value;
   var isStrict = true;
   var datePattern = oDate[x][2]("datePatternStrict");
   // try loose pattern
   if (datePattern == null) {
   datePattern = oDate[x][2]("datePattern");
   isStrict = false;
   }    
   if ((field.type == 'hidden' ||
    field.type == 'text' ||
    field.type == 'textarea') &&
   (value.length > 0) && (datePattern.length > 0)) {



What am I doing wrong?  Does anyone have this working properly?

Thank you.

--
Sincerely,
David Webb, President
BrightMove, Inc. (http://www.brightmove.com)
320 High Tide Dr, Suite 101B
Saint Augustine Beach, FL 32080
(904) 861-2396
(866) 895-6299 (Fax)

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



Re: Struts vs Other competitors

2009-07-27 Thread Musachy Barroso
On Mon, Jul 27, 2009 at 4:42 AM, Andrey Rogov wrote:
> I agree with Matt Rable that JSF programming based on RAD methods makes us
> transition to JSF.

I think many, many people have crossed that bridge and came back in
rush after a while.

musachy

-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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



RE: Cleaner way to create this page?

2009-07-27 Thread Kawczynski, David
Write a taglib or put a getCaptchaPublicKey() method in the 
ActionForm, and use struts taglibs.

> -Original Message-
> From: laredotornado [mailto:laredotorn...@gmail.com] 
> Sent: Monday, July 27, 2009 11:51 AM
> To: user@struts.apache.org
> Subject: Cleaner way to create this page?
> 
> 
> Hi,
> 
> I'm using Struts 1.3.  I have this in my JSP page ...
> 
> <%
>   final RoutingEnginePropertiesMgr rePropMgr =
> RoutingEnginePropertiesMgr.getInstance(); 
>   if (rePropMgr.isUseCaptcha()) { 
> %>
>src="https://api-secure.recaptcha.net/challenge?k=<%=
> rePropMgr.getCaptchaPublicKey() %>">
> <%
>   }   // if 
> %>
> 
> Is there a cleaner way to write this that avoids using scriptlets?
> 
> Thanks for any advice, - Dave
> -- 
> View this message in context: 
> http://www.nabble.com/Cleaner-way-to-create-this-page--tp24683
147p24683147.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


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



Cleaner way to create this page?

2009-07-27 Thread laredotornado

Hi,

I'm using Struts 1.3.  I have this in my JSP page ...

<%
final RoutingEnginePropertiesMgr rePropMgr =
RoutingEnginePropertiesMgr.getInstance(); 
if (rePropMgr.isUseCaptcha()) { 
%>
https://api-secure.recaptcha.net/challenge?k=<%=
rePropMgr.getCaptchaPublicKey() %>">
<%
}   // if 
%>

Is there a cleaner way to write this that avoids using scriptlets?

Thanks for any advice, - Dave
-- 
View this message in context: 
http://www.nabble.com/Cleaner-way-to-create-this-page--tp24683147p24683147.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



How to set Array properties?

2009-07-27 Thread Louis Voo
Hi,

For e.g, I've this iteration in my jsp page





 

and this in action

public User[] getUsers(){
return this.users;
}

public User[] setUsers(){
return this.users;
}


When the user submit the form, I want struts set the firstName & lastName back 
to users array, how to achieve this?


Regards
Louis

RE: Display Doc or PDF file in JSP

2009-07-27 Thread Martin Gainty

you would use poi-hwpf to create the document 
http://poi.apache.org/hwpf/index.html

you may want to consider a flash enabled document which comes with 
forward/backward scroll buttons
http://www.scribd.com/doc/7395371/JSP-Servlet-JSTL-Specification

populate your webpage src attribute in supplied iframe e.g. 
http://www.dyn-web.com/tutorials/iframes/basics.php

feel free to ping offline as this is not specific to struts  
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Mon, 27 Jul 2009 14:41:49 +0200
> From: r...@lsoft.com
> To: user@struts.apache.org
> Subject: Re: Display Doc or PDF file in JSP
> 
> Paweł Wielgus schrieb:
> > Hi Nitesh,
> > as far as i know it's impossible with DOC, but pretty easy with PDF,
> > just create iframe with source that will point to that pdf file.
> > Most browsers on computers where acrobat reader is installed will
> > display it as an inline document,
> > i don't know if it will work with div only.
> >   
> 
> It won't work with a div. It can't, because the div source belongs to 
> the original request whereas an iframe yields a separate request for the 
> pdf document as a whole, which, as you already wrote, most browsers show 
> as inline document.
> 
> Robert
> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 

_
Windows Live™ Hotmail®: Search, add, and share the web’s latest sports videos. 
Check it out.
http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_videos_072009&cat=sports

Re: 2-dimensional array.

2009-07-27 Thread Pascal
Maybe you wanted to do this?

String cat_sections[] = {"IP6-Calling-Card"};
String cat_items_sections[][] = { cat_sections };

I'm really not sure if you should use arrays here, though. Especially for
storing string constants you should really consider using enums.

Pascal

On Mon, 27 Jul 2009 23:53:02 +1000, Sam Wun  wrote:
> Hi,
> 
> sorry this is not a Struts specific question, but I am working on a
> JSP file that is related to the Struts.
> I believe most of you guys are using JSP with struts, so I hope I can
> get some help here.
> 
> I want to declare a String 2-dimensional array in JSP as follow:
> 
> String cat_sections[] = {"IP6-Calling-Card"};
> //String cat_items_sections[][] = new String[1][];
> String cat_items_sections[0][] = new String[results.size()];
> 
> 
> But I got an error:
> 
> 23:40:55,736 ERROR [IncludeTag:79] Current URL /web/guest/home
> generates exception: Unable to compile class for JSP:
> 
> An error occurred at line: 90 in the jsp file:
> /html/portlet/shopping/categories-main.jspf
> Syntax error on token "0", delete this token
> 87:
> 88: String cat_sections[] = {"Main-Section"};
> 89: //String cat_items_sections[][] = new String[1][];
> 90: String cat_items_sections[0][] = new String[results.size()];
> 91:
> 92:
> 
> What I really want to do is,
> cat_sections  has 3 items, illustrated as follow:
> 
> cat_sections - cat_items_section[0]
> .- cat_items_section[1]
> .- cat_items_section[2]
> 
> How to initiate and assign string into it?
> 
> your help is much appreciated.
> 
> Thanks
> Sam
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org

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



2-dimensional array.

2009-07-27 Thread Sam Wun
Hi,

sorry this is not a Struts specific question, but I am working on a
JSP file that is related to the Struts.
I believe most of you guys are using JSP with struts, so I hope I can
get some help here.

I want to declare a String 2-dimensional array in JSP as follow:

String cat_sections[] = {"IP6-Calling-Card"};
//String cat_items_sections[][] = new String[1][];
String cat_items_sections[0][] = new String[results.size()];


But I got an error:

23:40:55,736 ERROR [IncludeTag:79] Current URL /web/guest/home
generates exception: Unable to compile class for JSP:

An error occurred at line: 90 in the jsp file:
/html/portlet/shopping/categories-main.jspf
Syntax error on token "0", delete this token
87:
88: String cat_sections[] = {"Main-Section"};
89: //String cat_items_sections[][] = new String[1][];
90: String cat_items_sections[0][] = new String[results.size()];
91:
92:

What I really want to do is,
cat_sections  has 3 items, illustrated as follow:

cat_sections - cat_items_section[0]
.- cat_items_section[1]
.- cat_items_section[2]

How to initiate and assign string into it?

your help is much appreciated.

Thanks
Sam

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



Validation problem in Struts 2.1.6

2009-07-27 Thread Thaminda Karunanayake
Hi,

I am migrating from struts 2.0.6 to 2.1.6. Using struts 2.1.6, I created a
login page and included the  and  inside  tags
of an html table (shown below). But, when I activate client side validation,
the error messages appear repeatedly; i.e. previous error messages are not
cleared.




 



But when I included the  and  just inside the
 (shown below), it works fine. Then the error messages are cleared
correcly.





As I need to insert some images to this page as well, I need to use these
 and  tags inside a table. Currently I have not set
any theme for these fields.

It would be of great help if you could give your ideas on this matter.

Thanks in advance...

Best regards,
*Thaminda*


Re: Display Doc or PDF file in JSP

2009-07-27 Thread Robert Graf-Waczenski

Paweł Wielgus schrieb:

Hi Nitesh,
as far as i know it's impossible with DOC, but pretty easy with PDF,
just create iframe with source that will point to that pdf file.
Most browsers on computers where acrobat reader is installed will
display it as an inline document,
i don't know if it will work with div only.
  


It won't work with a div. It can't, because the div source belongs to 
the original request whereas an iframe yields a separate request for the 
pdf document as a whole, which, as you already wrote, most browsers show 
as inline document.


Robert



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



RE: Display Doc or PDF file in JSP

2009-07-27 Thread Nitesh Jain
Thanks Pawel,

It works for PDF file. Cant we find out any solution for DOC.

Regards,

Nitesh

-Original Message-
From: Paweł Wielgus [mailto:poulw...@gmail.com] 
Sent: 27 July 2009 18:01
To: Struts Users Mailing List
Subject: Re: Display Doc or PDF file in JSP

Hi Nitesh,
as far as i know it's impossible with DOC, but pretty easy with PDF,
just create iframe with source that will point to that pdf file.
Most browsers on computers where acrobat reader is installed will
display it as an inline document,
i don't know if it will work with div only.

Best greetings,
Paweł Wielgus.


2009/7/27 Nitesh Jain :
> Hi All,
>
>
>
>I have requirement to display a Doc or PDF file into a div
> tag of the JSP. It means that JSP will display a DOC/PDF file in half of the
> page and remaining space will be used to display some other information. Can
> anyone guide me to achieve this with or without using the struts?
>
>
>
> Regards,
>
>
>
> Nitesh
>
>
>
>
>
>

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


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



RE: Struts vs Other competitors

2009-07-27 Thread Martin Gainty

first started using struts in 02 and have been a strong advocate of Struts 
implementations since 
I believe the incorporation of Ajax enabled Dojo controls and interceptor call 
stack from freemarker pushed usability
of Struts ahead of JSF in those areas
unfortunately Struts RAD tools are not as well developed as JSF so teaching 
Struts to new college grads who use only  IDEs is not so easy..also the 
addressing of bug assignments and what gets accomplished has devolved since 
Craig and Tad left..incorporation of IOC technologies such as Spring gravitates 
to Spring accomodates Struts
instead of the other way around
Oracle/Sun JDeveloper IDE seem to be gaining marketshare on Eclipse.. combined 
with easy WAR/EAR deploy to either Weblogic or Glassfish the details of a j2ee 
ejb-configuration and incorporating connection-pools  and Persistence 
architectures are easily handled by user-friendly UI gracefully which populate 
deployment descriptors 

In Academia Struts seems to have the lead but measuring actual business revenue 
JSF seems to edge iut Struts as managers prefer a Oracle or Sun backed product
support is  another matter as the the 2 JSF support avenues i know of are 
tomcat-users-list or glassfish-users-list
where the expertise is more on tc container configurations, tweaking perm-gen, 
using asadmin instead of
how do i get a faces control to receive JSON formatted response back to my div 
tag
JSF's component based event handlers works well for folks coming from .NET but 
i wonder about the overhead

what do others think of jsf?
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> From: strut...@gmail.com
> To: user@struts.apache.org
> Subject: RE: Struts vs Other competitors
> Date: Mon, 27 Jul 2009 14:42:06 +0300
> 
> Thank you Martin,
> 
> Sooner or later we start considering programming as business. 
> It's critical to develop new products or new versions with parameters that
> would be faster, more quality and less expensive. 
> I agree with Matt Rable that JSF programming based on RAD methods makes us
> transition to JSF. 
> I think that big companies are destined to make this step to
> increase the customer base and to be able to offer high quality
> services. I liked ADF very much, primarily for its visual development
> environment, quantity of objects, code generation and quality of
> applications. Today I'm spending extra time to transition to JSF+ADF
> ASAP. 
> 
> 
> -Original Message-
> From: Martin Gainty [mailto:mgai...@hotmail.com] 
> Sent: Monday, July 27, 2009 5:01 AM
> To: Struts Users Mailing List
> Subject: RE: Struts vs Other competitors
> 
> 
> support for Toplink
> support for EJB3.0
> the struts plugin-extension is for Struts1 core development and UML
> diagramming editor
> so if you want to use JDev IDE you'll only see support for Struts and not
> Struts2
> good support for JSF-faces ..the JSF chair is a Sun Senior Fellow and since
> Sun was just purchased by Oracle
> 
> this describes incorporating Struts1 extension
> http://www.oracle.com/technology/products/jdev/tips/mills/struts_diagram.htm
> l
> 
> what is your impression of ADF?
> Martin 
> __ 
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>  
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
> de ceci est interdite. Ce message sert à l'information

Re: Display Doc or PDF file in JSP

2009-07-27 Thread Paweł Wielgus
Hi Nitesh,
as far as i know it's impossible with DOC, but pretty easy with PDF,
just create iframe with source that will point to that pdf file.
Most browsers on computers where acrobat reader is installed will
display it as an inline document,
i don't know if it will work with div only.

Best greetings,
Paweł Wielgus.


2009/7/27 Nitesh Jain :
> Hi All,
>
>
>
>                I have requirement to display a Doc or PDF file into a div
> tag of the JSP. It means that JSP will display a DOC/PDF file in half of the
> page and remaining space will be used to display some other information. Can
> anyone guide me to achieve this with or without using the struts?
>
>
>
> Regards,
>
>
>
> Nitesh
>
>
>
>
>
>

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



Display Doc or PDF file in JSP

2009-07-27 Thread Nitesh Jain
Hi All,

 

I have requirement to display a Doc or PDF file into a div
tag of the JSP. It means that JSP will display a DOC/PDF file in half of the
page and remaining space will be used to display some other information. Can
anyone guide me to achieve this with or without using the struts? 

 

Regards,

 

Nitesh

 

 



RE: Struts vs Other competitors

2009-07-27 Thread Andrey Rogov
Thank you Martin,

Sooner or later we start considering programming as business. 
It's critical to develop new products or new versions with parameters that
would be faster, more quality and less expensive. 
I agree with Matt Rable that JSF programming based on RAD methods makes us
transition to JSF. 
I think that big companies are destined to make this step to
increase the customer base and to be able to offer high quality
services. I liked ADF very much, primarily for its visual development
environment, quantity of objects, code generation and quality of
applications. Today I'm spending extra time to transition to JSF+ADF
ASAP. 


-Original Message-
From: Martin Gainty [mailto:mgai...@hotmail.com] 
Sent: Monday, July 27, 2009 5:01 AM
To: Struts Users Mailing List
Subject: RE: Struts vs Other competitors


support for Toplink
support for EJB3.0
the struts plugin-extension is for Struts1 core development and UML
diagramming editor
so if you want to use JDev IDE you'll only see support for Struts and not
Struts2
good support for JSF-faces ..the JSF chair is a Sun Senior Fellow and since
Sun was just purchased by Oracle

this describes incorporating Struts1 extension
http://www.oracle.com/technology/products/jdev/tips/mills/struts_diagram.htm
l

what is your impression of ADF?
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
dient lediglich dem Austausch von Informationen und entfaltet keine
rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire
informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
de ceci est interdite. Ce message sert à l'information seulement et n'aura
pas n'importe quel effet légalement obligatoire. Étant donné que les email
peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
aucune responsabilité pour le contenu fourni.




> From: strut...@gmail.com
> To: user@struts.apache.org
> Subject: RE: Struts vs Other competitors
> Date: Mon, 27 Jul 2009 03:59:25 +0300
> 
> Martin, 
> What do you think about Oracle ADF ?
> 
> -Original Message-
> From: Martin Gainty [mailto:mgai...@hotmail.com] 
> Sent: Sunday, July 26, 2009 4:42 PM
> To: Struts Users Mailing List
> Subject: RE: Struts vs Other competitors
> 
> 
> Raible rated Struts as "poor support"
> 
> support in JSF is based on implementing container: e.g. glassfish users
> group or tomcat users group..
> usually all questions are answered in TC but not so with GF
> Struts is Front Controller based ..basically one event/one request
> JSF is Page Controller  n events are parsed from one Request
> In Struts navigation is tied to Action
> in JSF navigation is tied to Page
> http://websphere.sys-con.com/node/46516
> 
> ASP.NET is specific to Microsoft platforms which means 75% of the
installed
> servers cannot run it
> 
> Martin Gainty 
> __ 
> Jogi és Bizalmassági kinyilatkoztatás/Verzicht und
> Vertraulichkeitanmerkung/Note de déni et de confidentialité
>  Ez az
> üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
> jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
> készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
> semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
> könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
> ezen üzenet tartalma miatt.
> 
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
copie
> de ceci est interdite. Ce message sert à l'information seulement et n'aura
> pas n'importe quel effet légalement obligatoire. Étant donné que les email
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
> aucune responsabilité pour le contenu fourni.
> 
> 
> 
> 
> > Date: Sat, 25 Jul 2009 22:31:18 -0700
> > Subject: Re: Struts vs Other competitors
> > From: musa...@gmail.com
> > To: user@struts.apache.org
> > 
>

Re: EJB Injection in Interceptor

2009-07-27 Thread Robin Mannering

Just wondering if the below thread has gone any further.

After creating another thread on the same subject at an earlier date, we 
discussed using the EJB plugin here:


http://cwiki.apache.org/S2PLUGINS/ejb3-plugin.html

However, having started to use this plugin so that I can reference 
stateless session beans, it seems that all EJB Session bean classes must 
be defined as @Remote rather than @Local in order for the injection to 
obtain the references correctly.  Failure to specify them as remote 
throws a javax.naming.NameNotFoundException.


However, reading from a book entitled "Pro EJB 3.0", the following 
performance issues are mentioned in relation to using @Remote when 
@Local is available.  Hopefully this link will work for you.


http://books.google.co.uk/books?id=fVCuB_Xq3pAC&pg=PA40&lpg=PA40&dq=Making+an+interface+remote+has+consequences&source=bl&ots=Bg9DdpVAWW&sig=vxrumZhYLhjmqbt6bdMJ96hrY7s&hl=en&ei=QIdtStuLC-WhjAf34KGeCw&sa=X&oi=book_result&ct=result&resnum=

So, the problem is :

How can we obtain references to EJB 3 session beans from within Struts 2 
action classes?


I'd be very interested to hear your thoughts.

Thanks
Robin

Nathan Schulte wrote:

Wes Wannemacher  wantii.com> writes:
  

Seems to me that my idea to create an ObjectFactory based plugin ... needs to


pick up some steam.
  

I only have one question for the EJB users out there... Do you guys need


Spring integration as well?

To answer your question, _I_ personally don't need Spring integration.  I've
never used Spring, and for this project, it was too much overhead to learn (on
top of Java EE, the JPA, Hibernate intricacies, Struts2...), and from what I
understand, it seemed like using it and S2 together provided duplicate
functionality (another topic altogether...).

On another note, I find it awesome that the community (or whatever group you're
part of) is so willing to provide support.  I mean, in my eyes, this is
something that I could see myself writing to make my coding easier, it's just
that given my situation, it's easier to use the "workaround."  Admittedly, I'm
not very familiar with JEE5.  Some of this is still black magic, and I don't
fully understand the issue, I just know enough to understand that the
architecture permits it as an issue (and not everyone is just blowing smoke my
way) and can leave all of the intricate details be, as they don't directly
affect my project.

-Nate


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




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.387 / Virus Database: 270.13.20/2248 - Release Date: 07/19/09 05:57:00