@struts.apache.org
[mailto:user-return-202452-indika=rezgateway@struts.apache.org] On
Behalf Of Indika Maligaspe
Sent: Monday, September 21, 2009 7:46 AM
To: 'Struts Users Mailing List'
Subject: RE: How to read an XML request from struts
I would also like to know what Martin has queried, if ther
: Sunday, September 20, 2009 8:33 PM
To: Struts Users Mailing List
Subject: RE: How to read an XML request from struts
Tommy/Wes
is there any way to autodetect which converter to use for jibx?
public static final String contentTypeXML = "text/xml; charset=UTF-8;
type=jibx";thanks,
Mar
e pouvons accepter aucune responsabilité
pour le contenu fourni.
> Date: Sun, 20 Sep 2009 10:56:57 -0400
> Subject: Re: How to read an XML request from struts
> From: w...@wantii.com
> To: user@struts.apache.org
>
> A good struts-y way to do it would be to create a converter
A good struts-y way to do it would be to create a converter that can
convert the xml to an instance of your business object, maybe using
xstream or jixb. Then set a field on your action of the said business
type an configure the converter for that action.
-Wes
On 9/20/09, Tommy Pham wrote:
> --
- Original Message
> From: indikamaligaspe
> To: user@struts.apache.org
> Sent: Friday, September 18, 2009 10:53:48 AM
> Subject: How to read an XML request from struts
>
>
> Hi,
>
> I have situation where some users will be posting an XML message (using a
> java client) and some HTML
Thank you so much
-kirti
--
View this message in context:
http://www.nabble.com/how-to-read-the-contents-of-uploaded-file-tp25384149p25395100.html
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsubscri
It's really not related to struts... Struts has done it's job in your
case, now it's time for you to use other techniques commonly referred
to as "programming" :)
Since you are trying to read an excel spreadsheet, I would suggest you
look at the POI library and then just expose a bean or array of
Haven't tried it myself, so can only give you a couple of pointers. If
you're using the json plugin, there's a lot of information in the
documentation[1]. Other than that, use firebug or equivalent tool to
inspect the response and see how the json is formatted.
Nils-H
[1] - http://cwiki.apache.or
Great it works.
Thanks so much Musachy... :)
Manish.
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2008 10:51 PM
To: Struts Users Mailing List
Subject: Re: How to read struts2 constants in action class
use "@Inject"
use "@Inject".
@Inject("custom.myConstant")
public void setSomeString(String mystring) {...}
Things to note about that:
1. Struts needs to be the one creating your actions (no object factory from
an IoC, like Spring, Guice, etc)
2. This is not guaranteed to work in the future, but it is unlikely
private List checkBoxIds;
use bove List in Action;
You'll get some String about 'fieldValue' in Tag.
On Tue, Oct 21, 2008 at 4:34 AM, A. Lotfi <[EMAIL PROTECTED]> wrote:
> Hi,
> If you have a listbox and you selct items or all items and submit to an
> action, how to read the selected items in
Hi,
You can make it a I18N resource, read via getText("month") in action,
split in to an array and expose vie getter from action to jsp.
Regards
--
Lukasz
http://www.lenart.org.pl/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
F
Guys found the solution
Check the usage of nested tags that can handle any levels.
http://www.learntechnology.net/content/struts/struts_nested.jsp
Warm Regards
Ramachandra Reddy
-Original Message-
From: Reddy, Ramachandra (IS Consultant)
Sent: Thursday, June 26, 2008 12:44 PM
To:
If you simply want to open a personalised page when they return to
http://abc:8080/product, just save a cookie the first time they login so
you know who they are the next time they come back.
If you genuinely want to authenticate the user using their windows login
credentials:
On the server-si
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Ros,
ros wrote:
> I have to read form post in windows-1257 encoding.
> The request field AAA should be PAĻIV but it is PA?V
>
> How I can read special characters like Ļ Ā Ī and others?
Where are you seeing the string "PA?V" If you are seeing it in a
On 7/31/06, temp temp <[EMAIL PROTECTED]> wrote:
How to read the following code ?
boolean vIsForm = vWorkTypeId.equals(IFormflowWorkTypeIds.FORM);
String vWorkForwardName = MessageFormat.format("work={0}", new Object[]
{vWorkAlias});
String vForwardName = (aActionMapping.fin
Miro, which part are you confused with? I am assuming the third line
as it uses nested tertiary operators (the ? : bit).
It could be written otherwise as:
String vForwardName = "";
if (aActionMapping.findForward(vWorkForwardName) == null) {
if (visForm) {
vForwardName = "form";
}
else {
I've found Nick Heudecker's tutorial helpful
on this subject:
http://www.systemmobile.com/articles/strutsMessageResources.html
Ashutosh Satyam wrote:
> Hi,
> In my application I want to set the error key based on whether
> the error key is present in resource bundle. The error key is
> generat
See the Javadoc for Action. To get the resource bundle from your action:
http://struts.apache.org/api/org/apache/struts/action/Action.html#getResources(javax.servlet.http.HttpServletRequest)
You then have various options for retrieving specific messages:
http://struts.apache.org/api/org/apache/
Bill,
Thanks for the pointer. I have already downloaded the source and have
extended Struts successfully many times. The MessageResources thing was
something I couldn't quite get my head around, so I figured I'd ask the
experts. Now I have the code, it didn't seem so complicated after all.
Alan -- I strongly encourage you (if you haven't already) to download
the Struts source and use it as you develop. You will be amazed at how
much quicker you can grok Struts.
-Bill Siggelkow
Alan Pocklington wrote:
Oh okay, I'll look into that. Thanks for your help.
Hubert Rabago <[EMAIL PROT
getLocale(::HttpServletRequest) will get locale from session instead of request.
On Wed, 13 Oct 2004 15:54:02 + (UTC), Alan Pocklington
<[EMAIL PROTECTED]> wrote:
> Cheers for pointing that out. As of yet I don't need message arguments
> so that'll be fine.
>
> Was there any reason for havi
Oh okay, I'll look into that. Thanks for your help.
Hubert Rabago <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> Struts has some special treatment for locales. You'd wanna abide by
> that for consistency with what its internal engine uses for the
> resource files.
>
>
> On Wed, 13 Oc
Struts has some special treatment for locales. You'd wanna abide by
that for consistency with what its internal engine uses for the
resource files.
On Wed, 13 Oct 2004 15:54:02 + (UTC), Alan Pocklington
<[EMAIL PROTECTED]> wrote:
> Cheers for pointing that out. As of yet I don't need messag
Yup, right here:
/**
* Get the locale that will be used for a conversion operation.
*/
protected Locale getLocale(HttpServletRequest request) {
Locale locale = null;
// see if there's a locale present among the session attributes
HttpSession session = req
Cheers for pointing that out. As of yet I don't need message arguments
so that'll be fine.
Was there any reason for having a getLocale(request) method? I'm guessing
the implementation was different from just request.getLocale().
Hubert Rabago <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED
On Wed, 13 Oct 2004 10:38:09 -0500, Hubert Rabago <[EMAIL PROTECTED]> wrote:
> Yup, copy/paste from existing code works fast. :)
It's also not foolproof. This excerpt was specific to the needs of
the class I took it from. Check the getMessage() method -- it can
actually accept message arguments
In that case, do you have the existing code for the method
getLocale(request)? I haven't got my head around locales yet.
Hubert Rabago <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> Yup, copy/paste from existing code works fast. :)
>
>
> On Wed, 13 Oct 2004 15:35:24 + (UTC), Al
Yup, copy/paste from existing code works fast. :)
On Wed, 13 Oct 2004 15:35:24 + (UTC), Alan Pocklington
<[EMAIL PROTECTED]> wrote:
> Wow, thanks for the quick reply. Will do!
>
> Hubert Rabago <[EMAIL PROTECTED]> wrote in
> news:[EMAIL PROTECTED]:
>
>
>
> > Put this in a util class and
Wow, thanks for the quick reply. Will do!
Hubert Rabago <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> Put this in a util class and call evaluateMessage():
>
> /**
> * Evaluate the given message resource key.
> *
> * @param messageKey the name of the resource entry t
Put this in a util class and call evaluateMessage():
/**
* Evaluate the given message resource key.
*
* @param messageKey the name of the resource entry to retrieve
* @param bundle The key specified in the
* element for the
* resource bundle
M
To: Struts Users Mailing List
Subject: Re: How to read from web.xml?
Ivan Vasquez wrote:
>Hi,
>
>How can I read from web.xml, say, the application's display name? I've
>tried several things, but no luck. This isn't really Struts-specific,
>but I'm sure this is
Ivan Vasquez wrote:
Hi,
How can I read from web.xml, say, the application's display name? I've
tried several things, but no luck. This isn't really Struts-specific,
but I'm sure this is an easy one for many of you.
Thanks,
Ivan.
in an struts action you should be able to use:
getServlet().getServ
Ivan Vasquez wrote:
Hi,
How can I read from web.xml, say, the application's display name? I've
tried several things, but no luck. This isn't really Struts-specific,
but I'm sure this is an easy one for many of you.
Thanks,
Ivan.
The web.xml file is available as a resource that can be accessed vi
Thank you very much for your suggestions, Frank. That was really helpful.
From: "Frank Zammetti" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: RE: How to read a large XML file in the ActionServlet
Date:
I don't care how good of an XML parser you are using, parsing virtually any
XML file on a per-request basis is a Bad Idea (tm). You definitely want to
find a way to (a) store the parsed information in memory, or (b) maybe read
it from a database, which may or may not actually wind up being any
Frank,
You can use the following in your Action class:
String paramValue = this.servlet.getInitParameter("myParamName");
Thanks,
Venkat
-Original Message-
From: Frank Burns [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 19, 2004 8:19 PM
To: Struts Users Mailing List
Subject: How to
--Original Message-
> From: Iván Rodríguez [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 20, 2004 6:02 AM
> To: Struts Users Mailing List
> Subject: Re: How to read a parameter in web.xml from Action class
>
>
> Why don t you use JNDI ?
>
> - Original Message -
Why don t you use JNDI ?
- Original Message -
From: "Frank Burns" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, May 20, 2004 11:47 AM
Subject: Re: How to read a parameter in web.xml from Action class
Excellent. Thank you Ashutosh.
- Original Message -
From: "Ashutosh Satyam" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, May 20, 2004 6:40 AM
Subject: RE: How to read a parameter in web.xml from Action class
One
From: Ashutosh Satyam
Sent: Thursday, May 20, 2004 10:45 AM
To: Struts Users Mailing List
Subject: RE: How to read a parameter in web.xml from Action class
Try using the below mentioned code to read intialization parameter
defined in the Web descriptor file.
String sname = servle
[mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 8:59 AM
To: Struts Users Mailing List
Subject: Re: How to read a parameter in web.xml from Action class
Sorry, see my CORRECTION below:
- Original Message -
From: "Frank Burns" <[EMAIL PROTECTED]>
To: "Struts Use
Sorry, see my CORRECTION below:
- Original Message -
From: "Frank Burns" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, May 20, 2004 4:19 AM
Subject: How to read a parameter in web.xml from Action class
> Hi,
>
> From an Action class, I want to r
You could subclass the ActionServlet with your own instance that in its init
method reads the properties file...
I think this should do the trick, please fix the path when necessary:
Properties properties = new
Properties().load(MyActionServlet.getClass().getResourceAsStream("ApplicationResource
Try this (i think you can remove "logic:notEmpty") :
Be sure that you forward is a true forward (not a
redirect) or you will lose the attributes in your
request, ok ?
--- cacau_braga <[EMAIL PROTECTED]> escreveu: >
Hi All,
>
> This is my first message
45 matches
Mail list logo