Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 30 Mar 2012 09:54:31 -0000 Issue 9580

user-digest-help

2012-03-30


Author LoginPost Reply

user Digest 30 Mar 2012 09:54:31 -0000 Issue 9580

Topics (messages 212654 through 212670)

Using HashMap in selectbox
 212654 by: Shrinivas Parashar
 212655 by: Rakeshkumar Parmar
 212660 by: Steven Yang

Re: Convention plugin: How do I have two methods on the same action using 2 different Interceptor stacks
 212656 by: Shinobi

Struts 2.3.1.2 and Spring 3.1.1 integration in wls 10.3.4 server
 212657 by: Rout, Biswajit
 212658 by: Eric Lentz
 212659 by: Łukasz Lenart

[S 1.3.8] Accessing property of inner bean
 212661 by: Anjib Mulepati

Re: [S 1.3.8] Iterator inside Iterator
 212662 by: Anjib Mulepati

Struts/CMS/Drupal
 212663 by: Santinello, Anthony
 212664 by: Dave Newton
 212665 by: Christian Grobmeier
 212666 by: Santinello, Anthony
 212667 by: Dave Newton
 212668 by: Christian Grobmeier
 212669 by: Santinello, Anthony
 212670 by: Christian Grobmeier

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------


Attachment: user_212654.eml (zipped)
Hi,
How can use a hashMap in select box with Map key as listkey and Map values one of the property as listValue.
For example I have a Map of type <String,Person> . In the listValue I want to provide person.name. Is this possible?

Regards,
Shrinivas

Attachment: user_212655.eml (zipped)
I think it requires list. So you can get values from hashmap using values() method.then apply person.name.


Regards,
Rakesh

-----Original Message-----
From: Shrinivas Parashar [mailto:Shrinivas_Parashar@(protected)]
Sent: Wednesday, March 28, 2012 3:44 PM
To: Struts Users Mailing List
Subject: Using HashMap in selectbox

Hi,
How can use a hashMap in select box with Map key as listkey and Map values one of the property as listValue.
For example I have a Map of type <String,Person> . In the listValue I want to provide person.name. Is this possible?

Regards,
Shrinivas

DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.


Attachment: user_212660.eml (zipped)
i think you can turn the map to a Set<Entry<K, V>> then use it as listKey
as "getKey()" or "key" and listValue as "getValue()" or "value"

On Wed, Mar 28, 2012 at 6:16 PM, Rakeshkumar Parmar <
rakeshkumar_parmar@(protected):

> I think it requires list. So you can get values from hashmap using
> values() method.then apply person.name.
>
>
> Regards,
> Rakesh
>
> -----Original Message-----
> From: Shrinivas Parashar [mailto:Shrinivas_Parashar@(protected)]
> Sent: Wednesday, March 28, 2012 3:44 PM
> To: Struts Users Mailing List
> Subject: Using HashMap in selectbox
>
> Hi,
> How can use a hashMap in select box with Map key as listkey and Map values
> one of the property as listValue.
> For example I have a Map of type <String,Person> . In the listValue I want
> to provide person.name. Is this possible?
>
> Regards,
> Shrinivas
>
> DISCLAIMER
> ==========
> This e-mail may contain privileged and confidential information which is
> the property of Persistent Systems Ltd. It is intended only for the use of
> the individual or entity to which it is addressed. If you are not the
> intended recipient, you are not authorized to read, retain, copy, print,
> distribute or use this message. If you have received this communication in
> error, please notify the sender and delete all copies of this message.
> Persistent Systems Ltd. does not accept any liability for virus infected
> mails.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_212656.eml (zipped)
I want the action name to be the same for both and use bang notation to
select the method to call. If I add the Action annotation with
interceptorRefs as you say and omit the action name it complains that the
action name is the same. Am I doing something wrong or is this just not
possible?

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_212657.eml (zipped)
Hi,
I am running Struts 2.3.1.2 and Spring 3.1.1 integration in wls 10.3.4 server. However the validation framework is not working.
Please find the log and the xml file.



Log Information

Mar 28, 2012 3:34:42 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
SEVERE: Caught exception while loading file com/gm/gm3pd/registration/action/RegistrationAction-validation.xml
Tried all: '1' addresses, but could not connect over HTTP to server: 'www.opensymphony.com', port: '80' - Class: weblogic.net.http.HttpClient
File: HttpClient.java
Method: openServer
Line: 321 - weblogic/net/http/HttpClient.java:321:-1


RegistrationAction-validation.xml

<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">

<validators>
<field name="firstname">
<field-validator type="requiredstring">
<message key="requiredstring"/>
</field-validator>
</field>
<field name="password">
<field-validator type="requiredstring">
<message key="requiredstring"/>
</field-validator>
</field>
<field name="password">
<field-validator type="stringlength">
<param name="minLength">5</param>
<param name="maxLength">15</param>
<param name="trim">true</param>
<message >Please enter Min %{minLength} character or Max %{maxLength} Character </message>
</field-validator>
</field>
</validators>

Any hints on the above issue.
Thanks in advance.



Best regards,
Biswajit
Planned Vacation : From 2-July-2012 to 6-July-2012


Attachment: user_212658.eml (zipped)
Did you turn on logging? What is the caught exception?


On Wed, Mar 28, 2012 at 11:01 AM, Rout, Biswajit <biswajit.rout@(protected):

> Hi,
> I am running Struts 2.3.1.2 and Spring 3.1.1 integration in wls 10.3.4
> server. However the validation framework is not working.
> Please find the log and the xml file.
>
>
>
> Log Information
>
> Mar 28, 2012 3:34:42 PM
> com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
> SEVERE: Caught exception while loading file
> com/gm/gm3pd/registration/action/RegistrationAction-validation.xml
> Tried all: '1' addresses, but could not connect over HTTP to server: '
> www.opensymphony.com', port: '80' - Class: weblogic.net.http.HttpClient
> File: HttpClient.java
> Method: openServer
> Line: 321 - weblogic/net/http/HttpClient.java:321:-1
>
>
> RegistrationAction-validation.xml
>
> <!DOCTYPE validators PUBLIC
> "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
> "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
>
> <validators>
> <field name="firstname">
> <field-validator type="requiredstring">
> <message key="requiredstring"/>
> </field-validator>
> </field>
> <field name="password">
> <field-validator type="requiredstring">
> <message key="requiredstring"/>
> </field-validator>
> </field>
> <field name="password">
> <field-validator type="stringlength">
> <param name="minLength">5</param>
> <param name="maxLength">15</param>
> <param name="trim">true</param>
> <message >Please enter Min %{minLength} character or Max %{maxLength}
> Character </message>
> </field-validator>
> </field>
> </validators>
>
> Any hints on the above issue.
> Thanks in advance.
>
>
>
> Best regards,
> Biswajit
> Planned Vacation : From 2-July-2012 to 6-July-2012
>
>

Attachment: user_212659.eml (zipped)
2012/3/28 Rout, Biswajit <biswajit.rout@(protected)>:
> <!DOCTYPE validators PUBLIC
> "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
> "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">

You're using the wrong DOCTYPE, check this out
https://cwiki.apache.org/confluence/display/WW/Validation


Regards
--
Łukasz http://www.lenart.org.pl/
mobile +48 606 323 122, office +27 11 0838747
Warszawa JUG conference - Confitura http://confitura.pl/


Attachment: user_212661.eml (zipped)
Hi All,

I am trying to pass COMPLEX bean to the JSP and trying to access their
property i JSP with bean tag.

I have a class as follow

Class TransferInfo {
  private Transmission transmission; //My transmission object
  private User user; //My user object
  private List<Files> fileList; //list of my file object

  //Constructor, setter and getter methods
  ..........
}

In above Transmission, User and Files are another classes I have created
each with their attributes.

And in Action class I populate this TransferInfo class and send to
client in request object by request.setAttribute("transferList",
transferList);

Now in JSP I how should I get value of Transmission, User and File
object value and print them. Usually for simple class we write
<bean:write name="transferList" property="firstName" /> to print the
first name. In this case how to get the first name.

Can anyone help me in this?

Thanks,
Anjib





Attachment: user_212662.eml (zipped)
On 3/29/2012 10:58 AM, Anjib Mulepati wrote:
> Hi All,
>
> I am trying to pass COMPLEX bean to the JSP and trying to access their
> property i JSP with bean tag.
>
> I have a class as follow
>
> Class TransferInfo {
>   private Transmission transmission; //My transmission object
>   private User user; //My user object
>   private List<Files> fileList; //list of my file object
>
>   //Constructor, setter and getter methods
>   ..........
> }
>
> In above Transmission, User and Files are another classes I have
> created each with their attributes.
>
> And in Action class I populate this TransferInfo class and send to
> client in request object by request.setAttribute("transferList",
> transferList);
>
> Now in JSP I how should I get value of Transmission, User and File
> object value and print them. Usually for simple class we write
> <bean:write name="transferList" property="firstName" /> to print the
> first name. In this case how to get the first name.
>
> Can anyone help me in this?
>
> Thanks,
> Anjib
>
>
>
I got the answer for accessing property of first two types. I did
<bean:write name="transferList" property="userInfo.firstName" />
Now my problem is on third type since it itself is an List. How can I
run iterator or iterator?



Attachment: user_212663.eml (zipped)
Hi..

Wonder if I can get some advice/suggestions..

Has anyone used Drupal and Struts together? Drupal is a CMS for managing content/web features. I have a user that wants to use Drupal. Our application uses Struts; anyway to combine the two.

Pretty much using Drupal as the View? Any ideas how to do so? I was thinking about Struts pointing to PHP; but then you lose the power of JSP/JSTL/Forms/etc?

If not does anyone know of a CMS that integrates easily with struts?

Thanks,

Tony


Attachment: user_212664.eml (zipped)
Define "integrates"; Alfresco has a pretty flexible API.

Using Drupal and Struts together seems a bit nonsensical to me, but I'm not
familiar with its API (or if it has one). Bear in mind that even without an
API you can always just make requests, or wrap its DB, or...

Dave

On Thu, Mar 29, 2012 at 2:07 PM, Santinello, Anthony <
anthony.santinello@(protected):

> Hi..
>
> Wonder if I can get some advice/suggestions..
>
> Has anyone used Drupal and Struts together? Drupal is a CMS for managing
> content/web features. I have a user that wants to use Drupal. Our
> application uses Struts; anyway to combine the two.
>
> Pretty much using Drupal as the View? Any ideas how to do so? I was
> thinking about Struts pointing to PHP; but then you lose the power of
> JSP/JSTL/Forms/etc?
>
> If not does anyone know of a CMS that integrates easily with struts?
>
> Thanks,
>
> Tony
>
>

Attachment: user_212665.eml (zipped)
Tony,

can Drupal consume json data easily? You probably can use Struts as
some kind of "data layer" which delivers only json data.
You might want to look at Quercus:
http://quercus.caucho.com/

Quercus is a Java implementation of PHP. It might serve Drupal, and
this way you might have a chance to access Java Klasses from PHP.
But you will still loose JSP et al - this would be a php domain then.

If using Quercus I can only recommend using the whole Resin server...
while Quercus might run on other servers, it is a bit pita to get it
running there.

Cheers
Christian

On Thu, Mar 29, 2012 at 8:07 PM, Santinello, Anthony
<anthony.santinello@(protected):
> Hi..
>
> Wonder if I can get some advice/suggestions..
>
> Has anyone used Drupal and Struts together?  Drupal is a CMS for managing content/web features.  I have a user that wants to use Drupal.  Our application uses Struts; anyway to combine the two.
>
> Pretty much using Drupal as the View? Any ideas how to do so? I was thinking about Struts pointing to PHP; but then you lose the power of JSP/JSTL/Forms/etc?
>
> If not does anyone know of a CMS that integrates easily with struts?
>
> Thanks,
>
> Tony
>



--
http://www.grobmeier.de
https://www.timeandbill.de


Attachment: user_212666.eml (zipped)
I define "integrating" by limited changes to our Struts Framework(model/view/controller) in order to use Drupal.


And yes I agree with you in terms on nonsensical. Many member of the Drupal community will also agree with you.

But I'm stuck trying to get Drupal because my marketing team wants to use it. I could be wrong; but from what I read on the Drupal forums there is not a Java API.


The only way I see it possibly working is having PHP making calls to the back-end logic via some web-service? And try to re-use the code/business logic we used for Struts?


Might be way off on this?

-----Original Message-----
From: Dave Newton [mailto:davelnewton@(protected)]
Sent: Thursday, March 29, 2012 1:17 PM
To: Struts Users Mailing List
Subject: Re: Struts/CMS/Drupal

Define "integrates"; Alfresco has a pretty flexible API.

Using Drupal and Struts together seems a bit nonsensical to me, but I'm not familiar with its API (or if it has one). Bear in mind that even without an API you can always just make requests, or wrap its DB, or...

Dave

On Thu, Mar 29, 2012 at 2:07 PM, Santinello, Anthony < anthony.santinello@(protected):

> Hi..
>
> Wonder if I can get some advice/suggestions..
>
> Has anyone used Drupal and Struts together? Drupal is a CMS for
> managing content/web features. I have a user that wants to use
> Drupal. Our application uses Struts; anyway to combine the two.
>
> Pretty much using Drupal as the View? Any ideas how to do so? I was
> thinking about Struts pointing to PHP; but then you lose the power of
> JSP/JSTL/Forms/etc?
>
> If not does anyone know of a CMS that integrates easily with struts?
>
> Thanks,
>
> Tony
>
>


Attachment: user_212667.eml (zipped)
>
> But I'm stuck trying to get Drupal because my marketing team wants to use
> it. I could be wrong; but from what I read on the Drupal forums there is
> not a Java API.
>

There doesn't need to be, if there's something RESTful--I know nothing
about Drupal, so I'm useless with regards to anything Drupaly.


> The only way I see it possibly working is having PHP making calls to the
> back-end logic via some web-service? And try to re-use the code/business
> logic we used for Struts?
>

If the Struts code has an API then PHP could access it like any other web
service.

It really depends on what you're trying to integrate, and what it really
means. It sounds more like you're asking "where do I create the
integration", in the Struts app, or the Drupal app. That I don't know--it
depends on what has the easiest access/integration points, what you're most
familiar with, what the client's needs are, etc.

You're a bit limited in that they're insisting on Drupal--if they want to
do everything through Drupal then your best bet may be to hook in to your
Struts app through that.

Dave

Attachment: user_212668.eml (zipped)
On Thu, Mar 29, 2012 at 8:32 PM, Santinello, Anthony
<anthony.santinello@(protected):
> The only way I see it possibly working is having PHP making calls to the back-end logic via some web-service?  And try to re-use the code/business logic  we used for Struts?

Thats possible, if you don't use tools like Quercus.

You can use the JSON Plugin for that. Its bundled
http://struts.apache.org/2.3.1.2/docs/json-plugin.html

Or you use this plugin:
https://github.com/grobmeier/jjson

Cheers



>
>
> Might be way off on this?
>
> -----Original Message-----
> From: Dave Newton [mailto:davelnewton@(protected)]
> Sent: Thursday, March 29, 2012 1:17 PM
> To: Struts Users Mailing List
> Subject: Re: Struts/CMS/Drupal
>
> Define "integrates"; Alfresco has a pretty flexible API.
>
> Using Drupal and Struts together seems a bit nonsensical to me, but I'm not familiar with its API (or if it has one). Bear in mind that even without an API you can always just make requests, or wrap its DB, or...
>
> Dave
>
> On Thu, Mar 29, 2012 at 2:07 PM, Santinello, Anthony < anthony.santinello@(protected):
>
>> Hi..
>>
>> Wonder if I can get some advice/suggestions..
>>
>> Has anyone used Drupal and Struts together?  Drupal is a CMS for
>> managing content/web features.  I have a user that wants to use
>> Drupal.  Our application uses Struts; anyway to combine the two.
>>
>> Pretty much using Drupal as the View? Any ideas how to do so? I was
>> thinking about Struts pointing to PHP; but then you lose the power of
>> JSP/JSTL/Forms/etc?
>>
>> If not does anyone know of a CMS that integrates easily with struts?
>>
>> Thanks,
>>
>> Tony
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>



--
http://www.grobmeier.de
https://www.timeandbill.de


Attachment: user_212669.eml (zipped)
Christian -- I'll have to check it out some more. I have heard of quercus as a possible option. Just have to try it.

So..Struts would call PHP pages using quercus instead of JSP pages?

Or it sounds like what your saying is the PHP would make requests to Struts that would do the business logic and return data(json/xml) to the PHP to process; am I close? But it sounds like I would lose the dynamic nature of JSP pages?

Thanks for you help.

--
Tony

-----Original Message-----
From: Christian Grobmeier [mailto:grobmeier@(protected)]
Sent: Thursday, March 29, 2012 1:20 PM
To: Struts Users Mailing List
Subject: Re: Struts/CMS/Drupal

Tony,

can Drupal consume json data easily? You probably can use Struts as some kind of "data layer" which delivers only json data.
You might want to look at Quercus:
http://quercus.caucho.com/

Quercus is a Java implementation of PHP. It might serve Drupal, and this way you might have a chance to access Java Klasses from PHP.
But you will still loose JSP et al - this would be a php domain then.

If using Quercus I can only recommend using the whole Resin server...
while Quercus might run on other servers, it is a bit pita to get it running there.

Cheers
Christian

On Thu, Mar 29, 2012 at 8:07 PM, Santinello, Anthony <anthony.santinello@(protected):
> Hi..
>
> Wonder if I can get some advice/suggestions..
>
> Has anyone used Drupal and Struts together?  Drupal is a CMS for managing content/web features.  I have a user that wants to use Drupal.  Our application uses Struts; anyway to combine the two.
>
> Pretty much using Drupal as the View? Any ideas how to do so? I was thinking about Struts pointing to PHP; but then you lose the power of JSP/JSTL/Forms/etc?
>
> If not does anyone know of a CMS that integrates easily with struts?
>
> Thanks,
>
> Tony
>



--
http://www.grobmeier.de
https://www.timeandbill.de

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


Attachment: user_212670.eml (zipped)
On Thu, Mar 29, 2012 at 8:39 PM, Santinello, Anthony
<anthony.santinello@(protected):
> Christian -- I'll have to check it out some more.  I have heard of quercus as a possible option.  Just have to try it.
>
> So..Struts would call PHP pages using quercus instead of JSP pages?
>
> Or it sounds like what your saying is the PHP would make requests to Struts that would do the business logic and return data(json/xml) to the PHP to process; am I close?  But it sounds like I would lose the dynamic nature of JSP pages?

In the Quercus case:

Web Request -> Drupal/PHP -> Struts classes

You would be able to reuse you java classes, but you also might loose
the Struts interceptor stack.

In JSON/Rest case:

Web Request -> Drupal/PHP -> web request-> Struts action

You would keep your Struts interceptors here. And you have not the
pain with Quercus (which can be complex sometimes)

The problem is, Drupal does use its own database with content. You
would have to work that all up and redirect to Struts. To be honest,
this all is pretty challenging. My guess is, if you use Drupal for CMS
work, then you will not manage to get the Data to your Struts app
without pain. You have only a serious chance if struts delivers
business data (facts, user data whatever) and Drupal manages the CMS
stuff. But then you have two databases....

Guess you'll have a lot of fun pretty soon.


>
> Thanks for you help.
>
> --
> Tony
>
> -----Original Message-----
> From: Christian Grobmeier [mailto:grobmeier@(protected)]
> Sent: Thursday, March 29, 2012 1:20 PM
> To: Struts Users Mailing List
> Subject: Re: Struts/CMS/Drupal
>
> Tony,
>
> can Drupal consume json data easily? You probably can use Struts as some kind of "data layer" which delivers only json data.
> You might want to look at Quercus:
> http://quercus.caucho.com/
>
> Quercus is a Java implementation of PHP. It might serve Drupal, and this way you might have a chance to access Java Klasses from PHP.
> But you will still loose JSP et al - this would be a php domain then.
>
> If using Quercus I can only recommend using the whole Resin server...
> while Quercus might run on other servers, it is a bit pita to get it running there.
>
> Cheers
> Christian
>
> On Thu, Mar 29, 2012 at 8:07 PM, Santinello, Anthony <anthony.santinello@(protected):
>> Hi..
>>
>> Wonder if I can get some advice/suggestions..
>>
>> Has anyone used Drupal and Struts together?  Drupal is a CMS for managing content/web features.  I have a user that wants to use Drupal.  Our application uses Struts; anyway to combine the two.
>>
>> Pretty much using Drupal as the View? Any ideas how to do so? I was thinking about Struts pointing to PHP; but then you lose the power of JSP/JSTL/Forms/etc?
>>
>> If not does anyone know of a CMS that integrates easily with struts?
>>
>> Thanks,
>>
>> Tony
>>
>
>
>
> --
> http://www.grobmeier.de
> https://www.timeandbill.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>



--
http://www.grobmeier.de
https://www.timeandbill.de

©2008 gg3721.com - Jax Systems, LLC, U.S.A.