Re: what login securityencription are good for struts...?

2007-11-13 Thread msg2ajay

hi,
 its a very nice example which u have sent but  i have a doubt that
as u are using salt(generation) adding to the encripting code that will be
fine for registeration but what ab the login time how you are going to
decript the data base code? and authenticate... and one more thing is are u
using Hibernate?

once again thanQ



msg2ajay wrote:
 
 hello friends, 
   I am developing a struts+hibernate application which 
  contains a login page. I am not sure of which tools or API's to use for
 logn 
  Authentication and encription. 
  
  Can any bady suggest me which is best for login Authentication and what
 way 
  can i proceed for secured login for WebApplication. 
  
 Ajay
 

-- 
View this message in context: 
http://www.nabble.com/what-login-security-encription-are-good-for-struts...--tf4795666.html#a13722357
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] Help for Ajax Tabbed Panel

2007-11-13 Thread lbastil

I think you have to use s:url .../ when using ajaxed remote divs.

Try something like:

s:url id=yourId ... /

...
s:div id=one label=Stories  theme=ajax
href=%{yourId}
labelposition=top 
  /s:div

Regards,
basti


Raghuveer Rawat wrote:
 
 Hi,
 I am using Struts2, Tile2, Spring2, Display Tag.
 I am implementing tabbed panel and all the tabs make remote calls. Each
 Tab
 will contain a table which are implemented using DisplayTag. I am
 implementing this table in a separagte JSP and want its content to be
 added
 to tab in the main jsp after execution.
 
 I can see Tabbed Panel but it is not able to load data. Request is
 reaching
 to Action class but data is not reaching back to original jsp.
 I am implementing like below..
 
 *MyArticles.jsp*.. ...and it has Tabbed Panel.
 
  s:tabbedPanel id=test 
   s:div id=one label=Stories  theme=ajax
 href=article/myArticles_articlesByAuthorId.action?channelId=1
 labelposition=top 
   /s:div
 
   s:div id=two label=Poem  theme=ajax
 href=article/myArticles_articlesByAuthorId.action?channelId=2
   /s:div
 
   s:div id=three label=Jokes/Humors  theme=ajax
 href=article/myArticles_articlesByAuthorId.action?channelId=3
   /s:div
 
   s:div id=four label=Shayaries/Ghazal  theme=ajax
 href=article/myArticles_articlesByAuthorId.action?channelId=4
   /s:div
 
  /s:tabbedPanel
 *MyArticleDetail.jsp (*This jsp contain table, which will be added to
 tab*)*
 
 display:table id=articleId name=articlesByAuthor
  requestURI= defaultsort=3 sort=list defaultorder=descending
 pagesize=10 class=table
 
   display:column property=categoryName sortable=true
  title=name style=width:20%; class=text/
 
   display:column property=title  sortable=true
 title=title style=width:20%; class=text /
 
   display:column property=lastUpdatedDate format={0,date,dd-MMM-}
 sortable=true
 title=Date style=width:20%; class=text /
 
 
   display:column property=ratingCount  sortable=true
 title=Rating style=width:20%; class=text /
 
 
 /display:table
 
 *Struts.xml*
 **
 
 package name=article namespace=/article extends=struts-default
 
 action name=myArticles_* method={1} class=
 com.rawatsoft.write4smile.webapp.action.ArticleAction
 
 result name=success type=dispatcher
 
 /WEB-INF/jsp/MyArticlesDetail.jsp
 
 /result
 
 /action
 
 /package
 
 Error Log:
 
 [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | Opening Hibernate Session
 
 [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | opened session at timestamp:
 4894327269310466
 
 [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | No bean named '
 org.apache.struts2.dispatcher.ServletDispatcherResult' found in
 [EMAIL PROTECTED]:
 defining beans
 [dataSource,sessionFactory,transactionManager,articleDAO,userDAO,myMessageDAO,featuredArticlesDAO,myFriendsDAO,countryDAO,myInvitesDAO,writerInterestDAO,channelDAO,categoryDAO,securityQuestionsDAO,commentDAO,ratingDAO,testDAO,testServiceTarget,articleServiceTarget,countryServiceTarget,myInvitesServiceTarget,writerInterestServiceTarget,securityQuestionsServiceTarget,channelServiceTarget,categoryServiceTarget,userServiceTarget,myMessageServiceTarget,featuredArticlesServiceTarget,myFriendsServiceTarget,commentServiceTarget,ratingServiceTarget,testService,articleService,userService,myMessageService,featuredArticlesService,commentService,ratingService,myFriendsService,countryService,writerInterestService,channelService,categoryService,securityQuestionsService,myInvitesService];
 root of factory hierarchy
 
 [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | setting flush mode to: NEVER
 
 [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | Bound value [
 [EMAIL PROTECTED] for key [
 [EMAIL PROTECTED] to thread
 [http-8080-Processor22]
 
 [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | Creating [
 java.util.LinkedHashMap]
 
 [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | Checking
 ConfigurationProviders
 for reload.
 
 [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | Creating [
 java.util.LinkedHashMap]
 
 [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | Ignoring constructor [public
 org.apache.struts2.dispatcher.ServletDispatcherResult(java.lang.String)]
 of
 bean 'org.apache.struts2.dispatcher.ServletDispatcherResult':
 org.springframework.beans.factory.UnsatisfiedDependencyException: Error
 creating bean with name '
 org.apache.struts2.dispatcher.ServletDispatcherResult': Unsatisfied
 dependency expressed through constructor argument with index 0 of type [
 java.lang.String]: There are 0 beans of type [java.lang.String] available
 for autowiring: []. There should have been exactly 1 to be able to
 autowire
 constructor of bean
 'org.apache.struts2.dispatcher.ServletDispatcherResult'.
 
 [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | Forwarding to location
 /WEB-INF/jsp/MyArticlesDetail.jsp
 
 [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] |
 servletPath=/WEB-INF/jsp/MyArticlesDetail.jsp, pathInfo=null,
 queryString=null, name=null
 
 [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] |  Path Based 

[s2] s:url and wildcards

2007-11-13 Thread Thilo Ettelt
I have noticed that it doesn't seem to be possible to construct a 
wildcard action using s:url, is that correct? Or am I doing something wrong?


s:url action='/content/'+someID+'/view' id=testURL/
The corresponding action would be mapped like content/*/view.

This will output an URL like /content/'+someID+'/view', instead of
/content/100/view.action

Please help,
thx in advance,


Thilo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



forward to a particular id in a page from forward...

2007-11-13 Thread shakeel_code

Hi,

i have an html id in a jsp page tr id=theId/tr.

i have,
forward name=thisisdjsp.jsp/ in my struts config.xml

but i want to go directly to that id in the jsp page when the forward
happens.

i also tried,
forward name=thisisdjsp.jsp id=theId/ 

but it was of no help

can anyone help me?


thanks...

-- 
View this message in context: 
http://www.nabble.com/forward-to-a-particular-id-in-a-page-from-%3Cforward...-tf4796908.html#a13723190
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Without ActionServlet can i use struts ....?

2007-11-13 Thread Friend Here

without ActionServlet can i use struts ?
could u plz explain abt this  ...

-- 
View this message in context: 
http://www.nabble.com/Without-ActionServlet-can-i-use-struts---tf4796947.html#a13723279
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: struts 1.2: calling an action by javascript

2007-11-13 Thread Friend Here


html:select onchange = submit(); 
function submit()
{
  populate values ..then
  document.action.value  =  /url ;
  document[0].forms[0].submit();   
}


Ingo Villnow wrote:
 
 Hello,
 
 i want to call an action by javascript, when a value in a html:select
 field changes. I want to fill my html:form with the data provided by
 the action. Any ideas? I don't know a lot of javascript :-(
 
 thanks  greetings from Berlin
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
View this message in context: 
http://www.nabble.com/struts-1.2%3A-calling-an-action-by-javascript-tf4725382.html#a13723779
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



conditional matching using s:if

2007-11-13 Thread SudarshanP

Hi Struts2 users,

I am new to Struts2

Have a problem with s:if tag, below is the code snippet
'branchsData' is a javaobject having 'branch' as its property

Trying to generate table structure based on condition, i am afraid s:if
conditional tag is not working for me.  Let me know what is the problem with
this code and what best way to achieve this

Any help will be greatly appreciated

Thanks in advance

- START -
s:iterator value=branchsData status=stat
   s:if test=%{#branchsData[%{#stat.index}].branch =='START'}
tabletr
/s:if
s:elseif test=%{#branchsData[%{#stat.index}].branch =='END'}
/table/tr
/s:elseif
s:else
tds:textfield name=%{#branchsData[%{#stat.index}].branch
value=/s:textfield/td
   /s:else
/s:iterator
--- END --
-- 
View this message in context: 
http://www.nabble.com/conditional-matching-using-s%3Aif-tf4797396.html#a13724644
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: conditional statement in struts2

2007-11-13 Thread SudarshanP

With all due respect to roseindia.net, i would like to say that, the examples
given are vanilla which is good to know the concepts but actual development
code will be much complex





Deepak Kumar wrote:
 
 Please check http://www.roseindia.net/struts/struts2/struts-2-tags.shtml
 
 Thanks
 
 
 -Original Message-
 From: carmi_cd [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 24, 2007 2:47 PM
 To: user@struts.apache.org
 Subject: Re: conditional statement in struts2
 
 
 
 would this code function correctly..that if pdfValue==1 it will display an
 iframe containing a pdf generated from jasperreports else a strut div will
 be displayed containing an html format report?
 
 s:if test=pdfValue==1
 iframe id=reportPreview name=reportPreview
 src=%{getReportNumber()}.action?reportId=%{getReportId()}
 width=800 height=600/
 /s:if
 s:else
 s:div theme=ajax id=reportPreview
 href=%{getReportNumber()}.action?reportId=%{getReportId()}
 cssStyle=componentHolder
loadingText=Loading report... Please wait.
errorText=Unable to load report.
listenTopics=load_report_preview
executeScripts=true
 Loading report... Please wait.
 /s:div
 /s:else
 
 thanks again.
 
 
 jignesh(india) wrote:

 It's simple dude use s:if and s:else like mentioned below
 s:if test=pdfValue!=0
   if part
 /s:if
 s:else
   else part
 /s:else

 hope it will help u.!
 Regards,
 Jignesh




 carmi_cd wrote:

 hi i'm new in struts 2..my question is how can i get a value from  a
 member variable of my action class and
 evaluate it in my if-else-if statemet?

 i try to code it but it doesn't evaluate properly..here is my exisiting
 code.

 s:if test='%{getPdfValue()} == 0'
 s:div theme=ajax id=reportPreview
 href=%{getReportNumber()}.action?reportId=%{getReportId()}
cssStyle=componentHolder
loadingText=Loading report... Please wait.
errorText=Unable to load report.
listenTopics=load_report_preview
executeScripts=true
 Loading report... Please wait.
 /s:div
 /s:if
 s:else
 s:div theme=ajax id=reportPreview
 cssStyle=componentHolder
loadingText=Loading PDF
errorText=Unable to load report.
listenTopics=load_report_preview
executeScripts=true
 iframe id=pdf_container name=pdf_container
 src=%{getReportNumber()}.action?reportId=%{getReportId()}
 width=800 height=600/
 /s:div
 /s:else

 it supposed to display the genereated pdf inside the iframe if the
 getPdfValue() method return
 are not equal to 0. please help me its not evaluating properly..thanks
 in
 advance.



 
 --
 View this message in context:
 http://www.nabble.com/conditional-statement-in-struts2-tf4682064.html#a13382
 105
 Sent from the Struts - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/conditional-statement-in-struts2-tf4682064.html#a13724734
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



S2 v2.1.1: exception updating remote div ..

2007-11-13 Thread Giovanni Azua

hi all,

I am playing with Struts 2.1.1 built from sources and I am currently 
getting the exception below while using remote div, any clues?


TIA,
regards,
Giovanni

WARNING: Could not find property [struts.valueStack]
ognl.OgnlException: target is null for setProperty(null, preventCache, 
[Ljava.lang.String;@5f262a85)

   at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1651)
   at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
   at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
   at ognl.SimpleNode.setValue(SimpleNode.java:246)
   at ognl.ASTChain.setValueBody(ASTChain.java:172)
   at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
   at ognl.SimpleNode.setValue(SimpleNode.java:246)
   at ognl.Ognl.setValue(Ognl.java:476)
   at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:197)
   at 
com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:150)
   at 
com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:138)
   at 
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:196)
   at 
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:162)
   at 
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:85)
   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
   at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
   at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
   at 
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:104)
   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
   at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
   at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
   at 
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)
   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
   at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
   at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
   at 
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207)
   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
   at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
   at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
   at 
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:75)
   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
   at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
   at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
   at 
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127)
   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
   at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
   at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
   at 
org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:105)
   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
   at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
   at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
   at 
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:266)
   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
   at 

Re: S2 v2.1.1: exception updating remote div ..

2007-11-13 Thread Giovanni Azua

hi,

Got rid of the issue by changing the following parameter in struts.xml

From:
constant name=struts.devMode value=true /   


To:
constant name=struts.devMode value=false /   


hard to guess this one ..

regards,
Giovanni

Giovanni Azua wrote:

hi all,

I am playing with Struts 2.1.1 built from sources and I am currently 
getting the exception below while using remote div, any clues?


TIA,
regards,
Giovanni

WARNING: Could not find property [struts.valueStack]
ognl.OgnlException: target is null for setProperty(null, 
preventCache, [Ljava.lang.String;@5f262a85)

   at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1651)
   at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
   at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
   at ognl.SimpleNode.setValue(SimpleNode.java:246)
   at ognl.ASTChain.setValueBody(ASTChain.java:172)
   at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
   at ognl.SimpleNode.setValue(SimpleNode.java:246)
   at ognl.Ognl.setValue(Ognl.java:476)
   at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:197)
   at 
com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:150) 

   at 
com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:138) 

   at 
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:196) 

   at 
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:162) 

   at 
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:85) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229) 

   at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227) 

   at 
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:104) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229) 

   at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227) 

   at 
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229) 

   at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227) 

   at 
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229) 

   at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227) 

   at 
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:75) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229) 

   at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227) 

   at 
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229) 

   at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227) 

   at 
org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:105) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230) 

   at 
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229) 

   at 

Re: what login securityencription are good for struts...?

2007-11-13 Thread Piero Sartini
  its a very nice example which u have sent but  i have a doubt that
 as u are using salt(generation) adding to the encripting code that will be
 fine for registeration but what ab the login time how you are going to
 decript the data base code? 

You do not need to decrypt - you just operate on the encrypted hash. (encode 
the given password at login time and match it against the hash in db)
You will have no chance to get the clear text password again.

 and authenticate... and one more thing is are 
 u using Hibernate?

Struts2 does not help you when it comes to authorization and authentication. 
You have some possibilities: In an enterprise environments you might want to 
use the container based security just like in a normal webapp.. there is a 
RolesInterceptor for struts that you can use.

Otherwise you have to build a custom security implementation. Or use something 
like ACEGI that offers a security framework but depends on spring.

The point is: struts2 does not offer security out of the box.

Piero

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [s2] s:url and wildcards

2007-11-13 Thread Dave Newton
--- Thilo Ettelt [EMAIL PROTECTED] wrote:
 s:url action='/content/'+someID+'/view'/

s:url action=%{'content/' + someID + '/view'}.../

d.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: S2 v2.1.1: exception updating remote div ..

2007-11-13 Thread Dave Newton
Hello,

Could you post the outline of the source that created
this error? Just curious as to what could have caused
that error--may be a bug.

Thanks,
Dave

--- Giovanni Azua [EMAIL PROTECTED] wrote:

 hi,
 
 Got rid of the issue by changing the following
 parameter in struts.xml
 
 From:
 constant name=struts.devMode value=true /   
 
 To:
 constant name=struts.devMode value=false /   
 
 hard to guess this one ..
 
 regards,
 Giovanni
 
 Giovanni Azua wrote:
  hi all,
 
  I am playing with Struts 2.1.1 built from sources
 and I am currently 
  getting the exception below while using remote
 div, any clues?
 
  TIA,
  regards,
  Giovanni
 
  WARNING: Could not find property
 [struts.valueStack]
  ognl.OgnlException: target is null for
 setProperty(null, 
  preventCache, [Ljava.lang.String;@5f262a85)
 at
 ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1651)
 at
 ognl.ASTProperty.setValueBody(ASTProperty.java:101)
 at

ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
 at
 ognl.SimpleNode.setValue(SimpleNode.java:246)
 at
 ognl.ASTChain.setValueBody(ASTChain.java:172)
 at

ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
 at
 ognl.SimpleNode.setValue(SimpleNode.java:246)
 at ognl.Ognl.setValue(Ognl.java:476)
 at

com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:197)
 at 
 

com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:150)
 
 
 at 
 

com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:138)
 
 
 at 
 

com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:196)
 
 
 at 
 

com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:162)
 
 
 at 
 

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:85)
 
 
 at 
 

com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
 
 
 at 
 

com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
 
 
 at 
 

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
 
 
 at 
 

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
 
 
 at 
 

com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:104)
 
 
 at 
 

com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
 
 
 at 
 

com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
 
 
 at 
 

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
 
 
 at 
 

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
 
 
 at 
 

org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)
 
 
 at 
 

com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
 
 
 at 
 

com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
 
 
 at 
 

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
 
 
 at 
 

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
 
 
 at 
 

org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207)
 
 
 at 
 

com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
 
 
 at 
 

com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
 
 
 at 
 

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
 
 
 at 
 

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
 
 
 at 
 

com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:75)
 
 
 at 
 

com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
 
 
 at 
 

com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
 
 
 at 
 

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
 
 
 at 
 

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
 
 
 at 
 

com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127)
 
 
 at 
 
=== message truncated ===


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: what login securityencription are good for struts...?

2007-11-13 Thread Ingo Villnow
Hi,

A salt value is a random value that will combinated with a password, so
both can be encrypted encrypt(salt+password) = hash
Please read: http://en.wikipedia.org/wiki/Salt_%28cryptography%29

You don't have to decrypt any passwords.

Yes, 'I am using hibernate to read/write on my database.

Greetings

msg2ajay schrieb:
 hi,
  its a very nice example which u have sent but  i have a doubt that
 as u are using salt(generation) adding to the encripting code that will be
 fine for registeration but what ab the login time how you are going to
 decript the data base code? and authenticate... and one more thing is are u
 using Hibernate?

 once again thanQ



 msg2ajay wrote:
   
 hello friends, 
   I am developing a struts+hibernate application which 
  contains a login page. I am not sure of which tools or API's to use for
 logn 
  Authentication and encription. 
  
  Can any bady suggest me which is best for login Authentication and what
 way 
  can i proceed for secured login for WebApplication. 
  
 Ajay

 

   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: S2 v2.1.1: exception updating remote div ..

2007-11-13 Thread Giovanni Azua

hi Dave,

Please find below all relevant sources.

Workflow is:
1-. Menu - ListOptimizationJobStatus.action
2-. ListOptimizationJobStatus.action - Displays 
listOptimizationJobStatus.jsp
3-. listOptimizationJobStatus.jsp Remote DIV refreshes every X secs and 
invokes RefreshOptimizationJobStatus.action
4-. RefreshOptimizationJobStatus.action invokes 
AjaxOptimizationJobStatus.jsp that

is rendered inside the Remote DIV.

I suspect might have something to do with the Tiles interceptor that is 
the default stack for the Action
Refresh* in the struts.xml below while those Refresh Actions do not 
produce any Tiles result but page ...

this is a wild guess though

Best regards,
Giovanni

* struts.xml *

?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE struts PUBLIC
   -//Apache Software Foundation//DTD Struts Configuration 2.0//EN
   http://struts.apache.org/dtds/struts-2.0.dtd;
struts
   constant name=struts.enable.DynamicMethodInvocation value=false /
   constant name=struts.devMode value=true /
   constant name=struts.ui.theme value=xhtml /
   package name=webui extends=tiles-default
   action name=Refresh* 
   result/jsp/ajax/Ajax{1}.jsp/result
   /action
   /package
/struts

* tiles.xml *

?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE tiles-definitions PUBLIC
   -//Apache Software Foundation//DTD Tiles Configuration 2.0//EN
   http://struts.apache.org/dtds/tiles-config_2_0.dtd;
tiles-definitions
   definition name=webui.listDisplayOptimizationJobStatus 
template=/tiles/layout.jsp
   put-attribute name=title value=List of Optimization Job 
Status/

   put-attribute name=style value=/tiles/styledisplaytag.jsp/
   put-attribute name=body 
value=/jsp/list/listOptimizationJobStatus.jsp/

   /definition
/tiles-definitions

* layout.jsp *

%@ taglib uri=http://tiles.apache.org/tags-tiles; prefix=tiles %
%@ taglib prefix=s uri=/struts-tags %
%@ taglib prefix=sx uri=/struts-dojo-tags %
%@ page buffer = 1024kb %
tiles:importAttribute name=title scope=request/
html
   head
   titletiles:getAsString name=title//title
   meta http-equiv=Content-Type
   content=text/html; charset=iso-8859-1 /
   script type=text/javascript src=js/drop_down.js/script
   script type=text/javascript src=js/thumbnail_popup.js/script
   tiles:insertAttribute name=style/
   s:head theme=xhtml /
   sx:head cache=true /
   /head
body
   jsp:include page=menu.jsp /
   br /
   div id=bodyColumn
   div id=contentBox
   div class=section
   h2tiles:getAsString name=title//h2
   /div
   tiles:insertAttribute name=body/
   /div
   /div
/body
/html

* listOptimizationJobStatus.jsp 
*


%@ page contentType=text/html; charset=UTF-8 language=java %
%@ taglib prefix=s uri=/struts-tags%
%@ taglib prefix=sx uri=/struts-dojo-tags %

s:url var=jobStatus includeParams=get 
value=/RefreshOptimizationJobStatus.action /
sx:div id=jobStatus href=%{#jobStatus} updateFreq=5000 
autoStart=true indicator=indicator

/sx:div
img id=indicator src=img/indicator.gif alt=Loading... 
style=display:none/


* AjaxOptimizationJobStatus.jsp 
*


%@ page contentType=text/html; charset=UTF-8 %
%@ taglib prefix=display uri=http://displaytag.sf.net; %

%
   request.setAttribute(decorator, none);
   response.setHeader(Cache-Control,no-cache); // HTTP 1.1
   response.setHeader(Pragma,no-cache);// HTTP 1.0
   response.setDateHeader (Expires, 0);   // prevents 
caching at the proxy server

%

display:table name=applicationScope.jobStates defaultsort=7 
defaultorder=descending pagesize=15
   requestURI=/ListDisplayOptimizationJobStatus.action export=true 
sort=list
   
decorator=com.sag.optimizer.ui.web.displaytag.decorator.OptimizationJobDecorator 

   display:column property=optimizationRunId title=ID 
sortable=true headerClass=sortable /
   display:column property=historicBook0 title=Book 1 
sortable=true headerClass=sortable /
   display:column property=historicBook1 title=Book 2 
sortable=true headerClass=sortable /
   display:column property=priority title=Priority sortable=true 
headerClass=sortable /
   display:column property=permanent title=Frequency 
sortable=true headerClass=sortable /
   display:column property=status title=Status sortable=true 
headerClass=sortable /
   display:column property=progress title=Progress 
format={0,number,integer}% sortable=true headerClass=sortable /

   display:column property=result title=Result sortable=false /
/display:table

Dave Newton wrote:

Hello,

Could you post the outline of the source that created
this error? Just curious as to what could have caused
that error--may be a bug.

Thanks,
Dave



Re: [S2] Help for Ajax Tabbed Panel

2007-11-13 Thread Raghuveer Rawat
Thanks Basti,
I made this change for s:url
Now I can see from log that DisplayTag is getting populated with correct
data but table is not getting populated to main JSP MyArticles.jsp i.e.
response of MyArticlesDetail.jsp is not getting included in
MyArticle.jspwhich contain TabbedPanel

Not sure what to do now.

Thanks
Raghu



On 11/13/07, lbastil [EMAIL PROTECTED] wrote:


 I think you have to use s:url .../ when using ajaxed remote divs.

 Try something like:

 s:url id=yourId ... /

 ...
 s:div id=one label=Stories  theme=ajax
 href=%{yourId}
 labelposition=top 
  /s:div

 Regards,
 basti


 Raghuveer Rawat wrote:
 
  Hi,
  I am using Struts2, Tile2, Spring2, Display Tag.
  I am implementing tabbed panel and all the tabs make remote calls. Each
  Tab
  will contain a table which are implemented using DisplayTag. I am
  implementing this table in a separagte JSP and want its content to be
  added
  to tab in the main jsp after execution.
 
  I can see Tabbed Panel but it is not able to load data. Request is
  reaching
  to Action class but data is not reaching back to original jsp.
  I am implementing like below..
 
  *MyArticles.jsp*.. ...and it has Tabbed Panel.
 
   s:tabbedPanel id=test 
s:div id=one label=Stories  theme=ajax
  href=article/myArticles_articlesByAuthorId.action?channelId=1
  labelposition=top 
/s:div
 
s:div id=two label=Poem  theme=ajax
  href=article/myArticles_articlesByAuthorId.action?channelId=2
/s:div
 
s:div id=three label=Jokes/Humors  theme=ajax
  href=article/myArticles_articlesByAuthorId.action?channelId=3
/s:div
 
s:div id=four label=Shayaries/Ghazal  theme=ajax
  href=article/myArticles_articlesByAuthorId.action?channelId=4
/s:div
 
   /s:tabbedPanel
  *MyArticleDetail.jsp (*This jsp contain table, which will be added to
  tab*)*
 
  display:table id=articleId name=articlesByAuthor
   requestURI= defaultsort=3 sort=list defaultorder=descending
  pagesize=10 class=table
 
display:column property=categoryName sortable=true
   title=name style=width:20%; class=text/
 
display:column property=title  sortable=true
  title=title style=width:20%; class=text /
 
display:column property=lastUpdatedDate
 format={0,date,dd-MMM-}
  sortable=true
  title=Date style=width:20%; class=text /
 
 
display:column property=ratingCount  sortable=true
  title=Rating style=width:20%; class=text /
 
 
  /display:table
 
  *Struts.xml*
  **
 
  package name=article namespace=/article extends=struts-default
 
  action name=myArticles_* method={1} class=
  com.rawatsoft.write4smile.webapp.action.ArticleAction
 
  result name=success type=dispatcher
 
  /WEB-INF/jsp/MyArticlesDetail.jsp
 
  /result
 
  /action
 
  /package
 
  Error Log:
 
  [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | Opening Hibernate Session
 
  [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | opened session at timestamp:
  4894327269310466
 
  [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | No bean named '
  org.apache.struts2.dispatcher.ServletDispatcherResult' found in
 
 [EMAIL PROTECTED]
 :
  defining beans
 
 [dataSource,sessionFactory,transactionManager,articleDAO,userDAO,myMessageDAO,featuredArticlesDAO,myFriendsDAO,countryDAO,myInvitesDAO,writerInterestDAO,channelDAO,categoryDAO,securityQuestionsDAO,commentDAO,ratingDAO,testDAO,testServiceTarget,articleServiceTarget,countryServiceTarget,myInvitesServiceTarget,writerInterestServiceTarget,securityQuestionsServiceTarget,channelServiceTarget,categoryServiceTarget,userServiceTarget,myMessageServiceTarget,featuredArticlesServiceTarget,myFriendsServiceTarget,commentServiceTarget,ratingServiceTarget,testService,articleService,userService,myMessageService,featuredArticlesService,commentService,ratingService,myFriendsService,countryService,writerInterestService,channelService,categoryService,securityQuestionsService,myInvitesService];
  root of factory hierarchy
 
  [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | setting flush mode to: NEVER
 
  [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | Bound value [
  [EMAIL PROTECTED] for key [
  [EMAIL PROTECTED] to thread
  [http-8080-Processor22]
 
  [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | Creating [
  java.util.LinkedHashMap]
 
  [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | Checking
  ConfigurationProviders
  for reload.
 
  [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | Creating [
  java.util.LinkedHashMap]
 
  [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | Ignoring constructor [public
  org.apache.struts2.dispatcher.ServletDispatcherResult(java.lang.String)]
  of
  bean 'org.apache.struts2.dispatcher.ServletDispatcherResult':
  org.springframework.beans.factory.UnsatisfiedDependencyException: Error
  creating bean with name '
  org.apache.struts2.dispatcher.ServletDispatcherResult': Unsatisfied
  dependency expressed through constructor argument with index 0 of type [
  java.lang.String]: There are 0 beans of type 

Re: [S2] Help for Ajax Tabbed Panel

2007-11-13 Thread Raghuveer Rawat
I can see below message after execution in tabble panel..

*Couldn't load content:Unknown runtime error*

It looks request is getting forwarded to new
location /WEB-INF/jsp/MyArticlesDetail.jsp. How do I include response of
MyArticlesDetail.jsp in main jsp MyArticles.jsp

I have below configuration in struts.xml

 package name=article namespace=/article extends=struts-default
 action name=myArticles_* method={1} class=
com.rawatsoft.write4smile.webapp.action.ArticleAction
 result name=success type=dispatcher
 /WEB-INF/jsp/MyArticlesDetail.jsp
 /result
/action




On 11/13/07, Raghuveer Rawat [EMAIL PROTECTED] wrote:

 Thanks Basti,
 I made this change for s:url
 Now I can see from log that DisplayTag is getting populated with correct
 data but table is not getting populated to main JSP MyArticles.jsp i.e.
 response of MyArticlesDetail.jsp is not getting included in 
 MyArticle.jspwhich contain TabbedPanel

 Not sure what to do now.

 Thanks
 Raghu



 On 11/13/07, lbastil [EMAIL PROTECTED]  wrote:
 
 
  I think you have to use s:url .../ when using ajaxed remote divs.
 
  Try something like:
 
  s:url id=yourId ... /
 
  ...
  s:div id=one label=Stories  theme=ajax
  href=%{yourId}
  labelposition=top 
   /s:div
 
  Regards,
  basti
 
 
  Raghuveer Rawat wrote:
  
   Hi,
   I am using Struts2, Tile2, Spring2, Display Tag.
   I am implementing tabbed panel and all the tabs make remote calls.
  Each
   Tab
   will contain a table which are implemented using DisplayTag. I am
   implementing this table in a separagte JSP and want its content to be
   added
   to tab in the main jsp after execution.
  
   I can see Tabbed Panel but it is not able to load data. Request is
   reaching
   to Action class but data is not reaching back to original jsp.
   I am implementing like below..
  
   *MyArticles.jsp* . . ...and it has Tabbed Panel.
  
s:tabbedPanel id=test 
 s:div id=one label=Stories  theme=ajax
   href=article/myArticles_articlesByAuthorId.action?channelId=1
   labelposition=top 
 /s:div
  
 s:div id=two label=Poem  theme=ajax
   href=article/myArticles_articlesByAuthorId.action?channelId=2
 /s:div
  
 s:div id=three label=Jokes/Humors  theme=ajax
   href=article/myArticles_articlesByAuthorId.action?channelId=3
 /s:div
  
 s:div id=four label=Shayaries/Ghazal  theme=ajax
   href=article/myArticles_articlesByAuthorId.action?channelId=4
 /s:div
  
/s:tabbedPanel
   *MyArticleDetail.jsp (*This jsp contain table, which will be added to
   tab*)*
  
   display:table id=articleId name=articlesByAuthor
requestURI= defaultsort=3 sort=list
  defaultorder=descending
   pagesize=10 class=table
  
 display:column property=categoryName sortable=true
title=name style=width:20%; class=text/
  
 display:column property=title  sortable=true
   title=title style=width:20%; class=text /
  
 display:column property=lastUpdatedDate
  format={0,date,dd-MMM-}
   sortable=true
   title=Date style=width:20%; class=text /
  
  
 display:column property=ratingCount  sortable=true
   title=Rating style=width:20%; class=text /
  
  
   /display:table
  
   *Struts.xml*
   **
  
   package name=article namespace=/article extends=struts-default
  
   action name=myArticles_* method={1} class=
   com.rawatsoft.write4smile.webapp.action.ArticleAction
  
   result name=success type=dispatcher
  
   /WEB-INF/jsp/MyArticlesDetail.jsp
  
   /result
  
   /action
  
   /package
  
   Error Log:
  
   [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | Opening Hibernate Session
  
   [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | opened session at
  timestamp:
   4894327269310466
  
   [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | No bean named '
   org.apache.struts2.dispatcher.ServletDispatcherResult' found in
  
  [EMAIL PROTECTED]:
   defining beans
  
  [dataSource,sessionFactory,transactionManager,articleDAO,userDAO,myMessageDAO,featuredArticlesDAO,myFriendsDAO,countryDAO,myInvitesDAO,writerInterestDAO,channelDAO,categoryDAO,securityQuestionsDAO,commentDAO,ratingDAO,testDAO,testServiceTarget,articleServiceTarget,countryServiceTarget,myInvitesServiceTarget,writerInterestServiceTarget,securityQuestionsServiceTarget,channelServiceTarget,categoryServiceTarget,userServiceTarget,myMessageServiceTarget,featuredArticlesServiceTarget,myFriendsServiceTarget,commentServiceTarget,ratingServiceTarget,testService,articleService,userService,myMessageService,featuredArticlesService,commentService,ratingService,myFriendsService,countryService,writerInterestService,channelService,categoryService,securityQuestionsService,myInvitesService];
 
   root of factory hierarchy
  
   [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | setting flush mode to:
  NEVER
  
   [WRITE4SMILE] DEBUG [2007/11/12 16:48:38] | Bound value [
   [EMAIL PROTECTED] ] for key [
   [EMAIL PROTECTED] to thread
   [http-8080-Processor22]
  
   [WRITE4SMILE] DEBUG 

Re: what login securityencription are good for struts...?

2007-11-13 Thread Gary Affonso

msg2ajay wrote:
hello friends, 
  I am developing a struts+hibernate application which 
 contains a login page. I am not sure of which tools or API's to use for
logn 
 Authentication and encription. 
 
 Can any bady suggest me which is best for login Authentication and what way 
 can i proceed for secured login for WebApplication. 


Acegi, hands down.

We did auth by hand for years and just made the switch to Acegi. 
Should have done it a long, long time ago.  Acegi does require Spring 
but that's a huge plus, not a minus.


If you're new to both Spring and Acegi you are facing a significant 
learning curve.  I can only say: climb the curve, you'll be very happy 
you did.


- Gary

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Escaping Characters in Struts Property Tag

2007-11-13 Thread chengas123

Hi,
I want to use the struts property tag to set a JavaScript variable. 
Ordinarily, it would look something like:
var testValue = 's:property value=testValue /';

However, this does not work if the value has a single quote in it, so that
character needs to be escaped.  It should be easy, but I can't figure out
how to do it.  I can't return testValue.replaceAll(', \') as I'd like to
because the quotes in the call to replaceAll would interfere with the quotes
in property tag.  My only other idea was to create a class with a static
method, but I can't figure out how to call it.  Would it be something like:
var testValue = 's:property
value=@[EMAIL PROTECTED](comments) /'

Thanks,
Ben
-- 
View this message in context: 
http://www.nabble.com/Escaping-Characters-in-Struts-Property-Tag-tf4799846.html#a1373
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [struts] Escaping Characters in Struts Property Tag

2007-11-13 Thread Dale Newfield

chengas123 wrote:

var testValue = 's:property value=testValue /';

However, this does not work if the value has a single quote in it


Try:
var testValue = s:property value='%{testValue}'/;

-Dale

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [struts] Escaping Characters in Struts Property Tag

2007-11-13 Thread chengas123

That does not escape the single quote.

-Ben



DNewfield wrote:
 
 chengas123 wrote:
 var testValue = 's:property value=testValue /';
 
 However, this does not work if the value has a single quote in it
 
 Try:
 var testValue = s:property value='%{testValue}'/;
 
 -Dale
 
 

-- 
View this message in context: 
http://www.nabble.com/Escaping-Characters-in-Struts-Property-Tag-tf4799846.html#a13732806
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [struts] Escaping Characters in Struts Property Tag

2007-11-13 Thread Wes Wannemacher
what about 's:property value=testValue escape=true /'

-Wes

On 11/13/07, chengas123 [EMAIL PROTECTED] wrote:

 That does not escape the single quote.

 -Ben



 DNewfield wrote:
 
  chengas123 wrote:
  var testValue = 's:property value=testValue /';
 
  However, this does not work if the value has a single quote in it
 
  Try:
  var testValue = s:property value='%{testValue}'/;
 
  -Dale
 
 

 --
 View this message in context: 
 http://www.nabble.com/Escaping-Characters-in-Struts-Property-Tag-tf4799846.html#a13732806
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2.0.11] TabbedPanel remote div loads twice on notifyTopic

2007-11-13 Thread Crocker, Patrick
Struts 2.0.11

I have a tabbed panel with 2 div's, one static, one remote.  Tab one
(static) has a form with a submit button that publishes a notify topic
of /refresh.  Tab two (remote) has a listen topic of /refresh.

The problem is that when the form is submitted, Tab two (remote) is
loaded twice:

Firebug Console Output:
GET
http://localhost:8080/emckpi/test/tab2.htm?dojo.preventCache=11949822065
98
POST http://localhost:8080/emckpi/test/tab1.htm
GET
http://localhost:8080/emckpi/test/tab2.htm?dojo.preventCache=11949822066
30

As you can see, the topic is notified, then the form posts, then the
topic is notified again.  According to the documentation, the s:submit
notifyTopics is Topics that will published when the remote call
completes.

So, why is the topic being notified *before* the remote call has even
been performed?

JSP:
--
%@ taglib uri=/struts-tags prefix=s %
html
  head
s:head theme=ajax /
  /head
  body
s:tabbedPanel id=tabs

  s:div id=tabOne theme=ajax label=Tab One

s:form namespace=/test action=tab1 method=post
theme=ajax
  s:submit notifyTopics=/refresh /
/s:form

  /s:div

  s:url id=tabTwoUrl namespace=/test action=tab2 /
  s:div id=tabTwo href=%{#tabTwoUrl} theme=ajax label=Tab
Two listenTopics=/refresh /

/s:tabbedPanel
  /body
/html

Thank you,
Patrick Crocker



***
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [struts] Escaping Characters in Struts Property Tag

2007-11-13 Thread Dale Newfield

chengas123 wrote:

That does not escape the single quote.


Correct.  But I believe the following is valid ecmascript (without the 
single quote being escaped):


var testValue = You've got to be kidding!;

-Dale

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2.0.11] TabbedPanel remote div loads twice on notifyTopic

2007-11-13 Thread Alvaro Sanchez-Mariscal
I fired a bug about this some weeks ago, and the response was we will
solve it in Struts 2.1.

Alvaro.

On Nov 13, 2007 8:43 PM, Crocker, Patrick [EMAIL PROTECTED] wrote:
 Struts 2.0.11

 I have a tabbed panel with 2 div's, one static, one remote.  Tab one
 (static) has a form with a submit button that publishes a notify topic
 of /refresh.  Tab two (remote) has a listen topic of /refresh.

 The problem is that when the form is submitted, Tab two (remote) is
 loaded twice:

 Firebug Console Output:
 GET
 http://localhost:8080/emckpi/test/tab2.htm?dojo.preventCache=11949822065
 98
 POST http://localhost:8080/emckpi/test/tab1.htm
 GET
 http://localhost:8080/emckpi/test/tab2.htm?dojo.preventCache=11949822066
 30

 As you can see, the topic is notified, then the form posts, then the
 topic is notified again.  According to the documentation, the s:submit
 notifyTopics is Topics that will published when the remote call
 completes.

 So, why is the topic being notified *before* the remote call has even
 been performed?

 JSP:
 --
 %@ taglib uri=/struts-tags prefix=s %
 html
   head
 s:head theme=ajax /
   /head
   body
 s:tabbedPanel id=tabs

   s:div id=tabOne theme=ajax label=Tab One

 s:form namespace=/test action=tab1 method=post
 theme=ajax
   s:submit notifyTopics=/refresh /
 /s:form

   /s:div

   s:url id=tabTwoUrl namespace=/test action=tab2 /
   s:div id=tabTwo href=%{#tabTwoUrl} theme=ajax label=Tab
 Two listenTopics=/refresh /

 /s:tabbedPanel
   /body
 /html

 Thank you,
 Patrick Crocker



 ***
 Bear Stearns is not responsible for any recommendation, solicitation,
 offer or agreement or any information about any transaction, customer
 account or account activity contained in this communication.
 ***

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2.0.11] TabbedPanel remote div loads twice on notifyTopic

2007-11-13 Thread Alvaro Sanchez-Mariscal
https://issues.apache.org/struts/browse/WW-2123

On Nov 13, 2007 9:06 PM, Alvaro Sanchez-Mariscal
[EMAIL PROTECTED] wrote:
 I fired a bug about this some weeks ago, and the response was we will
 solve it in Struts 2.1.

 Alvaro.


 On Nov 13, 2007 8:43 PM, Crocker, Patrick [EMAIL PROTECTED] wrote:
  Struts 2.0.11
 
  I have a tabbed panel with 2 div's, one static, one remote.  Tab one
  (static) has a form with a submit button that publishes a notify topic
  of /refresh.  Tab two (remote) has a listen topic of /refresh.
 
  The problem is that when the form is submitted, Tab two (remote) is
  loaded twice:
 
  Firebug Console Output:
  GET
  http://localhost:8080/emckpi/test/tab2.htm?dojo.preventCache=11949822065
  98
  POST http://localhost:8080/emckpi/test/tab1.htm
  GET
  http://localhost:8080/emckpi/test/tab2.htm?dojo.preventCache=11949822066
  30
 
  As you can see, the topic is notified, then the form posts, then the
  topic is notified again.  According to the documentation, the s:submit
  notifyTopics is Topics that will published when the remote call
  completes.
 
  So, why is the topic being notified *before* the remote call has even
  been performed?
 
  JSP:
  --
  %@ taglib uri=/struts-tags prefix=s %
  html
head
  s:head theme=ajax /
/head
body
  s:tabbedPanel id=tabs
 
s:div id=tabOne theme=ajax label=Tab One
 
  s:form namespace=/test action=tab1 method=post
  theme=ajax
s:submit notifyTopics=/refresh /
  /s:form
 
/s:div
 
s:url id=tabTwoUrl namespace=/test action=tab2 /
s:div id=tabTwo href=%{#tabTwoUrl} theme=ajax label=Tab
  Two listenTopics=/refresh /
 
  /s:tabbedPanel
/body
  /html
 
  Thank you,
  Patrick Crocker
 
 
 
  ***
  Bear Stearns is not responsible for any recommendation, solicitation,
  offer or agreement or any information about any transaction, customer
  account or account activity contained in this communication.
  ***
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 --
 Alvaro Sanchez-Mariscal Arnaiz
 Java EE Architect  Instructor
 [EMAIL PROTECTED]




-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect  Instructor
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [struts] Escaping Characters in Struts Property Tag

2007-11-13 Thread chengas123

Escape is true by default.  It escapes HTML characters such as  and  and
not single quotes.  

-Ben



Wes Wannemacher wrote:
 
 what about 's:property value=testValue escape=true /'
 
 -Wes
 
 

-- 
View this message in context: 
http://www.nabble.com/Escaping-Characters-in-Struts-Property-Tag-tf4799846.html#a13733962
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JasperException and javax.el.ELException when running under Jetty

2007-11-13 Thread Phil404

I have a struts 2 application which works perfectly on Tomcat 5.5.23 but when
I run it on Jetty 6.1.1 I get the following exception when processing an
OGNL expressions in a jsp page:

org.apache.jasper.JasperException: /WEB-INF/pages/register/info.jsp(45,10)
PWC6038: #{'FRESHMAN':'Freshman', 'SOPHOMORE':'Sophomore',
'JUNIOR':'Junior', 'SENIOR':'Senior'} contains invalid expression(s):
javax.el.ELException: Error Parsing: #{'FRESHMAN':'Freshman',
'SOPHOMORE':'Sophomore', 'JUNIOR':'Junior', 'SENIOR':'Senior'}
at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:49)
at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:344)

To me it looks like the JSP processor is trying to parse this expression
which it should not be.  Can anyone please shed any light on this issue?

Phil

I'm using the maven-jetty-plugin and with the command mvn jetty:run-war
-- 
View this message in context: 
http://www.nabble.com/JasperException-and-javax.el.ELException-when-running-under-Jetty-tf4800540.html#a13734373
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JasperException and javax.el.ELException when running under Jetty

2007-11-13 Thread Wes Wannemacher
Although the bug summary may be misleading, I'm guessing it's related to -

https://issues.apache.org/struts/browse/WW-2213

Basically, Jetty is treating your anonymous map as UEL, when it's
OGNL. You can escape the # like so -

\#{'FRESHMAN':'Freshman', 'SOPHOMORE':'Sophomore', 'JUNIOR':'Junior',
'SENIOR':'Senior'}



On 11/13/07, Phil404 [EMAIL PROTECTED] wrote:

 I have a struts 2 application which works perfectly on Tomcat 5.5.23 but when
 I run it on Jetty 6.1.1 I get the following exception when processing an
 OGNL expressions in a jsp page:

 org.apache.jasper.JasperException: /WEB-INF/pages/register/info.jsp(45,10)
 PWC6038: #{'FRESHMAN':'Freshman', 'SOPHOMORE':'Sophomore',
 'JUNIOR':'Junior', 'SENIOR':'Senior'} contains invalid expression(s):
 javax.el.ELException: Error Parsing: #{'FRESHMAN':'Freshman',
 'SOPHOMORE':'Sophomore', 'JUNIOR':'Junior', 'SENIOR':'Senior'}
 at
 org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:49)
 at
 org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:344)

 To me it looks like the JSP processor is trying to parse this expression
 which it should not be.  Can anyone please shed any light on this issue?

 Phil

 I'm using the maven-jetty-plugin and with the command mvn jetty:run-war
 --
 View this message in context: 
 http://www.nabble.com/JasperException-and-javax.el.ELException-when-running-under-Jetty-tf4800540.html#a13734373
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [struts] Escaping Characters in Struts Property Tag

2007-11-13 Thread chengas123

Ahh, I'm afraid I'd missed that you reversed the order of the quotation
marks.  I was not aware that could be done.  However, what I'm actually
doing is putting the value into an onclick attribute.  I'm not sure I can
use this trick because then I end up with something like
onClick=myFunction('test  value ').  So I think escaping would still be
best for me, so I get what I actually want:  onClick=myFunction('test \'
value ');

-Ben



DNewfield wrote:
 
 
 Try:
 var testValue = s:property value='%{testValue}'/; 
 
 

-- 
View this message in context: 
http://www.nabble.com/Escaping-Characters-in-Struts-Property-Tag-tf4799846.html#a13734649
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [struts] Escaping Characters in Struts Property Tag

2007-11-13 Thread Dale Newfield

chengas123 wrote:

I think escaping would still be best for me


Then you're looking for:

org.apache.commons.lang.StringEscapeUtils.escapeJavaScript()

-Dale

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JAAS and Struts Re-authentication Question

2007-11-13 Thread Adam Gordon

Hi-

We're using JAAS for webapp authentication and we've discovered an 
issue:  If user A is logged in and tries to log in as user B, they stay 
logged in as user A.  We know how to detect if a user's already 
authenticated (we have some static objects stored on the session) but 
we're not sure where to put the code that would detect whether user A 
had an authenticated session and invalidate it before allowing them to 
log in as user B.


I've tooled around with the LoginAction but am getting various Tomcat 
errors (invalid reference to login page, attempt to post to 
j_security_check and the servlet isn't available, etc...).


Any ideas?

--adam

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [struts] Escaping Characters in Struts Property Tag

2007-11-13 Thread chengas123

Thanks.  I will be sure to look at that.  
That brings me back to my original question though which is how do I call
that from within the property tag?

-Ben



DNewfield wrote:
 
 chengas123 wrote:
 I think escaping would still be best for me
 
 Then you're looking for:
 
 org.apache.commons.lang.StringEscapeUtils.escapeJavaScript()
 
 -Dale
 
 

-- 
View this message in context: 
http://www.nabble.com/Escaping-Characters-in-Struts-Property-Tag-tf4799846.html#a13735618
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [struts] Escaping Characters in Struts Property Tag

2007-11-13 Thread Dave Newton
--- chengas123 [EMAIL PROTECTED] wrote:
 That brings me back to my original question though
 which is how do I call that from within the property
tag?

http://struts.apache.org/2.x/docs/ognl-basics.html

See the section called Accessing static properties.

Nutshell:

s:property
value=@[EMAIL PROTECTED](valWithQuotes)/

d.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [struts] Escaping Characters in Struts Property Tag

2007-11-13 Thread Dale Newfield

chengas123 wrote:
Thanks.  I will be sure to look at that.  
That brings me back to my original question though which is how do I call

that from within the property tag?


s:property 
value=[EMAIL PROTECTED]@escapeJavascript(ognlExpr)}/


-Dale

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [struts] JAAS and Struts Re-authentication Question

2007-11-13 Thread Dale Newfield

Adam Gordon wrote:
We're using JAAS for webapp authentication and we've discovered an 
issue:  If user A is logged in and tries to log in as user B, they stay 
logged in as user A.


Couldn't you protect the login form page and action so that they're only 
accessible by a session without any valid login credentials?  That way 
the only way to log in as B would be to first log out as A (or in some 
other way start a new session w/o A's credentials).


-Dale

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [struts] Escaping Characters in Struts Property Tag

2007-11-13 Thread chengas123

That is basically what I had been trying all along.  Am I doing anything
wrong?
s:property value=comments / returns what I am expecting.
s:property value=%{comments} / returns what I am expecting.
s:property
value=@[EMAIL PROTECTED](comments)
/ returns nothing.
s:property
value=[EMAIL PROTECTED]@escapeJavaScript(comments)}
/ returns nothing.

Thanks,
Ben



newton.dave wrote:
 
 --- chengas123 [EMAIL PROTECTED] wrote:
 That brings me back to my original question though
 which is how do I call that from within the property
 tag?
 
 http://struts.apache.org/2.x/docs/ognl-basics.html
 
 See the section called Accessing static properties.
 
 Nutshell:
 
 s:property
 value=@[EMAIL PROTECTED](valWithQuotes)/
 
 d.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Escaping-Characters-in-Struts-Property-Tag-tf4799846.html#a13737312
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JasperException and javax.el.ELException when running under Jetty

2007-11-13 Thread Phil404

Wes

Thanks for your quick response.  You gave me the clue I needed!.  OK, so I
had this statements in my jsp:

tdww:radio theme=simple name=responses[%{questionNo}].value
list=%{#{5:''}} //td

which produced the following error message:

org.apache.jasper.JasperException:
/WEB-INF/pages/assessment/questions.jsp(33,20) PWC6038: %{#{5:''}}
contains invalid expression(s): javax.el.ELException: Error Parsing:
%{#{5:''}}

I escaped the #{ as follows:

tdww:radio theme=simple name=responses[%{questionNo}].value
list=%{\#{5:''}} //td

but that gave me the error:

tag 'radio', field 'list', name 'responses[1].value': The requested list key
'%{\#{5:''}}' could not be resolved as a
collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unknown location]

so I changed it to this:

tdww:radio theme=simple name=responses[%{questionNo}].value
list=[EMAIL PROTECTED]@{5:''}} //td

and that gave me:

tag 'radio', field 'list', name 'responses[1].value': The requested list key
'[EMAIL PROTECTED]@{5:''}}' could not be resolved as a
collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unknown location]

so another change:

tdww:radio theme=simple name=responses[%{questionNo}].value
list=[EMAIL PROTECTED]@{5:''} //td

which still gives me:

tag 'radio', field 'list', name 'responses[1].value': The requested list key
'[EMAIL PROTECTED]@{5:''}' could not be resolved as a
collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unknown location]

so yet another change:

tdww:radio theme=simple name=responses[%{questionNo}].value
list=[EMAIL PROTECTED]@{5:''}} //td

which worked as does:

tdww:radio theme=simple name=responses[%{questionNo}].value
list=[EMAIL PROTECTED]@{5:''} //td

which also works.  Just to amke sure, I checked that the last change is
backward compatible with Tomcat 5.5.23 (and therefore JSP 2.0).

Phil
-- 
View this message in context: 
http://www.nabble.com/JasperException-and-javax.el.ELException-when-running-under-Jetty-tf4800540.html#a13737642
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [struts] Escaping Characters in Struts Property Tag

2007-11-13 Thread Dale Newfield

chengas123 wrote:

s:property value=%{comments} / returns what I am expecting.
s:property
value=[EMAIL PROTECTED]@escapeJavaScript(comments)}
/ returns nothing.


Do you have a commons-lang jar in your WEB-INF/lib?

http://commons.apache.org/lang/

-Dale

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [struts] Escaping Characters in Struts Property Tag

2007-11-13 Thread chengas123

Yes.  That's definitely not the problem.  It's on my classpath, etc.  I was
originally trying this same thing with a custom String util class that I
wrote and that did not work either.  I should mention that I am using Struts
2.1.1.  If I am doing this correctly, then perhaps it's a bug? 

-Ben



DNewfield wrote:
 
 chengas123 wrote:
 s:property value=%{comments} / returns what I am expecting.
 s:property
 value=[EMAIL PROTECTED]@escapeJavaScript(comments)}
 / returns nothing.
 
 Do you have a commons-lang jar in your WEB-INF/lib?
 
 

-- 
View this message in context: 
http://www.nabble.com/Escaping-Characters-in-Struts-Property-Tag-tf4799846.html#a13737895
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [struts] Escaping Characters in Struts Property Tag

2007-11-13 Thread Dale Newfield

chengas123 wrote:

s:property value=%{comments} / returns what I am expecting.
s:property
value=[EMAIL PROTECTED]@escapeJavaScript(comments)}
/ returns nothing.


Have you turned off this capability (or rather not turned it back on)?
struts.ognl.allowStaticMethodAccess
https://issues.apache.org/struts/browse/WW-2160

Does:
s:property 
value='[EMAIL PROTECTED]@escapeJavaScript(hello 
world)}'/

work?

That might help distinguish if the problem is the static call or the 
data passed into it.


I assume you've looked at all the appropriate log files to see if 
there's some helpful message there?


-Dale

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to preselect a radio button in Struts 2

2007-11-13 Thread Pankaj Gupta
Hi,
I am working on Struts 2 and I want to preselect  a radio button.
If somebody can let me know how to go about it.
Regards,
Pankaj


[S2] Recursive s:iterate

2007-11-13 Thread Chris Pratt
I have an folder hierarchy that I'm trying to display on a web page,
but I can't figure out how to get s:iterate (or c:forEach) to work
with a structure of unknown depth.  Does anyone know of a technique
that would allow this?
  (*Chris*)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [struts] [S2] Recursive s:iterate

2007-11-13 Thread Dale Newfield

Chris Pratt wrote:

I have an folder hierarchy that I'm trying to display on a web page,
but I can't figure out how to get s:iterate (or c:forEach) to work
with a structure of unknown depth.  Does anyone know of a technique
that would allow this?


Create a .tag file that (conditionally) calls itself?

-Dale

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



About package org.apache.commons.fileupload.*

2007-11-13 Thread Fencer
Hi all,

I do write a java servlet to process the file upload with package
org.apache.commons.fileupload.*. It works normally when I use a jsp form to
call the servlet but when I drive a flash I find the uploaded files stay in
the temp directory set by the method setRepositoryPath. Actually the
uploaded files is the whole as the file is valid when I modify the surfix
.tmp to its own.Why this happens? How could I correct it? Or some another
package will be the better choice?

 

Many thanks



Re: [struts] [S2] Recursive s:iterate

2007-11-13 Thread Chris Pratt
On Nov 13, 2007 10:51 PM, Dale Newfield [EMAIL PROTECTED] wrote:

 Chris Pratt wrote:
  I have an folder hierarchy that I'm trying to display on a web page,
  but I can't figure out how to get s:iterate (or c:forEach) to work
  with a structure of unknown depth.  Does anyone know of a technique
  that would allow this?

 Create a .tag file that (conditionally) calls itself?


Great idea, and it's an excuse to try my first .tag file as well.
Thanks for the idea.
  (*Chris*)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts 2 Multi Level Type Conversion

2007-11-13 Thread richmondp

Hi,

I am trying to write a type converter that will convert a String to a Date
Time (dd/mm/yyy HH:mm:ss) and then convert the Date back to a String. I
already have a global converter that converts a String to a Date
(dd/mm/) and back to a String so my DateTime conveter is class specific
and only for the attribute 'user.modificationDate' 

The problem that I am getting is that when go between my JSP and my Struts 2
Action my DateTimeConverter.convertFromString() is being called successfully
but on the way back to the JSP my DateTimeConverter.convertToString() is not
being called. Instead the global DateConverter.convertToString () is being
called. I have read some posts that indicate that if I change my attribute
name to be single level i.e. modificationDate then my
DateTimeConverter.convertToString() will be called. I have tried this and it
does seem to work but I can't use this as a solution as the modificationDate
is directly related to the user. 

Is there something that I am doing wrong or is this an issue with Struts 2??  

For the record I am using Java 5 and Struts 2.0.9

A Sample of my code is below:

DateTimeConvertor.java:

private static final String DATE_TIME_FORMAT = dd/MM/ HH:mm:ss;

public Object convertFromString(Map map, String[] strings, Class aClass)
{
if (strings == null || strings.length == 0) {
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat(DATE_TIME_FORMAT);
Calendar cal;
try {
Date date = sdf.parse(strings[0]);
cal = Calendar.getInstance();
cal.setTime(date);
} catch (ParseException e) {
cal = null;
}
return cal;
}

public String convertToString(Map context, Object object) {
if (object != null  object instanceof Calendar) {
SimpleDateFormat sdf = new SimpleDateFormat(DATE_TIME_FORMAT);
return sdf.format(((Calendar)object).getTime());
}
return null;
}

UpdateUser conversion properties file:
user.modificationDate=test.util.conversion.DateTimeConverter

Global DateConverter:
private static final String FORMAT = dd/MM/;

public Object convertFromString(Map map, String[] strings, Class aClass)
{
if (strings == null || strings.length == 0) {
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat(FORMAT);
Calendar cal;
try {
Date date = sdf.parse(strings[0]);
cal = Calendar.getInstance();
cal.setTime(date);
} catch (ParseException e) {
cal = null;
}
return cal;
}

public String convertToString(Map map, Object object) {
if (object != null  object instanceof Calendar) {
SimpleDateFormat sdf = new SimpleDateFormat(FORMAT);
return sdf.format(((Calendar)object).getTime());
}
return null;
}

Global XWork Conversion file:
java.util.Calendar=test.util.conversion.DateConverter
-- 
View this message in context: 
http://www.nabble.com/Struts-2-Multi-Level-Type-Conversion-tf4802911.html#a13741515
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]