Re: Localization in struts 2

2009-06-17 Thread Johnson nickel

I have tried to copy the properties files text and opening in notepad
while saving i had selected the encoding type as UTF-8. But still i'm not 
able to see the hindi text in browser.

And in my jsp i have added ,
 <%@ page language="java" pageEncoding="utf-8"
contentType="text/html;charset=utf-8"%> 




Girish Naik wrote:
> 
> Is the Hindi text specified in the file in UTF8 format? ie /u0092 etc.
> 
> 
> 
> Regards,
> -
> Girish Naik
> Mobile:-+91-09740091638
> girish.n...@gmail.com
> 
> Mitch
> Hedberg
> - "I drank some boiling water because I wanted to whistle."
> 
> On Thu, Jun 18, 2009 at 10:45 AM, Johnson nickel
> wrote:
> 
>>
>> Hi all,
>>
>>I have tried the Struts2i18n sample project it's working fine. But
>> i
>> need to
>> implement local language in the same manner. I have created
>> ResourceBundle_Hi.properties for
>> hindi language. I had specified the hindi text in this file. when i try
>> to
>> execute the application
>> it shows some नाम: or ???. It's not actually taken the proper
>> file.Give me a suggestions for this
>> issue
>> --
>> View this message in context:
>> http://www.nabble.com/Localization-in-struts-2-tp24086510p24086510.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
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Localization-in-struts-2-tp24086510p24087439.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



Load on startup servlet in glassfish initializing two times

2009-06-17 Thread ECLIPSE + CVS

Hi,

I have one problem in glassfish while i am specifying the load on start up
servlet; it is initializing two times.

ie:Print statement in the init method of the servlet is executing two times.

I need to look up all the ejb's while the server startup itself instead of
waiting for a request to the server.



My web.xml configuration is 
 
BootStrap
com.path.dcrms.login.BootStrap  
1
  

and my servlet is 


public class BootStrap extends HttpServlet{
public void init(ServletConfig config){
try {
ELogger.log("Server is going to initialize all system 
prerequisites",   
DcrmsConstants.SEVERE);

ELogger.log("Server is ready to process requests 
at"+new Date(),
DcrmsConstants.SEVERE);
}
catch (Exception ex) {
ex.printStackTrace();
System.out.println("Boot Strap failed"+ex);
}

}

}



I am using struts1.3.8+Hibernate with glass fish.

If anybody has any idea plz help me..

Thanks in advance

Crazy Worker.
-- 
View this message in context: 
http://www.nabble.com/Load-on-startup-servlet-in-glassfish-initializing-two-times-tp24087392p24087392.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: Localization in struts 2

2009-06-17 Thread Girish Naik
Is the Hindi text specified in the file in UTF8 format? ie /u0092 etc.



Regards,
-
Girish Naik
Mobile:-+91-09740091638
girish.n...@gmail.com

Mitch Hedberg
- "I drank some boiling water because I wanted to whistle."

On Thu, Jun 18, 2009 at 10:45 AM, Johnson nickel wrote:

>
> Hi all,
>
>I have tried the Struts2i18n sample project it's working fine. But i
> need to
> implement local language in the same manner. I have created
> ResourceBundle_Hi.properties for
> hindi language. I had specified the hindi text in this file. when i try to
> execute the application
> it shows some नाम: or ???. It's not actually taken the proper
> file.Give me a suggestions for this
> issue
> --
> View this message in context:
> http://www.nabble.com/Localization-in-struts-2-tp24086510p24086510.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
>
>


Localization in struts 2

2009-06-17 Thread Johnson nickel

Hi all,

I have tried the Struts2i18n sample project it's working fine. But i
need to
implement local language in the same manner. I have created
ResourceBundle_Hi.properties for
hindi language. I had specified the hindi text in this file. when i try to
execute the application
it shows some नाम: or ???. It's not actually taken the proper
file.Give me a suggestions for this
issue 
-- 
View this message in context: 
http://www.nabble.com/Localization-in-struts-2-tp24086510p24086510.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



drop down list not working after using validation.xml

2009-06-17 Thread Yanto
Hi,

We noted following error message in the screen after used the validation xml
file.

*org.apache.jasper.JasperException: tag 'select', field 'list', name
'entityInternalId': The requested list key 'entities' could not be resolved
as a collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unknown location]*

 without validation xml and application page showing dropdown coming
properly.
Jsp page

  

  





Validation.xml



validators>

 



Please select the entity







 



Please *keyin* the *username*









Please *keyin* the password








Any one help on this ?

Regards
Yanto


Re: STRUT2

2009-06-17 Thread Dave Newton

cmoreno wrote:

I have a problem with  tag. How can I use into this tag 's value
special characters like \r\n. 
I tried with escape attribute, but it isn't work. I tried to change \r\n

with  tag, but isn't work. If I look up into the source code the value
is ok (with line return) 

How can I resolve this? 


Whitespace gets invisibled by the browser. You need to use  tags 
and make sure the output isn't escaped in order to get linebreaks in the 
browser.


Dave

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



Re: STRUT2

2009-06-17 Thread Girish Naik
Can a  tag be useful?? 


Regards,
-
Girish Naik
Mobile:-+91-09740091638
girish.n...@gmail.com

Samuel Goldwyn
- "I'm willing to admit that I may not always be right, but I am never
wrong."

On Wed, Jun 17, 2009 at 10:40 PM, Jon Pearson wrote:

> Perhaps what you want is a ?
>
> > -Original Message-
> > From: cmoreno [mailto:cristina.moren...@gmail.com]
> > Sent: Wednesday, June 17, 2009 1:02 PM
> > To: user@struts.apache.org
> > Subject: STRUT2 
> >
> >
> > Hi
> > I have a problem with  tag. How can I use into
> > this tag 's value
> > special characters like \r\n.
> > I tried with escape attribute, but it isn't work. I tried to
> > change \r\n
> > with  tag, but isn't work. If I look up into the source
> > code the value
> > is ok (with line return)
> >
> > How can I resolve this?
> >
> > Thank you
> > --
> > View this message in context:
> > http://www.nabble.com/STRUT2-%3Cs%3Aproperty%3E-tp24077856p240
> > 77856.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: STRUT2

2009-06-17 Thread Jon Pearson
Perhaps what you want is a ? 

> -Original Message-
> From: cmoreno [mailto:cristina.moren...@gmail.com] 
> Sent: Wednesday, June 17, 2009 1:02 PM
> To: user@struts.apache.org
> Subject: STRUT2 
> 
> 
> Hi 
> I have a problem with  tag. How can I use into 
> this tag 's value
> special characters like \r\n. 
> I tried with escape attribute, but it isn't work. I tried to 
> change \r\n
> with  tag, but isn't work. If I look up into the source 
> code the value
> is ok (with line return) 
> 
> How can I resolve this? 
> 
> Thank you
> -- 
> View this message in context: 
> http://www.nabble.com/STRUT2-%3Cs%3Aproperty%3E-tp24077856p240
> 77856.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



STRUT2

2009-06-17 Thread cmoreno

Hi 
I have a problem with  tag. How can I use into this tag 's value
special characters like \r\n. 
I tried with escape attribute, but it isn't work. I tried to change \r\n
with  tag, but isn't work. If I look up into the source code the value
is ok (with line return) 

How can I resolve this? 

Thank you
-- 
View this message in context: 
http://www.nabble.com/STRUT2-%3Cs%3Aproperty%3E-tp24077856p24077856.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: Re-establish the Session

2009-06-17 Thread Rafael Taboada
Just for the record if someone else have same issue...

I had to rewrite the URL adding Session ID

uploadUrl: "doUploadFile.action;jsessionid=" + "",


On Tue, Jun 16, 2009 at 11:18 AM, Rafael Taboada
wrote:

> Hi,
>
> I have session recovering problem and I don't know how to do it, I hope you
> can help me.
>
> I use FileUploader to upload a file:
> http://www.sitepen.com/blog/2008/12/01/dojox-fileuploader-upgrade-to-support-flash-10/.
> It seems to upload the file but I have lost my session in my Action class
> and as a consequence I can't validate the user who uploaded the file.
>
> They say one solution could be sending the session ID to the server side
> and recover the session, but I don't know how to recover it in Struts2.
>
> *"The uploader not sending cookies is a Flash bug:
> **http://bugs.adobe.com/jira/browse/FP-201*
>
> *Headers can be sent in an UrlRequest Header, but I don’t know if it would
> work around your problem, as it is very restricted. The way I had done it in
> the past is to get the user and session IDs and pass those as vars along
> with the upload. That’s why I implemented the postVars in the latest
> version."*
>
> I can find the session ID before sending jsp upload form with:
>
> HttpSession session
>
> session.getId()
>
>  Thanks in advance for your help
>
> --
> Rafael Taboada
> Software Engineer
>
> Cell : +511-992741026
>
> "No creo en el destino pues no me gusta tener la idea de controlar mi vida"
>



-- 
Rafael Taboada
Software Engineer

Cell : +511-992741026

"No creo en el destino pues no me gusta tener la idea de controlar mi vida"


Re: Struts2 Jar on JBoss

2009-06-17 Thread raja_struts

Hi,

If you still not able to fix the issue. Please try copy the struts-tags.tld
file under \WEB-INF\lib folder.

Cheers,
Raja.

Hernandez, David wrote:
> 
> Hey Guys,
> 
> I'm trying to deploy several apps built with Struts2 that share a common
> lib directory. I'm running on JBoss. If I put all the jar's in the
> server lib directory everything compiles and deploys fine. If I go to an
> action it is executed, but when it attempts to read the jsp it fails to
> find the struts tld. See an excerpt from my log below:
> 
> 
> 2008-06-23 17:12:49,085 DEBUG
> [com.opensymphony.xwork2.util.InstantiatingNullHandler] Entering
> nullPropertyValue
> [target=[com.lehman.corpsec.web.updatedailycheckoutstatusxmlserv...@150b
> 99d, com.opensymphony.xwork2.defaulttextprovi...@162ac83], property=org]
> 2008-06-23 17:12:49,280 DEBUG
> [org.jboss.web.tomcat.service.jasper.TagLibCache] Scanning for tlds in:
> file:/home/nycco2q/jboss/eap4.2/deploy/jboss-web.deployer/jsf-libs/jsf-i
> mpl.jar
> 2008-06-23 17:12:49,420 DEBUG
> [org.jboss.web.tomcat.service.jasper.TagLibCache] Scanning for tlds in:
> file:/home/nycco2q/jboss/eap4.2/deploy/jboss-web.deployer/jstl.jar
> 2008-06-23 17:12:49,513 ERROR
> [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/CO2/Da
> ilyCheckout].[jsp]] Servlet.service() for servlet jsp threw exception
> org.apache.jasper.JasperException: File "/struts-tags" not found
> at
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
> ler.java:51)
> 
> 
> Any Help/Advice would be appreciated.
> 
> Thanks,
> David Hernandez
> 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - - -
> 
> This message is intended only for the personal and confidential use of the
> designated recipient(s) named above.  If you are not the intended
> recipient of this message you are hereby notified that any review,
> dissemination, distribution or copying of this message is strictly
> prohibited.  This communication is for information purposes only and
> should not be regarded as an offer to sell or as a solicitation of an
> offer to buy any financial product, an official confirmation of any
> transaction, or as an official statement of Lehman Brothers.  Email
> transmission cannot be guaranteed to be secure or error-free.  Therefore,
> we do not represent that this information is complete or accurate and it
> should not be relied upon as such.  All information is subject to change
> without notice.
> 
> 
> IRS Circular 230 Disclosure:
> Please be advised that any discussion of U.S. tax matters contained within
> this communication (including any attachments) is not intended or written
> to be used and cannot be used for the purpose of (i) avoiding U.S. tax
> related penalties or (ii) promoting, marketing or recommending to another
> party any transaction or matter addressed herein.
> 
> -
> 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/Struts2-Jar-on-JBoss-tp18078684p24075906.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: Additional validation for j_security_check action

2009-06-17 Thread Wes Wannemacher
I have thought about this a bit lately and I never came up with a good
solution. In this case, you are sort of hacking the framework by using
our view library to render the UI, but the processing happens
elsewhere. That's why I don't know if there is a good solution to
sprinkle in some validation as well, since validation is handled as a
function of the processing.

I have thought about trying to put an action out in front of
j_security_check. I am not sure if it would work, but you can try to
create a thin action that has the getters/setters for j_username /
j_password, then dispatch to j_security_check. I don't know if you're
feeling up to it, but if you hack around enough and find a way to
pre-process the form with struts then hand it off to j_security_check,
I'd be interested in how you did it.

-Wes

On Wed, Jun 17, 2009 at 11:06 AM, Daniil Petrov wrote:
> Hi,
>
> I am using JAAS authentication in a Struts 2 web application. A login form
> looks like:
>
>    
>        
>        
>        
>    
>
> I need to validate password field before passing it to the authentication
> service. Basically, I need to check that this field is not empty. Struts 2
> suggests two ways for validation: either implement validate() method in
> action or configure field validators in xml file. But in this case I do not
> have a particular action, because j_security_check is something
> container-dependent. What validation can be done in this case?
>
> Thanks,
> Daniil
>



-- 
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



Additional validation for j_security_check action

2009-06-17 Thread Daniil Petrov
Hi,

I am using JAAS authentication in a Struts 2 web application. A login form
looks like:







I need to validate password field before passing it to the authentication
service. Basically, I need to check that this field is not empty. Struts 2
suggests two ways for validation: either implement validate() method in
action or configure field validators in xml file. But in this case I do not
have a particular action, because j_security_check is something
container-dependent. What validation can be done in this case?

Thanks,
Daniil


Re: Why all this WARN on interceptor (and how to eliminate?)

2009-06-17 Thread Stefano
Ok
i can ignore them.

On Wed, Jun 17, 2009 at 15:34, Lukasz Lenart
wrote:

> I think it's unrelated to Struts, check that [1]
>
> [1]
> http://www.jboss.org/file-access/default/members/jbossejb3/freezone/docs/tutorial/1.0.0/html/EJB3_Interceptors.html
>
>
> 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
>
>


-- 
Stefano


RE: Error when deploying portlets beside a normal Struts2 web app?

2009-06-17 Thread Kofford, C Todd
I am experiencing the exact same problem ever since I moved to struts 2.1.6. 

This was not a problem in struts 2.0.14, and in fact, we've stayed with struts 
2.0.14 for this very reason.

Todd Kofford
tkoff...@ku.edu
University of Kansas - IT
 

-Original Message-
From: IainM [mailto:iain.mil...@live.co.uk] 
Sent: Friday, June 12, 2009 4:04 AM
To: user@struts.apache.org
Subject: Re: Error when deploying portlets beside a normal Struts2 web app?


We have struts.xml set up so that the portlet package extends
struts-portlet-default and the normal actions extend struts-default. The
problem manifests even if all we do is add the portlet-plugin jar into the
WEB-INF/lib directory and do no other setup of portlets. So there seems to
be something in the portlet plugin which is affecting normal action
functionality.

Iain.


Nils-Helge Garli wrote:
> 
> If you're using portlets, your package must extend
> "struts-portlet-default" instead of "struts-default". It should be
> possible to run servlet actions and portlet actions in the same
> application.
> 
> Nils-H
> 
> 
> On Thu, Jun 11, 2009 at 3:52 PM, IainM wrote:
>>
>> Hi,
>>
>> I have an existing Struts2 (2.1.6) web app which I would like to add a
>> couple of portlets to. I have added the portlet plugin and a portel.xml
>> file
>> and developed a couple of plugins which I have successfully run in JBOSS
>> Portal. My problem is that the addition of the portlet plugin
>> (struts2-portlet-plugin-2.1.6) seems to break my existing web pages. For
>> example, when I have an action which forwards onto a very plain jsp file
>> that shows a form (using ) I get a NullPointerException as below:
>>
>> org.apache.jasper.JasperException: java.lang.NullPointerException
>>
>> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:521)
>>
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:415)
>>      
>>  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
>>        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
>>        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>       etc...
>>
>> root cause
>>
>> java.lang.NullPointerException
>>      
>>  org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:792)
>>        org.apache.struts2.components.UIBean.end(UIBean.java:510)
>>
>> org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
>>
>> org.apache.jsp.cardSearch_jsp._jspx_meth_s_005ftextfield_005f0(cardSearch_jsp.java:583)
>>
>> org.apache.jsp.cardSearch_jsp._jspx_meth_s_005fform_005f0(cardSearch_jsp.java:530)
>>        org.apache.jsp.cardSearch_jsp._jspService(cardSearch_jsp.java:296)
>>        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>>        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
>>      
>>  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
>>        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
>>        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>
>> org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154)
>>
>> org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
>>        etc.
>>
>> If I remove the portlet plugin (and the portlet.xml file which points to
>> one
>> of the classes from the plugin) all of my original webpages work without
>> any
>> issues so it's definetly the plugin that's causing a conflict.
>>
>> Can I not deploy a struts2 application that includes both normal web
>> pages
>> and portlets? Or is there a way around this problem.
>>
>> Any help would be greatly appreciated.
>>
>> Iain.
>> --
>> View this message in context:
>> http://www.nabble.com/Error-when-deploying-portlets-beside-a-normal-Struts2-web-app--tp23981728p23981728.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
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Error-when-deploying-portlets-beside-a-normal-Struts2-web-app--tp23981728p23995311.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...@stru

Re: Interceptor issue in Struts 2.1.6

2009-06-17 Thread Yanto
Hi Wes,
thanks for the explaination, we decide to use the simple theme and use the
tag to display the error.
Case closed, thanks for others also that already help...

Regards
Yanto

On Wed, Jun 17, 2009 at 8:57 PM, Wes Wannemacher  wrote:

> All of the themes "work" with validation, it just depends on what you
> are expecting out of validation. The validation workflow interceptors
> will stop processing if validation fails and then indicate to the
> framework that the "input" result should be rendered. Whether and how
> you show the validation errors is a function of the view. The simple
> theme does not display validation/action errors without the help of
> tags such as s:fielderror and s:actionerror. The xhtml and css themes
> will show the errors, but you do not have as much freedom, as far as
> placement. The ajax theme is pretty much like xhtml.
>
> -Wes
>
> On Wed, Jun 17, 2009 at 6:15 AM, Yanto wrote:
> > Finally we found the issue is actually with the theme,
> >
> > we need to stop using simple themeand the validation and interceptor
> > will work.
> >
> >
> http://www.nabble.com/Struts2-Validation-not-working-with-theme-simple-td23127366.html
> >
> > just wondering, is there any other theme that working with validation ?
> >
> > Regards
> > Yanto
> >
> > On Wed, Jun 17, 2009 at 11:39 AM, Yanto  wrote:
> >
> >> Hi Dave,
> >>
> >> after following your note, we are able to run our sample interceptor,
> >> however now we have another issue the sample interceptor will always
> >> looping,
> >>
> >> since we have the following code in the sample interceptor,
> >> *return* invocation.invoke();
> >>
> >> but the sample interceptor will not run, if we are not include this
> code.
> >>
> >>
> >>
> >>
> ==
> >>
> >> 
> >>
> >>  >> "com.obs.ssts.framework.interceptor.InterceptorSample"*/>
> >>
> >>
> >>
> >>   
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> *<**interceptor-ref** name="**sample"**/>***
> >>
> >>   
> >>
> >>   
> >>
> >>  
> >>
> >>   class=*
> >> "loginAction"*>
> >>
> >> main.*jsp*
> >>
> >>   
> >>
> >>
> >>
> >> Now my action calls going in loop and after added the myinterceptostack
> >>
> >>
> >>
> >> *public* *class* *InterceptorSample* *extends* AbstractInterceptor {
> >>
> >>
> >>
> >>   @Override
> >>
> >>   *public* String intercept(ActionInvocation invocation)
> *throws*Exception {
> >>
> >> // *TODO* Auto-generated method stub
> >>
> >> System.*out*.println("Testing the interceptor flow from
> TEST:"
> >> );
> >>
> >> System.*out*.println("Testing the interceptor flow from TEST
> >> &:");
> >>
> >> *return* invocation.invoke();
> >>
> >>   }
> >>
> >>
> >>
> >> }
> >>
> >>
> >> Thanks
> >> Yanto
> >>
> >>
> >>
> >> On Tue, Jun 16, 2009 at 7:32 PM, Dave Newton  >wrote:
> >>
> >>> Yanto wrote:
> >>>
>  
>   
>  
> 
> >>>
> >>> This will configure *only* the "sample" interceptor.
> >>>
> >>> If you specify *any* interceptors on a per-action basis you must
> configure
> >>> *all* interceptors. This can be done in several ways.
> >>>
> >>> - specify all interceptors in the action's configuration (you can
> specify
> >>> interceptor stacks as well as single interceptors)
> >>> - creating a new stack including your custom interceptor and using that
> >>> stack in your action configuration
> >>> - same, but define the new stack and using it as the default stack
> >>>
> >>> Dave
> >>>
> >>>
> >>> -
> >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >>> For additional commands, e-mail: user-h...@struts.apache.org
> >>>
> >>>
> >>
> >
>
>
>
> --
> 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: Option transfer select (WORKAROUND FOUND)

2009-06-17 Thread Jon Pearson
Well, I think something may be wrong with the Struts2 javascript code.
But I was able to make it work anyway by writing this function:

117 function selectAndSubmit() {
118 var list = document.getElementById("update_chosenColumns");
119 for (var i = 0; i < list.options.length; i++) {
120 list.options[i].selected = true;
121 }
122
123 var form = document.getElementById("update");
124 form.submit();
125 }

Which I call in the onclick="" handler for my form submission.

> -Original Message-
> From: Jon Pearson 
> Sent: Wednesday, June 17, 2009 9:10 AM
> To: Struts Users Mailing List
> Subject: Option transfer select
> 
> I am trying to get an option transfer select control to work, but I'm
> having difficulty getting the results back out of it.
> 
> It looks like the control passes values in the two lists back to the
> server by selecting all items in each list and then letting 
> the standard
> form submission mechanism do its normal job of passing all selected
> items, but the select-all code does not appear to run (according to
> FireBug).
> 
> Here's the section of code that Struts2 inserted (the line numbers are
> from FireBug):
> 
> 311
> 312 var containingForm = document.getElementById("update");
> 313 StrutsUtils.addEventListener(containingForm, "submit",
> 314 function(evt) {
> 315 var selectObj = document.getElementById("update_");
> 316 selectAllOptionsExceptSome(selectObj, "key", "");
> 317 }, true);
> 318 var containingForm = document.getElementById("update");
> 319 StrutsUtils.addEventListener(containingForm, "submit",
> 320 function(evt) {
> 321 var selectObj = document.getElementById("update_chosenColumns");
> 322 selectAllOptionsExceptSome(selectObj, "key", "");
> 323 }, true);
> 324
> 325
> 326
> 
> I'm not interested in the left list (as is shown by line 315; I'm not
> setting listName, so it just has the form name there and 
> doesn't end up
> getting used). But I am interested in the right list (line 321).
> 
> The form submit event listener seems to register (at least,
> StrutsUtils.addEventListener() executes), but when I submit the form,
> the event listener does not actually run and select the list 
> items. As a
> result, the chosen values are not passed back to the server.
> 
> Has anyone else gotten this control to work? Is there any property I
> might be missing?
> 
> Browser is Firefox 3, using FireBug to investigate.
>   
> 
> Jonathan P. Pearson - Software Engineer
> -- 
> SIXNET - Solutions for Your Industrial Networking Challenges
> 331 Ushers Road, Ballston Lake, NY 12019
> Tel: 1.518.877.5173, Fax: 1.518.877.8346
> www.sixnet.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: Why all this WARN on interceptor (and how to eliminate?)

2009-06-17 Thread Lukasz Lenart
I think it's unrelated to Struts, check that [1]

[1] 
http://www.jboss.org/file-access/default/members/jbossejb3/freezone/docs/tutorial/1.0.0/html/EJB3_Interceptors.html


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



Why all this WARN on interceptor (and how to eliminate?)

2009-06-17 Thread Stefano Tranquillini
Hi all.
I developed an application with struts2, tiles and EJB using jboss.
In the log of jboss i've a lot of warning:

15:28:13,484 WARN  [InterceptorRegistry] applicable interceptors is
non-existent
 for public boolean
session.MGMTBean.addCustomer(java.lang.String,java.lang.Stri
ng,java.lang.String,java.lang.String,java.lang.String,double)
15:28:13,500 WARN  [InterceptorRegistry] applicable interceptors is
non-existent
 for public java.util.List session.MGMTBean.getAllOrders(entity.Customer)
15:28:13,515 WARN  [InterceptorRegistry] applicable interceptors is
non-existent
 for public java.util.List session.MGMTBean.getAllBought(int)
15:28:13,515 WARN  [InterceptorRegistry] applicable interceptors is
non-existent
 for public java.util.List session.MGMTBean.getAllItemByCategory(int)
15:28:13,531 WARN  [InterceptorRegistry] applicable interceptors is
non-existent
 for public entity.Customer session.MGMTBean.findCustomer(int)
15:28:13,593 WARN  [InterceptorRegistry] applicable interceptors is
non-existent
 for public java.util.List session.MGMTBean.findSimilarItem(entity.Item)
15:28:13,609 WARN  [InterceptorRegistry] applicable interceptors is
non-existent
 for public double session.MGMTBean.getTotalSpend(entity.Customer)
15:28:13,609 WARN  [InterceptorRegistry] applicable interceptors is
non-existent
 for public boolean session.MGMTBean.updateItem(int,java.lang.String,int,
java.la
ng.String,double,int,java.lang.String)

where MGMTBean is my EJB.

How can i eliminate all these outputs? (i think, (i done a fast check in the
log file) is only in the command (cmd), not in the log file).


-- 
Stefano


Option transfer select

2009-06-17 Thread Jon Pearson
I am trying to get an option transfer select control to work, but I'm
having difficulty getting the results back out of it.

It looks like the control passes values in the two lists back to the
server by selecting all items in each list and then letting the standard
form submission mechanism do its normal job of passing all selected
items, but the select-all code does not appear to run (according to
FireBug).

Here's the section of code that Struts2 inserted (the line numbers are
from FireBug):

311
312 var containingForm = document.getElementById("update");
313 StrutsUtils.addEventListener(containingForm, "submit",
314 function(evt) {
315 var selectObj = document.getElementById("update_");
316 selectAllOptionsExceptSome(selectObj, "key", "");
317 }, true);
318 var containingForm = document.getElementById("update");
319 StrutsUtils.addEventListener(containingForm, "submit",
320 function(evt) {
321 var selectObj = document.getElementById("update_chosenColumns");
322 selectAllOptionsExceptSome(selectObj, "key", "");
323 }, true);
324
325
326

I'm not interested in the left list (as is shown by line 315; I'm not
setting listName, so it just has the form name there and doesn't end up
getting used). But I am interested in the right list (line 321).

The form submit event listener seems to register (at least,
StrutsUtils.addEventListener() executes), but when I submit the form,
the event listener does not actually run and select the list items. As a
result, the chosen values are not passed back to the server.

Has anyone else gotten this control to work? Is there any property I
might be missing?

Browser is Firefox 3, using FireBug to investigate.


Jonathan P. Pearson - Software Engineer
-- 
SIXNET - Solutions for Your Industrial Networking Challenges
331 Ushers Road, Ballston Lake, NY 12019
Tel: 1.518.877.5173, Fax: 1.518.877.8346
www.sixnet.com

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



Re: Struts Flow in JSP,Servlets Project

2009-06-17 Thread Jim Kiley
RTFM is an English acronym best summarized as "please read the
documentation."
By service routines what he means is this:

Instead of writing an Action code that has your DB access code directly in
it, write a service class that has DB access code in it, and have your
actions call the service class's methods.  That lets you reuse the DB access
code, and keeps the processing in the Action class focused on the user
interface.  That makes development and maintenance far easier.

jk

On Wed, Jun 17, 2009 at 2:29 AM, sprani.kmraj wrote:

>
> Dear volker,
>
> Thank you so much.
> This is what i expected... Now i understood the things.
> Can u please tell me that, what you r mean by service routines & RTFM.
>
> U r telling that DB access code should be in Action class, right
> So, where the Prepared statements should be in?
> what are all the things should be there in Servlet & java Bean?
> Please explain.
>
> regards,
> Rani.
>
>
>
>
>
> Volker Karlmeier wrote:
> >
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > Hi,
> >
> > 1) your submit button should submit to some action defined in struts.xml.
> > 2) your action class is called (if you have not specified any other,
> > "execute" is called.
> > 3) the result of your action specifies, which jsp is called next
> >
> > your code for accessing the DB should be called in 2) (better call
> > some service routines that access the database).
> >  for more information: RTFM
> >
> > Regards
> >
> >   volker
> >
> > sprani.kmraj schrieb:
> >> Dear All,
> >>
> >> GoodDay...!
> >> Im beginner for Struts programming.
> >> I hv started developing a Struts project.
> >> I have many doubt can u please clarify my doubt
> >> i have a jsp page which contains the input data(name & password).
> >> When i click the submit button, data will have to store in the database.
> >> i usally used to write DB connection code & definition of DB(prepared
> >> Statements) in servlet.
> >> But while using struts Where i have to write the code for DB
> >> connection
> >> & definition...
> >>
> >> When i click the submit button in JSP...
> >> what is the flow in the struts project.
> >> What are all the required files(servlets,java bean,action class,action
> >> form like that...)
> >>
> >> Please tell me the flow
> >> I hv refered many books... but i didnt get the answer to my point
> >
> >
> >
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v1.4.7 (GNU/Linux)
> >
> > iD8DBQFKOCfYaEMQXBIqssERAsBiAJ9p5OK8mMT02ENsl9zFd4InzMCKhwCffefs
> > d3wcCN/k+pbpxOHGOgdswXI=
> > =Cwon
> > -END PGP SIGNATURE-
> >
> >
> > -
> > 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-Flow-in-JSP%2CServlets-Project-tp24054020p24067708.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
Senior Technical Consultant | Summa
[p] 412.258.3346
http://www.summa-tech.com


Re: Interceptor issue in Struts 2.1.6

2009-06-17 Thread Wes Wannemacher
All of the themes "work" with validation, it just depends on what you
are expecting out of validation. The validation workflow interceptors
will stop processing if validation fails and then indicate to the
framework that the "input" result should be rendered. Whether and how
you show the validation errors is a function of the view. The simple
theme does not display validation/action errors without the help of
tags such as s:fielderror and s:actionerror. The xhtml and css themes
will show the errors, but you do not have as much freedom, as far as
placement. The ajax theme is pretty much like xhtml.

-Wes

On Wed, Jun 17, 2009 at 6:15 AM, Yanto wrote:
> Finally we found the issue is actually with the theme,
>
> we need to stop using simple themeand the validation and interceptor
> will work.
>
> http://www.nabble.com/Struts2-Validation-not-working-with-theme-simple-td23127366.html
>
> just wondering, is there any other theme that working with validation ?
>
> Regards
> Yanto
>
> On Wed, Jun 17, 2009 at 11:39 AM, Yanto  wrote:
>
>> Hi Dave,
>>
>> after following your note, we are able to run our sample interceptor,
>> however now we have another issue the sample interceptor will always
>> looping,
>>
>> since we have the following code in the sample interceptor,
>> *return* invocation.invoke();
>>
>> but the sample interceptor will not run, if we are not include this code.
>>
>>
>>
>> ==
>>
>> 
>>
>>             > "com.obs.ssts.framework.interceptor.InterceptorSample"*/>
>>
>>
>>
>>                   
>>
>>                         
>>
>>                         
>>
>>                         
>>
>>                         
>>
>>                         
>>
>>                         
>>
>>                         *<**interceptor-ref** name="**sample"**/>***
>>
>>                   
>>
>>       
>>
>>              
>>
>>          > "loginAction"*>
>>
>>             main.*jsp*
>>
>>       
>>
>>
>>
>> Now my action calls going in loop and after added the myinterceptostack
>>
>>
>>
>> *public* *class* *InterceptorSample* *extends* AbstractInterceptor {
>>
>>
>>
>>       @Override
>>
>>       *public* String intercept(ActionInvocation invocation) 
>> *throws*Exception {
>>
>>             // *TODO* Auto-generated method stub
>>
>>             System.*out*.println("Testing the interceptor flow from TEST:"
>> );
>>
>>             System.*out*.println("Testing the interceptor flow from TEST
>> &:");
>>
>>             *return* invocation.invoke();
>>
>>       }
>>
>>
>>
>> }
>>
>>
>> Thanks
>> Yanto
>>
>>
>>
>> On Tue, Jun 16, 2009 at 7:32 PM, Dave Newton wrote:
>>
>>> Yanto wrote:
>>>
 
  
 

>>>
>>> This will configure *only* the "sample" interceptor.
>>>
>>> If you specify *any* interceptors on a per-action basis you must configure
>>> *all* interceptors. This can be done in several ways.
>>>
>>> - specify all interceptors in the action's configuration (you can specify
>>> interceptor stacks as well as single interceptors)
>>> - creating a new stack including your custom interceptor and using that
>>> stack in your action configuration
>>> - same, but define the new stack and using it as the default stack
>>>
>>> Dave
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>



-- 
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: Mapped back UI and #status.index driven names

2009-06-17 Thread stanlick

I agree, however, there is only a single object (Thing) in the map (Things)
and only a single parameter being passed.



newton.dave wrote:
> 
> stanlick wrote:
>> 
> 
> I'd assume something like getThings().put(index, name). OGNL has to get 
> the map in order to put something into it.
> 
> Dave
> 
> -
> 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/Mapped-back-UI-and--status.index-driven-names-tp24057659p24071797.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: OT: Problem with IE6 and JQuery (?)

2009-06-17 Thread Marc Eckart
http://www.positioniseverything.net/explorer/dup-characters.html

I found something, it seems that it is a bug of IE6. Unfortunately the fixes
did not work for me.

We have a table and in some rows we have subtables:

" class="attorneylist invisible">











Bevollm
Personen Nr
Name
Geb Dat
Rolle
Generalvollm




















" title="" class="<%= trclass %>"
onclick="setRowColorAndCheck('');
updateDiv('selectedcustomer', '${selectCustomerUrl}');"   ondblclick="location.href =
'${commitResultsUrl}'">

"
style="padding:0px;margin-left:17px;" />



 


Ja


Nein












The row is display correctly but a text fragment of the content of  appears right below this row. This just
happened at the end of the table.

I hate IE6 :-)

Best regards,
Marc

2009/6/16 dusty 

>
> Usually that means you have the td outside the table tag somehow.  Is that
> table terminated in the middle of your setup and not restarted?
>
>
>
> Marc Eckart-2 wrote:
> >
> > Hi,
> >
> > we have a struts2 application and we implemented the ajax functions
> > with jquery.
> > We now load some html tables with ajax in different divs. Now we have
> > the phenomenon that some text fragments of a  is displayed under
> > the table, but I can't find it somewhere in the dom tree.
> >
> > When I mark the fragment also the text in the  is marked. Very
> > strange.
> >
> > Does anyone know this phenomenon?
> >
> > Best Regards,
> > Marc
> >
> > -
> > 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/OT%3A-Problem-with-IE6-and-JQuery-%28-%29-tp24056118p24056377.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
>
>


enforce user to change his password before he can do anything

2009-06-17 Thread houser

Hi all,
according to some conditions, the users must be enforced to change their
passwords after they login. I am using Struts 1.3, hibernate and Tomcat. The
scenario is as follows:

- when the password of the user is expired and he logs in, he is redirected
to the change password action and form. all the main menu links are disabled
(precisely, they redirected to the same change password action according to
a common flag in the session) except the log out button or the save button
of the change password form.
- So far everything is ok, the problem occurs when the user gives a direct
URL to a previously saved page in side the web-application.

can anyone tell me how can prevent the user from going anywhere in the
application if he did not change the password and save his changes?

Thanks for any help in advance
mohmans
-- 
View this message in context: 
http://www.nabble.com/enforce-user-to-change-his-password-before-he-can-do-anything-tp24071648p24071648.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: Interceptor issue in Struts 2.1.6

2009-06-17 Thread Yanto
Finally we found the issue is actually with the theme,

we need to stop using simple themeand the validation and interceptor
will work.

http://www.nabble.com/Struts2-Validation-not-working-with-theme-simple-td23127366.html

just wondering, is there any other theme that working with validation ?

Regards
Yanto

On Wed, Jun 17, 2009 at 11:39 AM, Yanto  wrote:

> Hi Dave,
>
> after following your note, we are able to run our sample interceptor,
> however now we have another issue the sample interceptor will always
> looping,
>
> since we have the following code in the sample interceptor,
> *return* invocation.invoke();
>
> but the sample interceptor will not run, if we are not include this code.
>
>
>
> ==
>
> 
>
>  "com.obs.ssts.framework.interceptor.InterceptorSample"*/>
>
>
>
>   
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> *<**interceptor-ref** name="**sample"**/>***
>
>   
>
>   
>
>  
>
>   "loginAction"*>
>
> main.*jsp*
>
>   
>
>
>
> Now my action calls going in loop and after added the myinterceptostack
>
>
>
> *public* *class* *InterceptorSample* *extends* AbstractInterceptor {
>
>
>
>   @Override
>
>   *public* String intercept(ActionInvocation invocation) 
> *throws*Exception {
>
> // *TODO* Auto-generated method stub
>
> System.*out*.println("Testing the interceptor flow from TEST:"
> );
>
> System.*out*.println("Testing the interceptor flow from TEST
> &:");
>
> *return* invocation.invoke();
>
>   }
>
>
>
> }
>
>
> Thanks
> Yanto
>
>
>
> On Tue, Jun 16, 2009 at 7:32 PM, Dave Newton wrote:
>
>> Yanto wrote:
>>
>>> 
>>>  
>>> 
>>>
>>
>> This will configure *only* the "sample" interceptor.
>>
>> If you specify *any* interceptors on a per-action basis you must configure
>> *all* interceptors. This can be done in several ways.
>>
>> - specify all interceptors in the action's configuration (you can specify
>> interceptor stacks as well as single interceptors)
>> - creating a new stack including your custom interceptor and using that
>> stack in your action configuration
>> - same, but define the new stack and using it as the default stack
>>
>> Dave
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>


Re: download file

2009-06-17 Thread Nils-Helge Garli Hegvik
Take a look at Pawel and Dave's replies once again.

Nils-H

On Wed, Jun 17, 2009 at 8:55 AM, PEGASUS84 wrote:
>
> thanks,
> now there is a problem in struts.xml:
> Can not find a java.io.InputStream with the name [${contentType}] in the
> invocation stack. Check the
>
>
> --
> View this message in context: 
> http://www.nabble.com/download-file-tp24050039p24067967.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