Re: how do you bypass struts file upload functionality?

2009-02-26 Thread Dave Newton

John Dell'Aera wrote:

I have a file upload application that I'm porting to struts from my custom 
framework.
I would like to continue using the jakarta file upload api so that I do not 
have to modify
my file uploader class. Is there a way to bypass the struts file upload 
functionality?


Should just be able to take out the "fileUpload" interceptor from your 
interceptor stack, if you're dead-set on doing it manually.


Dave

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



s:checkboxlist

2009-02-26 Thread konf
  BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px;
}Hallo,
 is there any way to set that all items (checkboxes) in
s:checkboxlist are in their own line, one checkbox under other.
 Defaultly they are all on the same line and I cannot find the way
how to set that each one checkbox has to have their own line :-(
 Thanks, Jiri


Please help to get Arabic i18n(internationalization) using struts2.1.6

2009-02-26 Thread sajidbigler

Hi Friends,
I tried struts2-blank-2.1.6.war example and its working fine.but when i
tried to make it arabic locale i am not able to make it :(

with reference to below link i am also facing same problem for Arabic.plz
help! 

http://mail-archives.apache.org/mod_mbox/struts-issues/200902.mbox/%3c404086922.1233610965824.javamail.j...@brutus%3e

Thanks & Trgards,
Sajid
-- 
View this message in context: 
http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp2312p2312.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



RE: Struts 2 Architecture - Best Practices...

2009-02-26 Thread Mileidys Gonzalez Prieto
Hi, some days ago I was also worry about how big is my Struts+Hibernate
project, and a plus... need to grow much more... then, I started to look for
solutions on the web. 
I'm using MyEclipse, and it provides a enterprise application that really
looks interesting, I just started to read about that, then I don’t have a
lot to say, but looks like u can divide your large application is small one,
everything related by an EAR project, by default in the way:
EAR Project + EJB Project (Hibernate I think can be there) + Web Project
(Struts can be here)

Hope the idea will help...


Mileidys González Prieto
Consultant
i-Frontier
 
Henck Arronstraat 16 | P.O.Box 12858 | Paramaribo, Suriname (SA)
Office: (597)-424073 | Mobile: (597)-8810219
www.i-frontier.net


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



S2 REST plugin URL mapping convention

2009-02-26 Thread ManiKanta G
Hi,

In S2 REST plugin, the url mapping convention is POST for create, PUT for
update (as with the Rails style).

But from Sun tuts (
http://java.sun.com/developer/technicalArticles/WebServices/restful/) I see
POST for update, PUT for create.
I observed similar behavior in lot many frameworks/applications (ex: Orbeon
forms, on which I m currently working).

Which convention is correct or at least meaningful?

Thanks,
ManiKanta G
Twitter/manikantag 


Re: S2 REST plugin URL mapping convention

2009-02-26 Thread ManiKanta G
Hmm... I found this two different behaviors in the S2 documentation itself.
POST -> create , PUT -> update:
http://struts.apache.org/2.x/docs/rest-plugin.html

PUT -> create, POST -> update:
http://cwiki.apache.org/S2PLUGINS/restful-crud-for-html-methods.html

which one to choose? confused!

Thanks,
ManiKanta G
Twitter/manikantag 


Re: s:checkboxlist

2009-02-26 Thread Jim Kiley
The way I solved this was to add my own theme, and change the xhtml theme's
"checkboxlist" template to match what I wanted 'my' checkboxlist to do.
Under the root of your web app, add a directory named "template".  Under
"template" add a directory called "myapp".  Then copy checkboxlist.ftl out
of the Struts jar into template/myapp, and modify it as you wish.  Finally,
in your JSP, do 

This comes up fairly often -- I am happy to add it to the FAQ if someone can
tell me how I do that.
jk

On Thu, Feb 26, 2009 at 5:46 AM,  wrote:

>  BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px;
> }Hallo,
>  is there any way to set that all items (checkboxes) in
> s:checkboxlist are in their own line, one checkbox under other.
>  Defaultly they are all on the same line and I cannot find the way
> how to set that each one checkbox has to have their own line :-(
>  Thanks, Jiri
>



-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com


Re: FreeMarker error when trying to use AJAX Theme

2009-02-26 Thread mitch gorman
Ignacio de Córdoba wrote:
> I see actionerror.ftl exists for simple theme but not for ajax theme. Any
> workarrounds?
>   
i don't have a solution to your actual problem, but the issue you
note in the sentence above is actually not an issue.  if a template
doesn't explicitly exist for a theme, the theme's parent is checked, and
so on.  so for actionerror.ftl, it'd first look for it within ajax.  if
not found there, it'll look in the xhtml theme.  if it's not there
either, it'll look in the simple theme.

of course, if it's not there, either, then you're well and truly
screwed... ;)

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



RE: Struts 2.1.6 - custom interceptor

2009-02-26 Thread Prasad M
Dear Greg Lindholm,

Thanks so much. I could make it work with preresultlistener. Really Cool.

Dear Lukasz Lenar,

Thanks so much. So, I understand that the result has been created before it
reaches the post invoke in interceptor.


But, I still wonder with a question as to why this cannot happen simply? I
mean, without a preresultlistener.



Ok. My next question is as follows (in further to the same post invoke in
interceptor):
(I want to illustrate with a simple example)

1) I want to decorate a string property of action.
2) The interceptor will add for example, "$" before the value of property.
3*) I am against adding any method in action. No logic will go in action
class.
4) My interceptor will pick up the action property, modify it in invoke()
method, itself.
5) So, when I want to decorate, I add my interceptor in struts.xml for this
action.
6) My interceptor needs to pick up a property from action and decorate it.
(In post action invoke())

Please let me know.

Thanks so much.

Regards,
Prasad

-Original Message-
From: Greg Lindholm [mailto:glindh...@yahoo.com] 
Sent: Monday, February 09, 2009 11:47 PM
To: user@struts.apache.org
Subject: Re: Struts 2.1.6 - custom interceptor


Take a look at PreResultListener

http://struts.apache.org/2.x/docs/preresultlistener.html


Lukasz Lenart wrote:
> 
> 2009/2/9 Prasad Mangina :
>> Dear All,
>>
>> i have programmed a simple (custom) interceptor.
>>
>> placed logic in post action invocation.
>>
>> public String doIntercept(ActionInvocation invocation) throws Exception {
>>
>>Object action = invocation.getAction();
>>
>>String ret = invocation.invoke();
>>
>>if (action instanceof MyAware) {
>>
>>((MyAware) action).callme();
>>
>>}
>>
>>return ret;
>>
>> }
>>
>> in Action's "callme()" method, I am setting action's var (this var
>> has
>> getter and setter).
>>
>> In my velocity vm file, I am accessing this action's var.
>>
>> $myvar
>>
>> By default, the action's property would be placed in valuestack and,
>> could
>> be accessed from velocity page.
>>
>> Hmmm, this is not showing up in the velocity page.
>>
>> If, this is in pre action invocation, $myvar 's value gets displayed .
>> Only,
>> when this goes into post action invocation, it is not showing up...
>>
>> Any clues?
> 
> After you call invoke(), result (jsp, vm, etc) was already generated,
> that because your call to callme() is not working
> 
> 
> Regards
> -- 
> Lukasz
> http://www.lenart.org.pl/
> 
> -
> 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/Struts-2.1.6---custom-interceptor-tp21910825p21918703.
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 additional commands, e-mail: user-h...@struts.apache.org



getText from an interceptor

2009-02-26 Thread Security Management
I have LoggedInInterceptor.java and LoggedInInterceptor.properties in a
package, how do I use getText from the interceptor to read from the
properties file?




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



Re: how do you bypass struts file upload functionality?

2009-02-26 Thread John Dell'Aera

Hello Dave.

Thanks for your response. I'm using Struts 1 at the moment.
Soon enough I will try Struts 2. But for now I want to finish learning 
Struts 1.


How do you "intercept" the file upload mechanism in Struts 1?
Do I have to modify the source to ignore multipart/form-data encoded 
requests?


John

PS. I'm considering using a FileUploadServlet just for the file upload 
request.



--
From: "Dave Newton" 
Sent: Thursday, February 26, 2009 1:49 AM
To: "Struts Users Mailing List" 
Subject: Re: how do you bypass struts file upload functionality?


John Dell'Aera wrote:
I have a file upload application that I'm porting to struts from my 
custom framework.
I would like to continue using the jakarta file upload api so that I do 
not have to modify
my file uploader class. Is there a way to bypass the struts file upload 
functionality?


Should just be able to take out the "fileUpload" interceptor from your 
interceptor stack, if you're dead-set on doing it manually.


Dave

-
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



Problem with store interceptor

2009-02-26 Thread Security Management
Here's my struts.xml, partially





AUTOMATIC















 
 
home 
  /default 
 



Here's my LoggedInInteceptor code:

public String intercept(ActionInvocation ai) throws Exception
{
if(this.getSession() == null)
{
throw new Exception("Session is null");
}

if(this.getSession().get("username") != null)
{
String res = ai.invoke();
return res;

}
else
{
l.warn("LoggedInInterceptor didn't see a seession
username");
addActionError(ai, "You must be authenticated to access this
page");
return "login";
}
}

private void addActionError(ActionInvocation invocation, String message)
{
Object action = invocation.getAction();
if(action instanceof ValidationAware)
{
l.warn("Adding error message");
((ValidationAware) action).addActionError(message);
}
else
{
l.error("Action is not ValidationAware...");
}
}


I see in the catalina.out that it's adding an action error, but the redirect
action is stripping it (store interceptor should be saving/reload it,
right??), and it's not showing up after the global result runs and redirects
to the home action.

Any ideas?


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



Re: how do you bypass struts file upload functionality?

2009-02-26 Thread Nils-Helge Garli Hegvik
I think you can customize file uploading by using the "multipartClass"
in the controller configuration [1].

Nils-H

[1] - 
http://struts.apache.org/1.3.10/userGuide/configuration.html#controller_config

On Thu, Feb 26, 2009 at 7:23 PM, John Dell'Aera  wrote:
> Hello Dave.
>
> Thanks for your response. I'm using Struts 1 at the moment.
> Soon enough I will try Struts 2. But for now I want to finish learning
> Struts 1.
>
> How do you "intercept" the file upload mechanism in Struts 1?
> Do I have to modify the source to ignore multipart/form-data encoded
> requests?
>
> John
>
> PS. I'm considering using a FileUploadServlet just for the file upload
> request.
>
>
> --
> From: "Dave Newton" 
> Sent: Thursday, February 26, 2009 1:49 AM
> To: "Struts Users Mailing List" 
> Subject: Re: how do you bypass struts file upload functionality?
>
>> John Dell'Aera wrote:
>>>
>>> I have a file upload application that I'm porting to struts from my
>>> custom framework.
>>> I would like to continue using the jakarta file upload api so that I do
>>> not have to modify
>>> my file uploader class. Is there a way to bypass the struts file upload
>>> functionality?
>>
>> Should just be able to take out the "fileUpload" interceptor from your
>> interceptor stack, if you're dead-set on doing it manually.
>>
>> Dave
>>
>> -
>> 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
>
>

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



how to Validate tabular input.

2009-02-26 Thread dippedingold

I want to make a tabular input along with validation.
For example:
IN JSP:

<% for (int i=0;i<=someBussinessLogicResultSet.size();i++) { %>
 
<% } %>


Then in Action I wrote:

@Validation
public myaction extends ActionSupport{

public String execute()
{
return SUCCESS;
}

@RequiredStringValidation(message="Please enter value in text box")
public void getMytext() {return mytext;}

public void setMytext(List mytext) {this.mytext=mytext;}

private List mytext;

}


I know the above code will not work unless i remove the validations.
But however if I need a validation so that a error message is displayed on
only those text fields which are left empty by the user, how can I do so??

Although just for note I am not using scriplet as shown above but my text
fiels are within display tags.
-- 
View this message in context: 
http://www.nabble.com/how-to-Validate-tabular-input.-tp22231696p22231696.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



Struts2 - Force it to ignore "empty string -> number" conversion error

2009-02-26 Thread Dmitriy Kuznetsov

Hi, everyone.

I am using Struts 2: action with parameters interceptor. My action has some
optional properties of type Short(e.g. "currency"). When i submit form, the
"currency" value arrived into Struts framework equals to empty string - "".

Struts 2 tries to construct Short value from empty string, fails and reports
validation error. It's inappropriate, since i want the property to be
optional. It would be absolutely perfect if the conversion error is simply
ignored and "currency" property value remains default (null).

I've googled the question, and found, that Struts2(more precisely, XWork)
supports it:

http://struts.apache.org/2.0.6/struts2-core/apidocs/com/opensymphony/xwork2/util/XWorkConverter.html
"...MessageFormat object) to see how a properly formatted date should be
displayed.

Any error that occurs during type conversion may or may not wish to be
reported. For example, reporting that the input "abc" could not be converted
to a number might be important. On the other hand, reporting that an empty
string, "", cannot be converted to a number might not be important -
especially in a web environment where it is hard to distinguish between a
user not entering a value vs. entering a blank value.

By default, all conversion errors are reported using the generic i18n
key..."

Well, yeah! It's really great! I know now, that it is possible with Struts
2. Cool. Very useful. :-D

The very-very small question remains: HOW? 
What should i do to force Struts 2 to ignore "empty string ->
java.lang.Short" conversion errors?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Struts2---Force-it-to-ignore-%22empty-string--%3E-number%22-conversion-error-tp22231780p22231780.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



Problem with file download.

2009-02-26 Thread jfputnam

I have followed serveral examples but still have an issue downloading a file
using an input stream. In IE7 when I try the download with text/plain
context type, the text is rendered in the html page. When I change the
contentType a file dialog folder pops up with open/open folder/ cancel no
save button.

There is also a popup window that says Internet Explorer cannot download
extractAccounting.action from localhost.  Internet Explorer was not able to
open this Internet site. The requested site is either unavailable or cannot
be found. Please try again later.

On firefox there is no file save dialog, just the text displayed.

I want to be able to generate .csv files and have the user be able to save
them on their pc.

The struts.xml entry is.



document.pdf
inputStream
filename="document.pdf"
1024




The action class is:


public class AccountingLink extends BestMatchActionSupport implements
PropertiesAware
{

private InputStream inputStream;

//
public String extractAccounting()
{


String text = "Converting String to InputStream Example";

try
{
inputStream = new ByteArrayInputStream(text.getBytes("UTF-8"));
}
catch (UnsupportedEncodingException e)
{
e.printStackTrace();
}


return SUCCESS;

}
//
public InputStream getInputStream()
  {
return inputStream;
  }

}


Any help with figuring out what the problem is and a solution is
appreciated.

---John Putnam

-- 
View this message in context: 
http://www.nabble.com/Problem-with-file-download.-tp22232119p22232119.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



RE: Problem with file download.

2009-02-26 Thread Security Management
Here's what I've used, note the contentDisposition.


image/jpg
  imageStream
  attachment;
filename="image.jpg"
  4096


-Original Message-
From: jfputnam [mailto:johnfput...@comcast.net] 
Sent: Thursday, February 26, 2009 2:49 PM
To: user@struts.apache.org
Subject: Problem with file download.


I have followed serveral examples but still have an issue downloading a file
using an input stream. In IE7 when I try the download with text/plain
context type, the text is rendered in the html page. When I change the
contentType a file dialog folder pops up with open/open folder/ cancel no
save button.

There is also a popup window that says Internet Explorer cannot download
extractAccounting.action from localhost.  Internet Explorer was not able to
open this Internet site. The requested site is either unavailable or cannot
be found. Please try again later.

On firefox there is no file save dialog, just the text displayed.

I want to be able to generate .csv files and have the user be able to save
them on their pc.

The struts.xml entry is.



document.pdf
inputStream
filename="document.pdf"
1024




The action class is:


public class AccountingLink extends BestMatchActionSupport implements
PropertiesAware
{

private InputStream inputStream;

//--
--
public String extractAccounting()
{


String text = "Converting String to InputStream Example";

try
{
inputStream = new ByteArrayInputStream(text.getBytes("UTF-8"));
}
catch (UnsupportedEncodingException e)
{
e.printStackTrace();
}


return SUCCESS;

}
//--
--
public InputStream getInputStream()
  {
return inputStream;
  }

}


Any help with figuring out what the problem is and a solution is
appreciated.

---John Putnam

-- 
View this message in context:
http://www.nabble.com/Problem-with-file-download.-tp22232119p22232119.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 additional commands, e-mail: user-h...@struts.apache.org



Re: value truncated

2009-02-26 Thread Dravid

Any thoughts

thanks in advance


-- 
View this message in context: 
http://www.nabble.com/value-truncated-tp22211336p22233327.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



Re: value truncated

2009-02-26 Thread Jim Kiley
My uncle had his value truncated back in the war.  He doesn't like to talk
about it much.
Oh your actual question.  Have you tried escaping the quote marks?  Using \"
instead of just " ?

jk

On Thu, Feb 26, 2009 at 3:47 PM, Dravid  wrote:

>
> Any thoughts
>
> thanks in advance
>
>
> --
> View this message in context:
> http://www.nabble.com/value-truncated-tp22211336p22233327.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
>
>


-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com


javax.servlet.jsp.JspException: Cannot find bean under name

2009-02-26 Thread hermann . x . lau
Hi,

I am receiving this exception on my portlet what am I missing?
ServletWrappe E   SRVE0068E: Uncaught exception thrown in one of the 
service methods of the servlet: SPSInventory Portlet
. Exception thrown : javax.servlet.ServletException: 
javax.portlet.PortletException: javax.servlet.jsp.JspException: Cannot 
find bean under name locationList
at 
com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:361)
at 
com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:82)


Here is the main body in index.jsp:




Location





Client Id





Stock Id












Here is part of my struts-config file:






  

























-
This communication is for informational purposes only. It is not
intended as an offer or solicitation for the purchase or sale of
any financial instrument or as an official confirmation of any
transaction. All market prices, data and other information are not
warranted as to completeness or accuracy and are subject to change
without notice. Any comments or statements made herein do not
necessarily reflect those of JPMorgan Chase & Co., its subsidiaries
and affiliates.

This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect
that might affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by JPMorgan Chase &
Co., its subsidiaries and affiliates, as applicable, for any loss
or damage arising in any way from its use. If you received this
transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.

Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to UK legal entities.

Re: javax.servlet.jsp.JspException: Cannot find bean under name

2009-02-26 Thread Nils-Helge Garli Hegvik
Have you put a collection named "locationList" in some scope?

Nils-H

On Thu, Feb 26, 2009 at 10:01 PM,   wrote:
> Hi,
>
> I am receiving this exception on my portlet what am I missing?
> ServletWrappe E   SRVE0068E: Uncaught exception thrown in one of the
> service methods of the servlet: SPSInventory Portlet
> . Exception thrown : javax.servlet.ServletException:
> javax.portlet.PortletException: javax.servlet.jsp.JspException: Cannot
> find bean under name locationList
>        at
> com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:361)
>        at
> com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:82)
>        
>
> Here is the main body in index.jsp:
>         action="/searchInventory">
>        
>                
>                        
>                                Location
>                                 "1"
>                                        styleId="location">
>                                         "locationList" property="name" />
>                                
>                        
>                        
>                                Client Id
>                                 ="1">
>                                         "clientList" property="name" />
>                                
>                        
>                        
>                                Stock Id
>                                 ="field1"
>                                        onfocus="field1.select()" onblur=
> "setFocus()" />
>                        
>                        
>                                 "Submit" />
>                                
>                        
>                
>        
>        
> 
>
>
> Here is part of my struts-config file:
>        
>        
>                 "com.chase.adf.cpcinventory.forms.RequestFormBean">
>                
>        
>
>      
>        
>                
>                
>        
>
>        
>        
>                 scope="session" type=
> "com.chase.adf.cpcinventory.actions.SearchInventoryAction">
>                        
>                        
>                         path="/failure.jsp">
>                        
>                         "noResultsFound" path="/noResults.jsp">
>                        
>                         "multipleResultsFound" path="/summaryResults.jsp">
>                        
>                
>                 "session" type="com.chase.adf.cpcinventory.actions.GetSearchAction">
>                        
>                        
>                        
>                        
>                
>        
>
> -
> This communication is for informational purposes only. It is not
> intended as an offer or solicitation for the purchase or sale of
> any financial instrument or as an official confirmation of any
> transaction. All market prices, data and other information are not
> warranted as to completeness or accuracy and are subject to change
> without notice. Any comments or statements made herein do not
> necessarily reflect those of JPMorgan Chase & Co., its subsidiaries
> and affiliates.
>
> This transmission may contain information that is privileged,
> confidential, legally privileged, and/or exempt from disclosure
> under applicable law. If you are not the intended recipient, you
> are hereby notified that any disclosure, copying, distribution, or
> use of the information contained herein (including any reliance
> thereon) is STRICTLY PROHIBITED. Although this transmission and any
> attachments are believed to be free of any virus or other defect
> that might affect any computer system into which it is received and
> opened, it is the responsibility of the recipient to ensure that it
> is virus free and no responsibility is accepted by JPMorgan Chase &
> Co., its subsidiaries and affiliates, as applicable, for any loss
> or damage arising in any way from its use. If you received this
> transmission in error, please immediately contact the sender and
> destroy the material in its entirety, whether in electronic or hard
> copy format. Thank you.
>
> Please refer to http://www.jpmorgan.com/pages/disclosures for
> disclosures relating to UK legal entities.

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



Re: value truncated

2009-02-26 Thread Adam Lister
This might not help you, but the simplest answer might be to avoid doing 
escaping, replacing, etc... and just make the value of your options be 
whatever unique identifier you have for that record in the db.  Then 
when the user posts this value, you can look it up again in your 
action.  If you don't have a unique identifier like that, use the index, 
re-retrieve the list, and grab the item at the correct index.




Dravid wrote:

Hi All,

I have a jsp page where I am using  html:select options.When the user
selects a option I am calling a 
JavaScript onchange to submit the form.

My problem is I have a list with  double quotes values which I am retrieving
from database.
eg: Account = "N" .I could not able to retrieve the the value as it is in
action class.It's get truncating to 
"Account =" not giving the "N" value.I want the value to be retrieved as it

is.
Please some one help me to solve this.
any help is highly appriciated.
thanks in advance.
  


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



Re: s:checkboxlist

2009-02-26 Thread Jiří Chaloupka

Hallo Jim,
perfect, thank you

Jiri

Jim Kiley napsal(a):
The way I solved this was to add my own theme, and change the xhtml 
theme's "checkboxlist" template to match what I wanted 'my' 
checkboxlist to do.


Under the root of your web app, add a directory named "template". 
 Under "template" add a directory called "myapp".  Then copy 
checkboxlist.ftl out of the Struts jar into template/myapp, and modify 
it as you wish.  Finally, in your JSP, do theme="myapp" .../>


This comes up fairly often -- I am happy to add it to the FAQ if 
someone can tell me how I do that.


jk

On Thu, Feb 26, 2009 at 5:46 AM, > wrote:


 BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px;
}Hallo,
 is there any way to set that all items (checkboxes) in
s:checkboxlist are in their own line, one checkbox under other.
 Defaultly they are all on the same line and I cannot find the way
how to set that each one checkbox has to have their own line :-(
 Thanks, Jiri




--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com



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



Trouble with an action mapping

2009-02-26 Thread laredotornado

Hi,

I'm using Struts 2.  I have this action-mapping ...




 
  
   


I first visit my page, http://localhost:7005/re/jsp/pcAccountLookup.jsp,
which submits a form to "/re/pcFlow.do".  Unfortunately, this is when I get
a 404 error.  What is wrong with the above or what steps can I take to
troubleshoot this error?

Thanks, - Dave

-- 
View this message in context: 
http://www.nabble.com/Trouble-with-an-action-mapping-tp22234833p22234833.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



Re: getText from an interceptor

2009-02-26 Thread Zarar Siddiqi
If your actions are extending ActionSupport than you can go like so:

public String intercept(ActionInvocation invocation) throws Exception {
   String message = ((ActionSupport)
invocation.getAction()).getText("resource.key")
   ...

}   


Zarar



On Thu, Feb 26, 2009 at 12:23 PM, Security Management
 wrote:
> I have LoggedInInterceptor.java and LoggedInInterceptor.properties in a
> package, how do I use getText from the interceptor to read from the
> properties file?
>
>
>
>
> -
> 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 Validate tabular input.

2009-02-26 Thread Greg Lindholm

I would really like to know the answer as well, how do you validate a list of
fields with annotations?

let me tweak your example a bit so it will at least work (before
validation).
(See http://struts.apache.org/2.x/docs/tabular-inputs.html)





public List getMytext() {return mytext;}
public void setMytext(List mytext) {this.mytext=mytext;}
private List mytext = new ArrayList();


dippedingold wrote:
> 
> I want to make a tabular input along with validation.
> For example:
> IN JSP:
> 
> <% for (int i=0;i<=someBussinessLogicResultSet.size();i++) { %>
>  
> <% } %>
> 
> 
> Then in Action I wrote:
> 
> @Validation
> public myaction extends ActionSupport{
> 
> public String execute()
> {
> return SUCCESS;
> }
> 
> @RequiredStringValidation(message="Please enter value in text box")
> public void getMytext() {return mytext;}
> 
> public void setMytext(List mytext) {this.mytext=mytext;}
> 
> private List mytext;
> 
> }
> 
> 
> I know the above code will not work unless i remove the validations.
> But however if I need a validation so that a error message is displayed on
> only those text fields which are left empty by the user, how can I do so??
> 
> Although just for note I am not using scriplet as shown above but my text
> fiels are within display tags.
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-Validate-tabular-input.-tp22231696p22237450.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



Re: how to Validate tabular input.

2009-02-26 Thread Wes Wannemacher
On Thursday 26 February 2009 20:04:55 Greg Lindholm wrote:
> I would really like to know the answer as well, how do you validate a list
> of fields with annotations?
>
> let me tweak your example a bit so it will at least work (before
> validation).
> (See http://struts.apache.org/2.x/docs/tabular-inputs.html)
>
> 
> 
> 
>
> public List getMytext() {return mytext;}
> public void setMytext(List mytext) {this.mytext=mytext;}
> private List mytext = new ArrayList();
>

The XML and annotation-based validation doesn't really have support for list-
based (or map-based) properties. With indexed properties, it's best to 
implement a 'validate' method on your action. 

Yes, it's a pain, but, before you file an improvement JIRA, I would suggest 
trying to come up with a patch. I know I, for one, have been patiently waiting 
on JSR-303 before I consider writing improvements to the validation framework.

-Wes

-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


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



Re: FreeMarker error when trying to use AJAX Theme

2009-02-26 Thread Ignacio de Córdoba

thanks for your reply...
If I understood you, then css theme actionerror.ftl or at least simple theme
actionerror.ftl should be picked and rendered. Can you think of the reason
for these templates not shown? (If seen more people with this same problem
asked in forums but now answer to them)

thanks,
Ignacio


mitch.gorman wrote:
> 
> Ignacio de Córdoba wrote:
>> I see actionerror.ftl exists for simple theme but not for ajax theme. Any
>> workarrounds?
>>   
> i don't have a solution to your actual problem, but the issue you
> note in the sentence above is actually not an issue.  if a template
> doesn't explicitly exist for a theme, the theme's parent is checked, and
> so on.  so for actionerror.ftl, it'd first look for it within ajax.  if
> not found there, it'll look in the xhtml theme.  if it's not there
> either, it'll look in the simple theme.
> 
> of course, if it's not there, either, then you're well and truly
> screwed... ;)
> 
> -
> 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/FreeMarker-error-when-trying-to-use-AJAX-Theme-tp22179332p22238727.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



Re: how do you bypass struts file upload functionality?

2009-02-26 Thread John Dell'Aera

Hello Nils-H.
Customizing multipartRequestProcessor seems really hard.
I modified RequestUtils instead. I commented out the usage of 
multipartHandler in method populate.
Now all my multipart/form-data requests are treated as 
non-multipart/form-data and I am able to upload
files without using struts build in upload lib. I'm able to use the jakarta 
file upload lib because the input stream is no longer parsed.



Is there a way to reference my version of RequestUtils  from the 
struts-config file?
The struts-config dtd documentation only specifies changes to 
multipartClass.
Can any class in the struts framework be overridden from the Controller 
Configuration element?

John

--
From: "Nils-Helge Garli Hegvik" 
Sent: Thursday, February 26, 2009 11:15 AM
To: "Struts Users Mailing List" 
Subject: Re: how do you bypass struts file upload functionality?


I think you can customize file uploading by using the "multipartClass"
in the controller configuration [1].

Nils-H

[1] - 
http://struts.apache.org/1.3.10/userGuide/configuration.html#controller_config


On Thu, Feb 26, 2009 at 7:23 PM, John Dell'Aera  
wrote:

Hello Dave.

Thanks for your response. I'm using Struts 1 at the moment.
Soon enough I will try Struts 2. But for now I want to finish learning
Struts 1.

How do you "intercept" the file upload mechanism in Struts 1?
Do I have to modify the source to ignore multipart/form-data encoded
requests?

John

PS. I'm considering using a FileUploadServlet just for the file upload
request.


--
From: "Dave Newton" 
Sent: Thursday, February 26, 2009 1:49 AM
To: "Struts Users Mailing List" 
Subject: Re: how do you bypass struts file upload functionality?


John Dell'Aera wrote:


I have a file upload application that I'm porting to struts from my
custom framework.
I would like to continue using the jakarta file upload api so that I do
not have to modify
my file uploader class. Is there a way to bypass the struts file upload
functionality?


Should just be able to take out the "fileUpload" interceptor from your
interceptor stack, if you're dead-set on doing it manually.

Dave

-
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




-
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: Please help to get Arabic i18n(internationalization) using struts2.1.6

2009-02-26 Thread Nuwan Chandrasoma

Hi,

you have to convert the arabic into Unicode and put to the message 
properties file,


Thanks,

Nuwan

sajidbigler wrote:

Hi Friends,
I tried struts2-blank-2.1.6.war example and its working fine.but when i
tried to make it arabic locale i am not able to make it :(

with reference to below link i am also facing same problem for Arabic.plz
help! 


http://mail-archives.apache.org/mod_mbox/struts-issues/200902.mbox/%3c404086922.1233610965824.javamail.j...@brutus%3e

Thanks & Trgards,
Sajid
  



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



Re: Please help to get Arabic i18n(internationalization) using struts2.1.6

2009-02-26 Thread sajidbigler


Hi Numan,

I am doing that by using following site http://www.utf.ru/tables/arabic.html
i am using sample example struts2-blank-2.1.6.war

HelloWorld.jsp



ar

Arabic


package_ar.properties

HelloWorld.message= ت
requiredstring = ${getText(fieldName)} ة.
password = تت   
username = جج   
Missing.message =؃

I iam sucessful to get it in tittle but not in page why? :(


-- 
View this message in context: 
http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp2312p22240539.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



Re: Please help to get Arabic i18n(internationalization) using struts2.1.6

2009-02-26 Thread sajidbigler

 Hi Nuwan,
Thanks a lot for your quick response.

I am doing that by using following site 

http://www.utf.ru/tables/arabic.html

i am using sample example struts2-blank-2.1.6.war

HelloWorld.jsp



ar

Arabic


package_ar.properties

HelloWorld.message= ت
requiredstring = ${getText(fieldName)} ة.
password = تت
username = جج
Missing.message =؃

I iam sucessful to get it in tittle but not in page why? :(.its like Arbic
is recognized in Action class i.e java like setMessage(getText(MESSAGE)); )
and even in validation framework as








above will also evaluate to proper arabic character but brower wont render
it properly if its from jsp like



I am using firefox and tools-options-advance-languages is to Arabic 
-- 
View this message in context: 
http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp2312p22240691.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



S2 REST xml de-serialization

2009-02-26 Thread ManiKanta G
Hi,

I m writing a REST service in S2 (using REST plugin) to store the data
received through xml snippet. But I m struck with the default behavior of
the plugin


http://www.w3.org/2001/xml-events"; xmlns:xforms="
http://www.w3.org/2002/xforms"; xmlns:xhtml="http://www.w3.org/1999/xhtml";
xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:xxforms="
http://orbeon.org/oxf/xml/xforms";>


Harry Potter
J. K. Rowling
en
5
Story of a wizard kid


But when using REST default de-serialization, the  root node should
have fully qualified package name of the class. But in my case it is not
possible as I m getting only  (in fact as I m using Orbeon forms, the
instance will be submitted to the service in the above format).

Is it possible to alter that behavior?

Thanks,
ManiKanta G
Twitter/manikantag