Re: [S2] ParametersInterceptor: Error setting expression

2008-02-05 Thread hezjing
Actually, I'm following the tutorial described at
http://www.vitarara.org/cms/struts_2_cookbook/creating_a_login_interceptor.

May I know which file that is showing the Struts2 default interceptor stack?

Thanks for your help!


On 2/5/08, Jeromy Evans [EMAIL PROTECTED] wrote:
 That looks fine.  Do you have an action called index in the default
 namespace?  It's calling ActionSupport which is the default/fallback
 action under some circumstances.

 You may need to go back to the default interceptor stack to isolate
 what's wrong. Or post the package from struts.xml here.

 PS. [Ljava.lang.String;@18a270a is an array of strings. This should if you're 
 using the default conversion.


 hezjing wrote:
  Hmmm ... my login.jsp now looks like this,
 
  s:form action=index method=post validate=true
s:textfield name=username key=user.username /
s:password name=password key=user.password /
s:submit name=login key=button.login /
  /s:form
 
 
  When the login button is pressed, the following exceptions are shown
  in the console,
 
  com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
  SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
  caught setting 'login' on 'class
  com.opensymphony.xwork2.ActionSupport: Error setting expression
  'login' with value '[Ljava.lang.String;@223be4'
 
  com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
  SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
  caught setting 'password' on 'class
  com.opensymphony.xwork2.ActionSupport: Error setting expression
  'password' with value '[Ljava.lang.String;@18a270a'
 
  com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
  SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
  caught setting 'username' on 'class
  com.opensymphony.xwork2.ActionSupport: Error setting expression
  'username' with value '[Ljava.lang.String;@10936a1'
 
 
 
 
  On 2/5/08, Jeromy Evans [EMAIL PROTECTED] wrote:
 
  It depends what your interceptor is trying to do...
  At the moment, I still think params is trying to call
  getButton().setLogin(val) on your ACTION (prior to execution of your
  login interceptor).
  I presume your interceptor is going to check the params or session and
  redirect if not authenticated, which is fine, but with your stack the
  params interceptor will attempt to write to the ACTION first.
 
  I still suspect your JSP/html includes a field with NAME button.login
  and params is throwing the exception due to getButton().  You can test
  my theory by giving the field a different name (eg. key=button.login
  name=login) that won't cause an error.
 
  hezjing wrote:
 
  The button.login is a key in i18n properties file, and it is suppose
  to retrieve the label for a button.
 
  I suspect this problem could be the interceptor statck I configured,
 
  interceptor-ref name=servlet-config /
  interceptor-ref name=params /
  interceptor-ref name=login / // my interceptor
  interceptor-ref name=prepare /
  interceptor-ref name=chain /
  interceptor-ref name=model-driven /
  interceptor-ref name=fileUpload /
  interceptor-ref name=static-params /
  interceptor-ref name=params /
  interceptor-ref name=conversionError /
  interceptor-ref name=validation /
  interceptor-ref name=workflow /
 
 
  Is it OK if my login interceptor is configured after the params 
  interceptor?
 
 
  On 2/5/08, Jeromy Evans [EMAIL PROTECTED] wrote:
 
 
  A param called button.login means the ParametersInterceptor has to
  call getButton().setLogin(val).
 
  If you don't have a getButton() method, or getButton() returns null, an
  exception like this occurs while trying to set the parameter.
 
  hezjing wrote:
 
 
  Hi
 
  I'm trying to create a login interceptor.
 
  When a login form is submitted, I got the following exception:
 
  com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
  SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
  caught setting 'button.login' on 'class
  com.opensymphony.xwork2.ActionSupport: Error setting expression
  'button.login' with value
  '[Ljava.lang.String;@2d4c7e'
 
 
  What does this exception means?
 
 
 
 
 
 
  -
  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]
 
 
 
 
 
 


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




-- 

Hez

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

Dynamic (variable) Form

2008-02-05 Thread strutting

Hi All,

I have a problem when creating the action of a form: this form is generated
dynamically using ajax and javascript depending on how the user fill in the
form. In this form there are checkboxes, comboboxes and textfields (a
variable number). And I don't know how to pick the values of each element of
the form.

Here is some code of the form:


%@ taglib prefix=s uri=/struts-tags %

html

head
titleARS - Is Available Form/title
s:head theme = ajax/
link href=s:url value=/css/mainstyle.css/ 
rel=stylesheet
type=text/css/
link rel=STYLESHEET type=text/css
href=rich_calendar/rich_calendar.css
script language=JavaScript type=text/javascript
src=rich_calendar/rich_calendar.js/script
script language=JavaScript type=text/javascript
src=rich_calendar/rc_lang_en.js/script
 
script language=javascript type=text/javascript
// on click - disable/enable the jobID textfield
function insertJobID()
{
if (document.formreservation.jid.disabled == 
true)
{
document.formreservation.jid.disabled = 
false
}
else
{
document.formreservation.jid.disabled = 
true
}
}

// onkeyup - create a DIV for each service
function addDivsServices(event)
{
divservices = document.createElement('div');
divservices.id = 'divservices';
divservices.style.border = solid #00bfff 3px;
divservices.style.padding = 5px;

(document.getElementById('formreservation')).appendChild(divservices);

for(i = 0; i  numS; i++) 
{   

//THE DIV OF THE SERVICE - name: 
'divservice' + i
divservice = 
document.createElement('div');
divservice.id = 'divservice' + i;
divservice.style.border = solid 
#00cd00 3px;
divservice.style.padding = 5px;

divservice.appendChild(document.createElement('br'));

//SERVICE ID
txt = document.createTextNode('Service 
ID: ');
serviceid = 
document.createElement('input');
serviceid.name = 'serviceid' + i;
divservice.appendChild(txt);
divservice.appendChild(serviceid);

//SPACE
space = document.createTextNode(\u00a0);
divservice.appendChild(space);

//COMBOBOX TYPE OF RESERVATION
txt = document.createTextNode('Type of 
Reservation: ');
cbx = document.createElement('select');
cbx.name = 'tor' + i;

opt = document.createElement('option');
opt.value = '1';
opt.text =  '1';
cbx.appendChild(opt);

opt = document.createElement('option'); 

opt.value = '2';
opt.text =  '2';
cbx.appendChild(opt);

opt = document.createElement('option'); 

opt.value = '3';
opt.text =  '3';
cbx.appendChild(opt);
cbx.onchange = 
addReservationConstraints;


Re: [S2] ParametersInterceptor: Error setting expression

2008-02-05 Thread Nuwan Chandrasoma

Hi,

struts-default.xml

Thanks,

Nuwan

hezjing wrote:

Actually, I'm following the tutorial described at
http://www.vitarara.org/cms/struts_2_cookbook/creating_a_login_interceptor.

May I know which file that is showing the Struts2 default interceptor stack?

Thanks for your help!


On 2/5/08, Jeromy Evans [EMAIL PROTECTED] wrote:
  

That looks fine.  Do you have an action called index in the default
namespace?  It's calling ActionSupport which is the default/fallback
action under some circumstances.

You may need to go back to the default interceptor stack to isolate
what's wrong. Or post the package from struts.xml here.

PS. [Ljava.lang.String;@18a270a is an array of strings. This should if you're 
using the default conversion.


hezjing wrote:


Hmmm ... my login.jsp now looks like this,

s:form action=index method=post validate=true
  s:textfield name=username key=user.username /
  s:password name=password key=user.password /
  s:submit name=login key=button.login /
/s:form


When the login button is pressed, the following exceptions are shown
in the console,

com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
caught setting 'login' on 'class
com.opensymphony.xwork2.ActionSupport: Error setting expression
'login' with value '[Ljava.lang.String;@223be4'

com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
caught setting 'password' on 'class
com.opensymphony.xwork2.ActionSupport: Error setting expression
'password' with value '[Ljava.lang.String;@18a270a'

com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
caught setting 'username' on 'class
com.opensymphony.xwork2.ActionSupport: Error setting expression
'username' with value '[Ljava.lang.String;@10936a1'




On 2/5/08, Jeromy Evans [EMAIL PROTECTED] wrote:

  

It depends what your interceptor is trying to do...
At the moment, I still think params is trying to call
getButton().setLogin(val) on your ACTION (prior to execution of your
login interceptor).
I presume your interceptor is going to check the params or session and
redirect if not authenticated, which is fine, but with your stack the
params interceptor will attempt to write to the ACTION first.

I still suspect your JSP/html includes a field with NAME button.login
and params is throwing the exception due to getButton().  You can test
my theory by giving the field a different name (eg. key=button.login
name=login) that won't cause an error.

hezjing wrote:



The button.login is a key in i18n properties file, and it is suppose
to retrieve the label for a button.

I suspect this problem could be the interceptor statck I configured,

interceptor-ref name=servlet-config /
interceptor-ref name=params /
interceptor-ref name=login / // my interceptor
interceptor-ref name=prepare /
interceptor-ref name=chain /
interceptor-ref name=model-driven /
interceptor-ref name=fileUpload /
interceptor-ref name=static-params /
interceptor-ref name=params /
interceptor-ref name=conversionError /
interceptor-ref name=validation /
interceptor-ref name=workflow /


Is it OK if my login interceptor is configured after the params interceptor?


On 2/5/08, Jeromy Evans [EMAIL PROTECTED] wrote:


  

A param called button.login means the ParametersInterceptor has to
call getButton().setLogin(val).

If you don't have a getButton() method, or getButton() returns null, an
exception like this occurs while trying to set the parameter.

hezjing wrote:




Hi

I'm trying to create a login interceptor.

When a login form is submitted, I got the following exception:

com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
caught setting 'button.login' on 'class
com.opensymphony.xwork2.ActionSupport: Error setting expression
'button.login' with value
'[Ljava.lang.String;@2d4c7e'


What does this exception means?






  

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






  

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



[s2] alternative path for the validation xml?

2008-02-05 Thread GF
Is there anything alternative (apart annotation) to place validation
xml for the action method in the same package of the action classes?
I don't like to place .xml in the same directory of the .java
Any idea (apart annotation)

thanks.

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



Editing an entity in Struts2

2008-02-05 Thread GF
I want to edit an entity, i.e. a Message
i would set the .jsp field this way

s:textfield name=message.title  /

on the MessageAction i would have a edit method that takes the
messageID and then call the business service to load the Message
object, so in the .jsp the file the textfield are loaded with the
current value.
when I submit the form, Struts2 will try to call
getMessage.setTitle(...) and so on, and it try to instatiate a new
Message object.
My idea is to create the object (loading it from hibernate calls on
the business service) in the prepare method, in this way when struts
will call getMessage.setTitle, it will set the new values on the
object loaded from the DB.
My worry is that this idea rely on the fact that the prepare
interceptor is called before the parameters interceptor.
What you think?
any better idea?

thank you.

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



Struts 2.0.11 + DWR 2.0 + ajax validation

2008-02-05 Thread Filipe David Manana
Hi,

Has anyone been able to put dwr 2.0 working with struts 2.0.11 ajax validation?



-- 
Filipe David Manana,
[EMAIL PROTECTED]

Obvious facts are like secrets to those not trained to see them.

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



Best Tool to develop html pages

2008-02-05 Thread mohammed hussain
Hi anybody knowing the best tools to develop to html page,pls let me know
thanx


Re: [S2] ParametersInterceptor: Error setting expression

2008-02-05 Thread Jeromy Evans

The referenced tutorial looks fine.

I'd remove the interceptor first and ensure everything works without 
it.  (confirm that you can post to the index action)

Then add the login and see if that causes the exception.
I'd probably insert the login interceptor before the param interceptor 
myself as this particular example doesn't need to write to the action on 
a failure.


struts-default.xml is available on this page:
http://struts.apache.org/2.x/docs/interceptors.html

hezjing wrote:

Actually, I'm following the tutorial described at
http://www.vitarara.org/cms/struts_2_cookbook/creating_a_login_interceptor.

May I know which file that is showing the Struts2 default interceptor stack?

Thanks for your help!


On 2/5/08, Jeromy Evans [EMAIL PROTECTED] wrote:
  

That looks fine.  Do you have an action called index in the default
namespace?  It's calling ActionSupport which is the default/fallback
action under some circumstances.

You may need to go back to the default interceptor stack to isolate
what's wrong. Or post the package from struts.xml here.

PS. [Ljava.lang.String;@18a270a is an array of strings. This should if you're 
using the default conversion.


hezjing wrote:


Hmmm ... my login.jsp now looks like this,

s:form action=index method=post validate=true
  s:textfield name=username key=user.username /
  s:password name=password key=user.password /
  s:submit name=login key=button.login /
/s:form


When the login button is pressed, the following exceptions are shown
in the console,

com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
caught setting 'login' on 'class
com.opensymphony.xwork2.ActionSupport: Error setting expression
'login' with value '[Ljava.lang.String;@223be4'

com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
caught setting 'password' on 'class
com.opensymphony.xwork2.ActionSupport: Error setting expression
'password' with value '[Ljava.lang.String;@18a270a'

com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
caught setting 'username' on 'class
com.opensymphony.xwork2.ActionSupport: Error setting expression
'username' with value '[Ljava.lang.String;@10936a1'




On 2/5/08, Jeromy Evans [EMAIL PROTECTED] wrote:

  

It depends what your interceptor is trying to do...
At the moment, I still think params is trying to call
getButton().setLogin(val) on your ACTION (prior to execution of your
login interceptor).
I presume your interceptor is going to check the params or session and
redirect if not authenticated, which is fine, but with your stack the
params interceptor will attempt to write to the ACTION first.

I still suspect your JSP/html includes a field with NAME button.login
and params is throwing the exception due to getButton().  You can test
my theory by giving the field a different name (eg. key=button.login
name=login) that won't cause an error.

hezjing wrote:



The button.login is a key in i18n properties file, and it is suppose
to retrieve the label for a button.

I suspect this problem could be the interceptor statck I configured,

interceptor-ref name=servlet-config /
interceptor-ref name=params /
interceptor-ref name=login / // my interceptor
interceptor-ref name=prepare /
interceptor-ref name=chain /
interceptor-ref name=model-driven /
interceptor-ref name=fileUpload /
interceptor-ref name=static-params /
interceptor-ref name=params /
interceptor-ref name=conversionError /
interceptor-ref name=validation /
interceptor-ref name=workflow /


Is it OK if my login interceptor is configured after the params interceptor?


On 2/5/08, Jeromy Evans [EMAIL PROTECTED] wrote:


  

A param called button.login means the ParametersInterceptor has to
call getButton().setLogin(val).

If you don't have a getButton() method, or getButton() returns null, an
exception like this occurs while trying to set the parameter.

hezjing wrote:




Hi

I'm trying to create a login interceptor.

When a login form is submitted, I got the following exception:

com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters
SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
caught setting 'button.login' on 'class
com.opensymphony.xwork2.ActionSupport: Error setting expression
'button.login' with value
'[Ljava.lang.String;@2d4c7e'


What does this exception means?






  

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





  

-
To unsubscribe, e-mail: [EMAIL 

[OT] Re: Best Tool to develop html pages

2008-02-05 Thread Dave Newton
--- mohammed hussain [EMAIL PROTECTED] wrote:
 Hi anybody knowing the best tools to develop to html page,pls let me know

Emacs, hands down.

Dave


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



Struts 2 and Weblogic 9.2 - java.net.ConnectException

2008-02-05 Thread Vigneswar Nagarathinam
Hi All,
I'm trying to implement Struts2 with Weblogic 9.2. I'm getting the
following error while running the Weblogic server. Can you please help me by
providing a solution:

stack trace:
---
Feb 5, 2008 3:51:35 PM GMT+05:30 Error HTTP BEA-101165 Could not
load user defined filter in web.xml:
org.apache.struts2.dispatcher.FilterDispatcher.
Class: weblogic.net.http.HttpClient
File: HttpClient.java
Method: openServer
Line: 320 - weblogic/net/http/HttpClient.java:320:-1
at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles
(XmlConfigurationProvider.java:835)
at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments
(XmlConfigurationProvider.java:131)
at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
XmlConfigurationProvider.java:100)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
DefaultConfiguration.java:130)
at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(
ConfigurationManager.java:52)
Truncated. see log file for complete stacktrace
Tried all: '1' addresses, but could not connect over HTTP to server: '
struts.apache.org', port: '80' - Class: weblogic.net.http.HttpClient
File: HttpClient.java
Method: openServer
Line: 320 - weblogic/net/http/HttpClient.java:320:-1
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:123)
at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles
(XmlConfigurationProvider.java:830)
at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments
(XmlConfigurationProvider.java:131)
at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
XmlConfigurationProvider.java:100)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
DefaultConfiguration.java:130)
Truncated. see log file for complete stacktrace
java.net.ConnectException: Tried all: '1' addresses, but could not connect
over HTTP to server: 'struts.apache.org', port: '80'
at weblogic.net.http.HttpClient.openServer(HttpClient.java:320)
at weblogic.net.http.HttpClient.openServer(HttpClient.java:375)
at weblogic.net.http.HttpClient.init(HttpClient.java:149)
at weblogic.net.http.HttpClient.New(HttpClient.java:245)
at weblogic.net.http.HttpURLConnection.connect(
HttpURLConnection.java:160)
Truncated. see log file for complete stacktrace

Thanks in advance,
Vigneswar Nagarathinam


Re: [OT] Re: Best Tool to develop html pages

2008-02-05 Thread Lukasz Lenart
Maybe not the best, but very good - MyEclipse


Regards
--
Lukasz

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



Re: How to add prinr option ?

2008-02-05 Thread Oliver Thoms

Since printing would be platform depending there seems
to be no universal answer.

If you are programming for IE clients I would suggest 

use  window.print
or   window.document.execCommand('Print', , );

Encapsule it in an own Javascript function (for how
just google javascrpt print or refer to a JS board)
perhaps with an id as param (so you can print just
specific named parts of your page)

And call your function in the onclick of a nice
button...



--- Kavita Mehta [EMAIL PROTECTED] schrieb:

 how do u implement using js ..can u send me any link
 having more info ..
 
 
 
 
 bhaarat Sharma [EMAIL PROTECTED] 
 02/05/2008 11:02 AM
 Please respond to
 Struts Users Mailing List user@struts.apache.org
 
 
 To
 Struts Users Mailing List user@struts.apache.org
 cc
 
 Subject
 Re: How to add prinr option ?
 
 
 
 
 
 
 CSS and JS are best for this
 
 On Feb 5, 2008 12:21 AM, Kavita Mehta
 [EMAIL PROTECTED] wrote:
  Hi ,
  I have a web page implemented using Struts and I
 want to add a Printer
  button to it so that user can take print out of
 the same. Is there any
  option supported by struts to do this ?
 
 
  Thanks in advance ,
  Kavita
 
 
 
 
  

*DISCLAIMER*
 
  This message and/or attachment(s) contained here
 are confidential, 
 proprietary to HUGHES SYSTIQUE and its customers.
  Contents may be privileged or otherwise protected
 by law. The 
 information is solely intended for the entity it is
  addressed to. If you are not the intended
 recipient of this message, it 
 is strictly prohibited to read, forward,
  print, retain, copy or disseminate this message or
 any part of it. If 
 you have received this e-mail in error,
  please notify the sender immediately and delete
 the message.
 
  


 
 
 

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

*DISCLAIMER*
 
 This message and/or attachment(s) contained here are
 confidential, proprietary to HUGHES SYSTIQUE and its
 customers. 
 Contents may be privileged or otherwise protected by
 law. The information is solely intended for the
 entity it is 
 addressed to. If you are not the intended recipient
 of this message, it is strictly prohibited to read,
 forward, 
 print, retain, copy or disseminate this message or
 any part of it. If you have received this e-mail in
 error, 
 please notify the sender immediately and delete the
 message.
 


 
 



  Machen Sie Yahoo! zu Ihrer Startseite. Los geht's: 
http://de.yahoo.com/set

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



Re: Best Tool to develop html pages

2008-02-05 Thread Manos Batsis

mohammed hussain wrote:

Hi anybody knowing the best tools to develop to html page,pls let me know


There is no such thing. Do you need WYSIWYG? Are you looking for JSP 
etc. awareness? Do you feel comfortable editing markup by hand? What are 
your target DTDs?


Manos


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



Re: [OT] Re: Best Tool to develop html pages

2008-02-05 Thread Al Sutton

My vote is for vi

Al.

- Original Message - 
From: Dave Newton [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Tuesday, February 05, 2008 11:58 AM
Subject: [OT] Re: Best Tool to develop html pages



--- mohammed hussain [EMAIL PROTECTED] wrote:

Hi anybody knowing the best tools to develop to html page,pls let me know


Emacs, hands down.

Dave


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



Re: [OT] Re: Best Tool to develop html pages

2008-02-05 Thread Dave Newton
--- Al Sutton [EMAIL PROTECTED] wrote:
 My vote is for vi

I don't even know you, man.

d.

 
 Al.
 
 - Original Message - 
 From: Dave Newton [EMAIL PROTECTED]
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Tuesday, February 05, 2008 11:58 AM
 Subject: [OT] Re: Best Tool to develop html pages
 
 
  --- mohammed hussain [EMAIL PROTECTED] wrote:
  Hi anybody knowing the best tools to develop to html page,pls let me
 know
 
  Emacs, hands down.
 
  Dave
 
 
  -
  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]
 
 


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



Re: [OT] Re: Best Tool to develop html pages

2008-02-05 Thread Leon Rosenberg
The best tool to develop a html page is clearly a web designer paired
with a html producer.

Leon.

On Feb 5, 2008 1:39 PM, Dave Newton [EMAIL PROTECTED] wrote:
 --- Al Sutton [EMAIL PROTECTED] wrote:
  My vote is for vi

 I don't even know you, man.

 d.


 
  Al.
 
  - Original Message -
  From: Dave Newton [EMAIL PROTECTED]
  To: Struts Users Mailing List user@struts.apache.org
  Sent: Tuesday, February 05, 2008 11:58 AM
  Subject: [OT] Re: Best Tool to develop html pages
 
 
   --- mohammed hussain [EMAIL PROTECTED] wrote:
   Hi anybody knowing the best tools to develop to html page,pls let me
  know
  
   Emacs, hands down.
  
   Dave
  
  
   -
   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]
 
 


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



Custom OGNL PropertyAccessor

2008-02-05 Thread Tommy Becker
I have a question about using OGNL PropertyAccessors.  We have an object on the 
value stack that we expose to JSP pages that does not have standard JavaBeans 
getter/setter methods.  From what I can tell, this leaves us 2 options.  We can 
either call the getter methods explicitly via OGNL method calls in the pages, or 
we can wrap the object in a JavaBean-like object.  The second option is 
unworkable in all but the simplest of cases when you realize that the method 
calls can themselves return another object that needs to be wrapped, or even a 
collection of them.  So we've been using method calls in the pages (yeah I know).


Reading through the OGNL docs, it seems that what we need is a PropertyAccessor 
that knows how to operate on our object.  So we implemented one, and attempted 
to register it by placing this in our struts.xml:


bean type=ognl.PropertyAccessor name=class.we.need.access.to 
class=our.property.accessor.PropertyAccessor/


Unfortunately it doesn't work.  Can someone tell me what we're doing wrong, or 
even if what we're trying to do is possible?  Thanks!


http://www.motricity.com


NOTICE: This e-mail message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information of Motricity.  Any 
unauthorized review, use, disclosure or distribution is prohibited.  If you are 
not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message.

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



[OT] Re: Best Tool to develop html pages

2008-02-05 Thread Antonio Petrelli
2008/2/5, mohammed hussain [EMAIL PROTECTED]:
 Hi anybody knowing the best tools to develop to html page,pls let me know
 thanx

Now seriously, Mohammed, your question is too generic.
Do you need a WYSIWYG editor? Do you need to use it in your
application (i.e. using a Javascript editor)?

Antonio

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



Script Error

2008-02-05 Thread McShiv

Hi All,

 I'm using the forllowing javascript and HTML Code for my project. I
need to change the selectedRow text value (from 0 to 1) and other rows to 0
(indicating 1-selected row 0-unselectedrow). Because of using innerText in
the JavaScript, the textbox is changed as label. There is any other keywords
availabe to change the text box value during the onMouseDown operation?
Please send any example code for clarification. Thanks.

JavaScript Code

 function selectRow(row)
{
alert('Inside Select Row');
var tbl  = document.getElementById('WorkingList');
var cmpStr = '0'
var rows = tbl.getElementsByTagName('TR');
for (var rowNum = 1; rowNum  rows.length; rowNum++)
{
var celTD = rows[rowNum].getElementsByTagName('TD');
if(celTD[0].innerText != cmpStr)
{
celTD[0].innerText = '0';
}
}
var celTDselected = row.getElementsByTagName('TD');
celTDselected[0].innerText = '1';
document.retrieveFormGenInfo.submit();
}

HTML Code

 logic:iterate name=formsForm property=formsVO id=formsVO
tr onMouseDown = selectRow(this)
td
html:text name=formsVO property=selectedRow 
indexed=true/
/td
td
html:text name=formsVO property=formId 
indexed=true/
/td
td
 ./images/lock.png 
/td
td
bean:write name=formsVO property=formNumber/
/td
td
bean:write name=formsVO property=formTitle/
/td
td
bean:write name=formsVO property=editionDate/
/td
/tr
/logic:iterate


Thanks,
McShiv.

-- 
View this message in context: 
http://www.nabble.com/Script-Error-tp15291018p15291018.html
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: AjaxTag 1.3 support?

2008-02-05 Thread Griffith, Michael *
Musachy, 

I can't seem to create the right blend of Entity objects/list/maps to
allow the JSON plug in to serialize this response for me. If I create
the string below using a loop, can I return it from the JSON plug in
without the plug in doing anything further to it?  

In other words, does the plug in look at what it is trying to serialize
and say, Hey this is already valid JSON, I don't need to do anything to
it... or will it try to add additional info to the string returned?

I'm guessing the shortest path for me is to just create the string in my
own serialization loop, but I don't want to confuse the plug in -- if
that makes any sense.

MG

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 04, 2008 6:30 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?

Right on.

On Feb 4, 2008 6:45 PM, Griffith, Michael *
[EMAIL PROTECTED] wrote:
 Dave,

 I think the bigger problem is the JSON that is returned, while it may
be
 valid, it not in the right structure expected. I should be generating
 JSON like this:

 {questions:{420:Is your Java Application a ME, SE or EE
 application?,440:If your Java Application is an SE application
does
 it use Java Web Start?}}

 The [] brackets seem to be ignored by the parser.

 -Original Message-
 From: Dave Newton [mailto:[EMAIL PROTECTED]
 Sent: Monday, February 04, 2008 5:34 PM
 To: Struts Users Mailing List
 Subject: RE: AjaxTag 1.3 support?

 ...


 That's probably an issue.

 --- Griffith, Michael * [EMAIL PROTECTED] wrote:
  Yea, I think so -- I copied and pasted this from the log
 file/console...
 
  From: Dave Newton [mailto:[EMAIL PROTECTED]
 
  Is it generating those brackets around your JSON?
 
  --- Griffith, Michael * [EMAIL PROTECTED] wrote:
 
   Musachy,
  
   Thanks for your many replies... Does this JSON look like the right
   format? As far as I can tell, it matches your snippet below -- but
I
  get
   the same dojo parting error.
  
   [{questions:{420:Is your Java Application a ME, SE or EE
   application?}},{questions:{440:If your Java Application is
an
 SE
   application does it use Java Web Start?}},{questions:{450:If
  your
   Java Application is a Java Web Application, list the application
  server
   used for production}}]
  
   -Original Message-
   From: Musachy Barroso [mailto:[EMAIL PROTECTED]
   Sent: Monday, February 04, 2008 3:52 PM
   To: Struts Users Mailing List
   Subject: Re: AjaxTag 1.3 support?
  
   The rule to use a map (simplest one) was added on 2.1, on 2.0.x
the
   easiest way to generate the json is to have an object with a map
 field
   that matches the name of dataFieldName in the autocompleter tag:
  
   class QuestionJson {
 private Map questions;
 
   }
  
   public QuestionJson getQuestionJson() {
 Question q= ... [from my list]
  Map m = new HaswhMap();
  m.put(Key1, q.getQuestion1());
  m.put(Key2, q.getQuestion2());
  return new QuestionJson(m);
   }
  
   s:autocompleter ... dataFieldName=questions ../
  
   that will generate something like:
  
   {
 questions: {
Key1 : Question 1,
Key2 : Question 2,
 }
   }
  
   //that's the idea, but I typed out of what I remember which is
often
  not
   good :)
  
   musachy
  
   On Feb 4, 2008 4:34 PM, Griffith, Michael *
   [EMAIL PROTECTED] wrote:
Musachy,
   
I'm still not getting it...
I am now serializing a list of maps with the entity id and text
I
want...
   
MapString,String m= new HashMapString,String();
Question q= ... [from my list]
m.put(id, q.getId().toString());
m.put(text, q.getText());
newList.add(m);
   
And my JSON result looks:
   
[JSON][{text:Is your Java Application a ME, SE or EE
application?,id:420},{text:If your Java Application is
an
 SE
application does it use Java Web Start?,id:440},{text:If
  your
Java Application is a Java Web Application, list the application
   server
used for production,id:450},{text:List any Java Web
 Services
Technologies Used,id:490},{text:List any Java Web
  Application
Technologies Used for presentation,id:500},{text:List
any
  Java
EE Technologies used in your application,id:510}]
   
I added the @JSON annotation as such:
   
@JSON(name=question)
public ListMapString,String getNewList(){
return newList;
}
   
But it appears to be ignored.
   
MG
   
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
   
Sent: Monday, February 04, 2008 2:53 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
   
Take a look here:
   
http://cwiki.apache.org/S2PLUGINS/json-plugin.html
   
musachy
   
On Feb 4, 2008 3:43 PM, Griffith, Michael *
[EMAIL PROTECTED] wrote:
 So, if you have an array of Entity objects, in my case
question:

 How can I produce?
  {
  question 

Re: [OT] Re: Best Tool to develop html pages

2008-02-05 Thread Al Sutton
I'm the one with the 9 inch fingers that bend in 6 places so I can do key 
sequences with one hand :).


- Original Message - 
From: Dave Newton [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Tuesday, February 05, 2008 12:39 PM
Subject: Re: [OT] Re: Best Tool to develop html pages



--- Al Sutton [EMAIL PROTECTED] wrote:

My vote is for vi


I don't even know you, man.

d.



Al.

- Original Message - 
From: Dave Newton [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Tuesday, February 05, 2008 11:58 AM
Subject: [OT] Re: Best Tool to develop html pages


 --- mohammed hussain [EMAIL PROTECTED] wrote:
 Hi anybody knowing the best tools to develop to html page,pls let me
know

 Emacs, hands down.

 Dave


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





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



Re: Script Error

2008-02-05 Thread Musachy Barroso
http://www.google.com/search?source=ighl=enrlz=q=set+textbox+value+javascriptbtnG=Google+Search

On Feb 5, 2008 9:22 AM, McShiv [EMAIL PROTECTED] wrote:

 Hi All,

  I'm using the forllowing javascript and HTML Code for my project. I
 need to change the selectedRow text value (from 0 to 1) and other rows to 0
 (indicating 1-selected row 0-unselectedrow). Because of using innerText in
 the JavaScript, the textbox is changed as label. There is any other keywords
 availabe to change the text box value during the onMouseDown operation?
 Please send any example code for clarification. Thanks.

 JavaScript Code

  function selectRow(row)
 {
 alert('Inside Select Row');
 var tbl  = document.getElementById('WorkingList');
 var cmpStr = '0'
 var rows = tbl.getElementsByTagName('TR');
 for (var rowNum = 1; rowNum  rows.length; rowNum++)
 {
 var celTD = rows[rowNum].getElementsByTagName('TD');
 if(celTD[0].innerText != cmpStr)
 {
 celTD[0].innerText = '0';
 }
 }
 var celTDselected = row.getElementsByTagName('TD');
 celTDselected[0].innerText = '1';
 document.retrieveFormGenInfo.submit();
 }

 HTML Code

  logic:iterate name=formsForm property=formsVO id=formsVO
 tr onMouseDown = selectRow(this)
 td
 html:text name=formsVO property=selectedRow 
 indexed=true/
 /td
 td
 html:text name=formsVO property=formId 
 indexed=true/
 /td
 td
  ./images/lock.png
 /td
 td
 bean:write name=formsVO property=formNumber/
 /td
 td
 bean:write name=formsVO property=formTitle/
 /td
 td
 bean:write name=formsVO property=editionDate/
 /td
 /tr
 /logic:iterate


 Thanks,
 McShiv.

 --
 View this message in context: 
 http://www.nabble.com/Script-Error-tp15291018p15291018.html
 Sent from the Struts - User mailing list archive at Nabble.com.


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





-- 
Hey you! Would you help me to carry the stone? Pink Floyd

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



Re: Struts 2.0.11 + DWR 2.0 + ajax validation

2008-02-05 Thread ravi_eze

yaa,

in struts shwocase check the web.xml and dwr.xml. 

wou would require dwrxxx.jar for this in web-inf/lib and struts theme=ajax
in the jsps.

hope this helps.



Filipe David Manana-2 wrote:
 
 Hi,
 
 Has anyone been able to put dwr 2.0 working with struts 2.0.11 ajax
 validation?
 
 
 
 -- 
 Filipe David Manana,
 [EMAIL PROTECTED]
 
 Obvious facts are like secrets to those not trained to see them.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Struts-2.0.11-%2B-DWR-2.0-%2B-ajax-validation-tp15287347p15291439.html
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: [OT] Re: Best Tool to develop html pages

2008-02-05 Thread Al Sutton

H... Butterflies you say. where's my big net.. :)

- Original Message - 
From: Antonio Petrelli [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Tuesday, February 05, 2008 1:03 PM
Subject: Re: [OT] Re: Best Tool to develop html pages



2008/2/5, Al Sutton [EMAIL PROTECTED]:

My vote is for vi


http://xkcd.com/378/

Antonio

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



Re: [OT] Re: Best Tool to develop html pages

2008-02-05 Thread Dave Newton
--- Al Sutton [EMAIL PROTECTED] wrote:
 I'm the one with the 9 inch fingers that bend in 6 places so I can do key 
 sequences with one hand :).

Ah, so you DO use Emacs.

 
 - Original Message - 
 From: Dave Newton [EMAIL PROTECTED]
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Tuesday, February 05, 2008 12:39 PM
 Subject: Re: [OT] Re: Best Tool to develop html pages
 
 
  --- Al Sutton [EMAIL PROTECTED] wrote:
  My vote is for vi
 
  I don't even know you, man.
 
  d.
 
 
  Al.
 
  - Original Message - 
  From: Dave Newton [EMAIL PROTECTED]
  To: Struts Users Mailing List user@struts.apache.org
  Sent: Tuesday, February 05, 2008 11:58 AM
  Subject: [OT] Re: Best Tool to develop html pages
 
 
   --- mohammed hussain [EMAIL PROTECTED] wrote:
   Hi anybody knowing the best tools to develop to html page,pls let me
  know
  
   Emacs, hands down.
  
   Dave
  
  
   -
   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]
 
 
 
 
  -
  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]
 
 


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



RE: AjaxTag 1.3 support?

2008-02-05 Thread Griffith, Michael *
Well, to answer my own question -- the answer is no. The JSON result
serialization process escapes quotation marks, so my response that
looked like this before serialization:

{questions:{420:Is your Java Application a ME, SE or EE
application?,440:If your Java Application is an SE application does
it use Java Web Start?,450:If your Java Application is a Java Web
Application, list the application server used for
production,490:List any Java Web Services Technologies
Used,500:List any Java Web Application Technologies Used for
presentation,510:List any Java EE Technologies used in your
application}}

Looks like this after serialization:

{\questions\:{\420\:\Is your Java Application a ME, SE or EE
application?\,\440\:\If your Java Application is an SE application
does it use Java Web Start?\,\450\:\If your Java Application is a
Java Web Application, list the application server used for
production\,\490\:\List any Java Web Services Technologies
Used\,\500\:\List any Java Web Application Technologies Used for
presentation\,\510\:\List any Java EE Technologies used in your
application\}}

Making it unrecognizable to the autocompleter. This is pretty
frustrating to me. Maybe I am expecting this to do something that it was
never designed to do. My end goal was to be able to evaluate the ID of
the question that the user selected from the autocompleter.  

I'm giving up this path and looking elsewhere.  Thanks to everyone that
replied to my question and tried to help me.

MG

-Original Message-
From: Griffith, Michael * [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 05, 2008 8:32 AM
To: Struts Users Mailing List
Subject: RE: AjaxTag 1.3 support?

Musachy, 

I can't seem to create the right blend of Entity objects/list/maps to
allow the JSON plug in to serialize this response for me. If I create
the string below using a loop, can I return it from the JSON plug in
without the plug in doing anything further to it?  

In other words, does the plug in look at what it is trying to serialize
and say, Hey this is already valid JSON, I don't need to do anything to
it... or will it try to add additional info to the string returned?

I'm guessing the shortest path for me is to just create the string in my
own serialization loop, but I don't want to confuse the plug in -- if
that makes any sense.

MG

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 04, 2008 6:30 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?

Right on.

On Feb 4, 2008 6:45 PM, Griffith, Michael *
[EMAIL PROTECTED] wrote:
 Dave,

 I think the bigger problem is the JSON that is returned, while it may
be
 valid, it not in the right structure expected. I should be generating
 JSON like this:

 {questions:{420:Is your Java Application a ME, SE or EE
 application?,440:If your Java Application is an SE application
does
 it use Java Web Start?}}

 The [] brackets seem to be ignored by the parser.

 -Original Message-
 From: Dave Newton [mailto:[EMAIL PROTECTED]
 Sent: Monday, February 04, 2008 5:34 PM
 To: Struts Users Mailing List
 Subject: RE: AjaxTag 1.3 support?

 ...


 That's probably an issue.

 --- Griffith, Michael * [EMAIL PROTECTED] wrote:
  Yea, I think so -- I copied and pasted this from the log
 file/console...
 
  From: Dave Newton [mailto:[EMAIL PROTECTED]
 
  Is it generating those brackets around your JSON?
 
  --- Griffith, Michael * [EMAIL PROTECTED] wrote:
 
   Musachy,
  
   Thanks for your many replies... Does this JSON look like the right
   format? As far as I can tell, it matches your snippet below -- but
I
  get
   the same dojo parting error.
  
   [{questions:{420:Is your Java Application a ME, SE or EE
   application?}},{questions:{440:If your Java Application is
an
 SE
   application does it use Java Web Start?}},{questions:{450:If
  your
   Java Application is a Java Web Application, list the application
  server
   used for production}}]
  
   -Original Message-
   From: Musachy Barroso [mailto:[EMAIL PROTECTED]
   Sent: Monday, February 04, 2008 3:52 PM
   To: Struts Users Mailing List
   Subject: Re: AjaxTag 1.3 support?
  
   The rule to use a map (simplest one) was added on 2.1, on 2.0.x
the
   easiest way to generate the json is to have an object with a map
 field
   that matches the name of dataFieldName in the autocompleter tag:
  
   class QuestionJson {
 private Map questions;
 
   }
  
   public QuestionJson getQuestionJson() {
 Question q= ... [from my list]
  Map m = new HaswhMap();
  m.put(Key1, q.getQuestion1());
  m.put(Key2, q.getQuestion2());
  return new QuestionJson(m);
   }
  
   s:autocompleter ... dataFieldName=questions ../
  
   that will generate something like:
  
   {
 questions: {
Key1 : Question 1,
Key2 : Question 2,
 }
   }
  
   //that's the idea, but I typed out of what I remember which is
often
  not
   good :)
  
   musachy
  
   On Feb 4, 2008 

Re: Struts 2.0.11 + DWR 2.0 + ajax validation

2008-02-05 Thread Filipe David Manana
Well, thanks for the reply

My problem is not setting up DWR.
I have DWR 1.1.3 working with struts 2.0.11 ajax form validation.

I just want to migrate to dwr 2.0. But if I replace dwr 1.1.3 with dwr
2.0, my form ajax validation no longer works. Whenever one required
form field looses focus, I get a javascript alert dialog with the
message null.

I suppose this is not working because of struts2's generated javascript calls.

Any one tried?

On Feb 5, 2008 4:47 PM, ravi_eze [EMAIL PROTECTED] wrote:

 yaa,

 in struts shwocase check the web.xml and dwr.xml.

 wou would require dwrxxx.jar for this in web-inf/lib and struts theme=ajax
 in the jsps.

 A detailed explanation is given @:
 http://java-x.blogspot.com/2007/03/reverse-ajax-with-direct-web-remoting.html
 even i learnt it from there.


 hope this helps.



 Filipe David Manana-2 wrote:
 
  Hi,
 
  Has anyone been able to put dwr 2.0 working with struts 2.0.11 ajax
  validation?
 
 
 
  --
  Filipe David Manana,
  [EMAIL PROTECTED]
 
  Obvious facts are like secrets to those not trained to see them.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/Struts-2.0.11-%2B-DWR-2.0-%2B-ajax-validation-tp15287347p15291439.html
 Sent from the Struts - User mailing list archive at Nabble.com.


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





-- 
Filipe David Manana,
[EMAIL PROTECTED]

Obvious facts are like secrets to those not trained to see them.

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



dispaytag + Struts 2.1.x: encoding parameters into requestURI

2008-02-05 Thread Giovanni Azua

hi,

I require encoding get parameters into the requestURI field but I can't 
find the way e.g.


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

display:table name=statistics id=statistics defaultorder=descending
 requestURI=/SimulationReport.action?simulationKey=
 export=false sort=list 
decorator=com.sag.optimizer.ui.web.displaytag.decorator.StatisticDecorator

 display:column property=name title=Statistic /
 display:column property=value title=Value 
format={0,number,0.00} sortable=true style=text-align: right; 
headerClass=sortable /
 display:caption style=font-weight: bold; font-size: 
120%;Statistics/display:caption   
/display:table


Assuming I make available a parameter simulationKey:

% String mySimulationKey = 
request.getAttribute(simulationKey).toString(); %


display:table name=statistics id=statistics defaultorder=descending
 requestURI=/SimulationReport.action?simulationKey=%=mySimulationKey%
...

or

s:url var=simulationReport includeParams=get 
value=/SimulationReport.action 
s:param name=simulationKey value=%{simulationKey} /   
/s:url


display:table name=statistics id=statistics defaultorder=descending
 requestURI=%{#simulationReport}
...

I have also tried calling a javascript function and encoding it there 
but does not work either :(


Any advice?

regards,
Giovanni




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



Re: AjaxTag 1.3 support?

2008-02-05 Thread Musachy Barroso
Don't give up so easily :). That is just a setting on the json plugin
to prevent cross site  scripting, and can be disabled.

musachy

On Feb 5, 2008 11:27 AM, Griffith, Michael *
[EMAIL PROTECTED] wrote:
 Well, to answer my own question -- the answer is no. The JSON result
 serialization process escapes quotation marks, so my response that
 looked like this before serialization:

 {questions:{420:Is your Java Application a ME, SE or EE
 application?,440:If your Java Application is an SE application does
 it use Java Web Start?,450:If your Java Application is a Java Web
 Application, list the application server used for
 production,490:List any Java Web Services Technologies
 Used,500:List any Java Web Application Technologies Used for
 presentation,510:List any Java EE Technologies used in your
 application}}

 Looks like this after serialization:

 {\questions\:{\420\:\Is your Java Application a ME, SE or EE
 application?\,\440\:\If your Java Application is an SE application
 does it use Java Web Start?\,\450\:\If your Java Application is a
 Java Web Application, list the application server used for
 production\,\490\:\List any Java Web Services Technologies
 Used\,\500\:\List any Java Web Application Technologies Used for
 presentation\,\510\:\List any Java EE Technologies used in your
 application\}}

 Making it unrecognizable to the autocompleter. This is pretty
 frustrating to me. Maybe I am expecting this to do something that it was
 never designed to do. My end goal was to be able to evaluate the ID of
 the question that the user selected from the autocompleter.

 I'm giving up this path and looking elsewhere.  Thanks to everyone that
 replied to my question and tried to help me.

 MG


 -Original Message-
 From: Griffith, Michael * [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 05, 2008 8:32 AM
 To: Struts Users Mailing List
 Subject: RE: AjaxTag 1.3 support?

 Musachy,

 I can't seem to create the right blend of Entity objects/list/maps to
 allow the JSON plug in to serialize this response for me. If I create
 the string below using a loop, can I return it from the JSON plug in
 without the plug in doing anything further to it?

 In other words, does the plug in look at what it is trying to serialize
 and say, Hey this is already valid JSON, I don't need to do anything to
 it... or will it try to add additional info to the string returned?

 I'm guessing the shortest path for me is to just create the string in my
 own serialization loop, but I don't want to confuse the plug in -- if
 that makes any sense.

 MG

 -Original Message-
 From: Musachy Barroso [mailto:[EMAIL PROTECTED]
 Sent: Monday, February 04, 2008 6:30 PM
 To: Struts Users Mailing List
 Subject: Re: AjaxTag 1.3 support?

 Right on.

 On Feb 4, 2008 6:45 PM, Griffith, Michael *
 [EMAIL PROTECTED] wrote:
  Dave,
 
  I think the bigger problem is the JSON that is returned, while it may
 be
  valid, it not in the right structure expected. I should be generating
  JSON like this:
 
  {questions:{420:Is your Java Application a ME, SE or EE
  application?,440:If your Java Application is an SE application
 does
  it use Java Web Start?}}
 
  The [] brackets seem to be ignored by the parser.
 
  -Original Message-
  From: Dave Newton [mailto:[EMAIL PROTECTED]
  Sent: Monday, February 04, 2008 5:34 PM
  To: Struts Users Mailing List
  Subject: RE: AjaxTag 1.3 support?
 
  ...
 
 
  That's probably an issue.
 
  --- Griffith, Michael * [EMAIL PROTECTED] wrote:
   Yea, I think so -- I copied and pasted this from the log
  file/console...
  
   From: Dave Newton [mailto:[EMAIL PROTECTED]
  
   Is it generating those brackets around your JSON?
  
   --- Griffith, Michael * [EMAIL PROTECTED] wrote:
  
Musachy,
   
Thanks for your many replies... Does this JSON look like the right
format? As far as I can tell, it matches your snippet below -- but
 I
   get
the same dojo parting error.
   
[{questions:{420:Is your Java Application a ME, SE or EE
application?}},{questions:{440:If your Java Application is
 an
  SE
application does it use Java Web Start?}},{questions:{450:If
   your
Java Application is a Java Web Application, list the application
   server
used for production}}]
   
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Monday, February 04, 2008 3:52 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
   
The rule to use a map (simplest one) was added on 2.1, on 2.0.x
 the
easiest way to generate the json is to have an object with a map
  field
that matches the name of dataFieldName in the autocompleter tag:
   
class QuestionJson {
  private Map questions;
  
}
   
public QuestionJson getQuestionJson() {
  Question q= ... [from my list]
   Map m = new HaswhMap();
   m.put(Key1, q.getQuestion1());
   m.put(Key2, q.getQuestion2());
   return new 

Re: dispaytag + Struts 2.1.x: encoding parameters into requestURI

2008-02-05 Thread Randy Burgess
All you should need is a getter in your action for simulationKey and then

 display:table name=statistics id=statistics defaultorder=descending
   requestURI=/SimulationReport.action?simulationKey=${simulationKey}
 

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



 From: Giovanni Azua [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List user@struts.apache.org
 Date: Tue, 05 Feb 2008 18:17:35 +0100
 To: Struts Users Mailing List user@struts.apache.org
 Subject: dispaytag + Struts 2.1.x: encoding parameters into requestURI
 
 hi,
 
 I require encoding get parameters into the requestURI field but I can't
 find the way e.g.
 
 %@ page contentType=text/html; charset=UTF-8%
 %@ taglib prefix=s uri=/struts-tags%
 %@ taglib prefix=display uri=http://displaytag.sf.net/el; %
 
 display:table name=statistics id=statistics defaultorder=descending
   requestURI=/SimulationReport.action?simulationKey=
   export=false sort=list
 decorator=com.sag.optimizer.ui.web.displaytag.decorator.StatisticDecorator
   display:column property=name title=Statistic /
   display:column property=value title=Value
 format={0,number,0.00} sortable=true style=text-align: right;
 headerClass=sortable /
   display:caption style=font-weight: bold; font-size:
 120%;Statistics/display:caption
  /display:table
 
 Assuming I make available a parameter simulationKey:
 
 % String mySimulationKey =
 request.getAttribute(simulationKey).toString(); %
 
 display:table name=statistics id=statistics defaultorder=descending
   requestURI=/SimulationReport.action?simulationKey=%=mySimulationKey%
 ...
 
 or
 
 s:url var=simulationReport includeParams=get
 value=/SimulationReport.action 
  s:param name=simulationKey value=%{simulationKey} /
 /s:url
 
 display:table name=statistics id=statistics defaultorder=descending
   requestURI=%{#simulationReport}
 ...
 
 I have also tried calling a javascript function and encoding it there
 but does not work either :(
 
 Any advice?
 
 regards,
 Giovanni
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



This email and any attachments (Message) may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this 
Message has been addressed to you in error, you are not authorized to read, 
copy, or distribute it, and we ask that you please delete it (including all 
copies) and notify the sender by return email.  Delivery of this Message to any 
person other than the intended recipient(s) shall not be deemed a waiver of 
confidentiality and/or a privilege.

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



Re: AjaxTag 1.3 support?

2008-02-05 Thread Musachy Barroso
add:

param name=wrapWithCommentsfalse/param

to the result. See the section Wrap with Comments here:

http://cwiki.apache.org/S2PLUGINS/json-plugin.html

musachy

On Feb 5, 2008 12:58 PM, Griffith, Michael *
[EMAIL PROTECTED] wrote:
 Musachy,

 I've looked over the documentation, and looked in the JSONWriter class
 -- and it is not obvious to me how to configure this plugin setting.
 How is it done?

 MG

 -Original Message-
 From: Musachy Barroso [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 05, 2008 11:23 AM
 To: Struts Users Mailing List

 Subject: Re: AjaxTag 1.3 support?

 Don't give up so easily :). That is just a setting on the json plugin
 to prevent cross site  scripting, and can be disabled.

 musachy

 On Feb 5, 2008 11:27 AM, Griffith, Michael *
 [EMAIL PROTECTED] wrote:
  Well, to answer my own question -- the answer is no. The JSON result
  serialization process escapes quotation marks, so my response that
  looked like this before serialization:
 
  {questions:{420:Is your Java Application a ME, SE or EE
  application?,440:If your Java Application is an SE application
 does
  it use Java Web Start?,450:If your Java Application is a Java Web
  Application, list the application server used for
  production,490:List any Java Web Services Technologies
  Used,500:List any Java Web Application Technologies Used for
  presentation,510:List any Java EE Technologies used in your
  application}}
 
  Looks like this after serialization:
 
  {\questions\:{\420\:\Is your Java Application a ME, SE or EE
  application?\,\440\:\If your Java Application is an SE application
  does it use Java Web Start?\,\450\:\If your Java Application is a
  Java Web Application, list the application server used for
  production\,\490\:\List any Java Web Services Technologies
  Used\,\500\:\List any Java Web Application Technologies Used for
  presentation\,\510\:\List any Java EE Technologies used in your
  application\}}
 
  Making it unrecognizable to the autocompleter. This is pretty
  frustrating to me. Maybe I am expecting this to do something that it
 was
  never designed to do. My end goal was to be able to evaluate the ID of
  the question that the user selected from the autocompleter.
 
  I'm giving up this path and looking elsewhere.  Thanks to everyone
 that
  replied to my question and tried to help me.
 
  MG
 
 
  -Original Message-
  From: Griffith, Michael * [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 05, 2008 8:32 AM
  To: Struts Users Mailing List
  Subject: RE: AjaxTag 1.3 support?
 
  Musachy,
 
  I can't seem to create the right blend of Entity objects/list/maps to
  allow the JSON plug in to serialize this response for me. If I create
  the string below using a loop, can I return it from the JSON plug in
  without the plug in doing anything further to it?
 
  In other words, does the plug in look at what it is trying to
 serialize
  and say, Hey this is already valid JSON, I don't need to do anything
 to
  it... or will it try to add additional info to the string returned?
 
  I'm guessing the shortest path for me is to just create the string in
 my
  own serialization loop, but I don't want to confuse the plug in -- if
  that makes any sense.
 
  MG
 
  -Original Message-
  From: Musachy Barroso [mailto:[EMAIL PROTECTED]
  Sent: Monday, February 04, 2008 6:30 PM
  To: Struts Users Mailing List
  Subject: Re: AjaxTag 1.3 support?
 
  Right on.
 
  On Feb 4, 2008 6:45 PM, Griffith, Michael *
  [EMAIL PROTECTED] wrote:
   Dave,
  
   I think the bigger problem is the JSON that is returned, while it
 may
  be
   valid, it not in the right structure expected. I should be
 generating
   JSON like this:
  
   {questions:{420:Is your Java Application a ME, SE or EE
   application?,440:If your Java Application is an SE application
  does
   it use Java Web Start?}}
  
   The [] brackets seem to be ignored by the parser.
  
   -Original Message-
   From: Dave Newton [mailto:[EMAIL PROTECTED]
   Sent: Monday, February 04, 2008 5:34 PM
   To: Struts Users Mailing List
   Subject: RE: AjaxTag 1.3 support?
  
   ...
  
  
   That's probably an issue.
  
   --- Griffith, Michael * [EMAIL PROTECTED] wrote:
Yea, I think so -- I copied and pasted this from the log
   file/console...
   
From: Dave Newton [mailto:[EMAIL PROTECTED]
   
Is it generating those brackets around your JSON?
   
--- Griffith, Michael * [EMAIL PROTECTED] wrote:
   
 Musachy,

 Thanks for your many replies... Does this JSON look like the
 right
 format? As far as I can tell, it matches your snippet below --
 but
  I
get
 the same dojo parting error.

 [{questions:{420:Is your Java Application a ME, SE or EE
 application?}},{questions:{440:If your Java Application is
  an
   SE
 application does it use Java Web
 Start?}},{questions:{450:If
your
 Java Application is a Java Web Application, list the application
server
 used for 

Re: Custom OGNL PropertyAccessor

2008-02-05 Thread Laurie Harper

Tommy Becker wrote:
I have a question about using OGNL PropertyAccessors.  We have an object 
on the value stack that we expose to JSP pages that does not have 
standard JavaBeans getter/setter methods.  From what I can tell, this 
leaves us 2 options.  We can either call the getter methods explicitly 
via OGNL method calls in the pages, or we can wrap the object in a 
JavaBean-like object.  The second option is unworkable in all but the 
simplest of cases when you realize that the method calls can themselves 
return another object that needs to be wrapped, or even a collection of 
them.  So we've been using method calls in the pages (yeah I know).


Reading through the OGNL docs, it seems that what we need is a 
PropertyAccessor that knows how to operate on our object.  So we 
implemented one, and attempted to register it by placing this in our 
struts.xml:


bean type=ognl.PropertyAccessor name=class.we.need.access.to 
class=our.property.accessor.PropertyAccessor/


Unfortunately it doesn't work.  Can someone tell me what we're doing 
wrong, or even if what we're trying to do is possible?  Thanks!


I don't know anything about OGNL's PropertyAccessor, but I doubt anyone 
can offer much help without seeing the code and a better description of 
the failure than it doesn't work.


L.


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



RE: AjaxTag 1.3 support?

2008-02-05 Thread Griffith, Michael *
Musachy, 

I've looked over the documentation, and looked in the JSONWriter class
-- and it is not obvious to me how to configure this plugin setting.
How is it done?

MG

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 05, 2008 11:23 AM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?

Don't give up so easily :). That is just a setting on the json plugin
to prevent cross site  scripting, and can be disabled.

musachy

On Feb 5, 2008 11:27 AM, Griffith, Michael *
[EMAIL PROTECTED] wrote:
 Well, to answer my own question -- the answer is no. The JSON result
 serialization process escapes quotation marks, so my response that
 looked like this before serialization:

 {questions:{420:Is your Java Application a ME, SE or EE
 application?,440:If your Java Application is an SE application
does
 it use Java Web Start?,450:If your Java Application is a Java Web
 Application, list the application server used for
 production,490:List any Java Web Services Technologies
 Used,500:List any Java Web Application Technologies Used for
 presentation,510:List any Java EE Technologies used in your
 application}}

 Looks like this after serialization:

 {\questions\:{\420\:\Is your Java Application a ME, SE or EE
 application?\,\440\:\If your Java Application is an SE application
 does it use Java Web Start?\,\450\:\If your Java Application is a
 Java Web Application, list the application server used for
 production\,\490\:\List any Java Web Services Technologies
 Used\,\500\:\List any Java Web Application Technologies Used for
 presentation\,\510\:\List any Java EE Technologies used in your
 application\}}

 Making it unrecognizable to the autocompleter. This is pretty
 frustrating to me. Maybe I am expecting this to do something that it
was
 never designed to do. My end goal was to be able to evaluate the ID of
 the question that the user selected from the autocompleter.

 I'm giving up this path and looking elsewhere.  Thanks to everyone
that
 replied to my question and tried to help me.

 MG


 -Original Message-
 From: Griffith, Michael * [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 05, 2008 8:32 AM
 To: Struts Users Mailing List
 Subject: RE: AjaxTag 1.3 support?

 Musachy,

 I can't seem to create the right blend of Entity objects/list/maps to
 allow the JSON plug in to serialize this response for me. If I create
 the string below using a loop, can I return it from the JSON plug in
 without the plug in doing anything further to it?

 In other words, does the plug in look at what it is trying to
serialize
 and say, Hey this is already valid JSON, I don't need to do anything
to
 it... or will it try to add additional info to the string returned?

 I'm guessing the shortest path for me is to just create the string in
my
 own serialization loop, but I don't want to confuse the plug in -- if
 that makes any sense.

 MG

 -Original Message-
 From: Musachy Barroso [mailto:[EMAIL PROTECTED]
 Sent: Monday, February 04, 2008 6:30 PM
 To: Struts Users Mailing List
 Subject: Re: AjaxTag 1.3 support?

 Right on.

 On Feb 4, 2008 6:45 PM, Griffith, Michael *
 [EMAIL PROTECTED] wrote:
  Dave,
 
  I think the bigger problem is the JSON that is returned, while it
may
 be
  valid, it not in the right structure expected. I should be
generating
  JSON like this:
 
  {questions:{420:Is your Java Application a ME, SE or EE
  application?,440:If your Java Application is an SE application
 does
  it use Java Web Start?}}
 
  The [] brackets seem to be ignored by the parser.
 
  -Original Message-
  From: Dave Newton [mailto:[EMAIL PROTECTED]
  Sent: Monday, February 04, 2008 5:34 PM
  To: Struts Users Mailing List
  Subject: RE: AjaxTag 1.3 support?
 
  ...
 
 
  That's probably an issue.
 
  --- Griffith, Michael * [EMAIL PROTECTED] wrote:
   Yea, I think so -- I copied and pasted this from the log
  file/console...
  
   From: Dave Newton [mailto:[EMAIL PROTECTED]
  
   Is it generating those brackets around your JSON?
  
   --- Griffith, Michael * [EMAIL PROTECTED] wrote:
  
Musachy,
   
Thanks for your many replies... Does this JSON look like the
right
format? As far as I can tell, it matches your snippet below --
but
 I
   get
the same dojo parting error.
   
[{questions:{420:Is your Java Application a ME, SE or EE
application?}},{questions:{440:If your Java Application is
 an
  SE
application does it use Java Web
Start?}},{questions:{450:If
   your
Java Application is a Java Web Application, list the application
   server
used for production}}]
   
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Monday, February 04, 2008 3:52 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
   
The rule to use a map (simplest one) was added on 2.1, on 2.0.x
 the
easiest way to generate the json is to have an object with a map
  field
that 

Tabs and Forms

2008-02-05 Thread Shanna7463

Hi everyone, I'm having trouble with a jsp that has two independent forms,
which are separated with tabs.  For some reason when i submit the second
form I get an error saying javax.servlet.jsp.JspException: Cannot find bean
under name roleList, roleList is a component in the first form.  Each form
has its own Action Form Bean and Action class.  
Here is my jsp: 

html
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8
link rel=stylesheet
href=%=request.getContextPath()%/stylesheets/application.css
type=text/css
titleHARPS User Management/title

tab:tabConfig /
/head
body

tab:tabContainer id=role-management
tab:tabPane id=roleAssignment tabTitle=Assign Roles 
h1 Add Users to a Role /h1
html:form action=/LoadUsers.do
html:hidden property=command value=initial/
table
tr
tdRoles:/td
tdCurrent Users in Role:/td
tdAll HARPS Users:/td
/tr
tr
td
html:select property=rolesList_id
multiple=false size=10 onclick=submit()
html:options collection=roleList
property=value labelProperty=label/
/html:select
/td
td
html:select property=userRoleList_id
multiple=true size=10
html:options collection=userRoleList
property=value labelProperty=label/
/html:select
/td
td 
html:select property=userList_id
multiple=true size=10
html:options collection=userList
property=value labelProperty=label/
/html:select 
/td
/tr
tr
td/td
td align=centerhtml:button
property=removeUser value= Remove User
onclick=command.value='remove';submit()//td
td align=centerhtml:button property=addUser
value= Add User onclick=command.value='addUser';submit()//td
/tr
/table
 /html:form 
/tab:tabPane

tab:tabPane id=createRole tabTitle=Create New Role
h1 Create a New Role /h1
html:form action=/CreateRole.do
table
tr
tdbean:message key=role.name/ /td
tdhtml:text property=roleName//td
td/td
/tr
tr
tdbean:message key=role.description//td
tdhtml:textarea property=roleDescription
rows=4//td
td
table
tr
tdhtml:checkbox property=jta//td
tdbean:message
key=jta.checkbox//td
/tr
tr
tdhtml:checkbox
property=ntsp//td
tdbean:message
key=ntsp.checkbox//td
/tr
tr
tdhtml:checkbox property=ia//td
tdbean:message
key=ia.checkbox//td
/tr
/table
/td
/tr
tr
tdhtml:submit value=Submit//td
td/td   
/tr
/table

/html:form
/tab:tabPane
/tab:tabContainer

/body
/html

When I submit the form it is going to the correct Action class (I can see
output from hitting the class), but it seems to fail when reloading the
page.  Is it maybe looking for roleList data when reloading the page?  Any
suggestions would be greatly appreciated!!!

-- Shanna --
-- 
View this message in context: 
http://www.nabble.com/Tabs-and-Forms-tp15296617p15296617.html
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: AjaxTag 1.3 support?

2008-02-05 Thread Griffith, Michael *
Musachy, 

This is the actual response from the action when I invoke it from the
browser:

{\questions\:{\420\:\Is your Java Application a ME, SE or EE
application?\,\440\:\If your Java Application is an SE application
does it use Java Web Start?\,\450\:\If your Java Application is a
Java Web Application, list the application server used for
production\,\490\:\List any Java Web Services Technologies
Used\,\500\:\List any Java Web Application Technologies Used for
presentation\,\510\:\List any Java EE Technologies used in your
application\}}

I am building the JSON string and returning it from the action...
private static final Character QUOTE= '';
private static final String DELIM= :;
private static final String COMMA=,;
private static final String OPEN_BRACE={;
private static final String CLOSE_BRACE=};

StrinBuffer sb= new StringBuffer();
StringBuffer sb= new StringBuffer();

sb.append(OPEN_BRACE).append(QUOTE).append(questions).append(QUOTE);
sb.append(DELIM).append(OPEN_BRACE);
for (Question question : list) {

sb.append(QUOTE).append(question.getId().toString()).append(QUOTE).appen
d(DELIM).append(QUOTE).append(question.getText()).append(QUOTE).append(C
OMMA);

}
...

The String actually looks like this before its serialized by the json
result:

{questions:{420:Is your Java Application a ME, SE or EE
application?,440:If your Java Application is an SE application does
it use Java Web Start?,450:If your Java Application is a Java Web
Application, list the application server used for
production,490:List any Java Web Services Technologies
Used,500:List any Java Web Application Technologies Used for
presentation,510:List any Java EE Technologies used in your
application}}

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 05, 2008 1:20 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?

Oh I am sorry about that! (doh) Do you see the quoutes escaped in
firebug or something? As far as I remember the plugin doesnt escape
the quoutes. If you put the url in your browser you should see the
generated json as it actually is.

musachy

On Feb 5, 2008 2:12 PM, Griffith, Michael *
[EMAIL PROTECTED] wrote:
 Musachy,

 Huh? That can't be right...

 First of all, the document says it wraps the JSON result in /* ... */
 comments, it doesn't say anything about escaping quotes.

 Second, the default value is false ;-)  Adding this to the result
 configuration did nothing to my result.  This seems like a bug.

 MG

 -Original Message-
 From: Musachy Barroso [mailto:[EMAIL PROTECTED]

 Sent: Tuesday, February 05, 2008 12:14 PM
 To: Struts Users Mailing List
 Subject: Re: AjaxTag 1.3 support?

 add:

 param name=wrapWithCommentsfalse/param

 to the result. See the section Wrap with Comments here:

 http://cwiki.apache.org/S2PLUGINS/json-plugin.html

 musachy

 On Feb 5, 2008 12:58 PM, Griffith, Michael *
 [EMAIL PROTECTED] wrote:
  Musachy,
 
  I've looked over the documentation, and looked in the JSONWriter
class
  -- and it is not obvious to me how to configure this plugin setting.
  How is it done?
 
  MG
 
  -Original Message-
  From: Musachy Barroso [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 05, 2008 11:23 AM
  To: Struts Users Mailing List
 
  Subject: Re: AjaxTag 1.3 support?
 
  Don't give up so easily :). That is just a setting on the json
plugin
  to prevent cross site  scripting, and can be disabled.
 
  musachy
 
  On Feb 5, 2008 11:27 AM, Griffith, Michael *
  [EMAIL PROTECTED] wrote:
   Well, to answer my own question -- the answer is no. The JSON
result
   serialization process escapes quotation marks, so my response that
   looked like this before serialization:
  
   {questions:{420:Is your Java Application a ME, SE or EE
   application?,440:If your Java Application is an SE application
  does
   it use Java Web Start?,450:If your Java Application is a Java
 Web
   Application, list the application server used for
   production,490:List any Java Web Services Technologies
   Used,500:List any Java Web Application Technologies Used for
   presentation,510:List any Java EE Technologies used in your
   application}}
  
   Looks like this after serialization:
  
   {\questions\:{\420\:\Is your Java Application a ME, SE or EE
   application?\,\440\:\If your Java Application is an SE
 application
   does it use Java Web Start?\,\450\:\If your Java Application
is
 a
   Java Web Application, list the application server used for
   production\,\490\:\List any Java Web Services Technologies
   Used\,\500\:\List any Java Web Application Technologies Used
for
   presentation\,\510\:\List any Java EE Technologies used in
your
   application\}}
  
   Making it unrecognizable to the autocompleter. This is pretty
   frustrating to me. Maybe I am expecting this to do something that
it
  was
   never designed to do. My 

Re: Custom OGNL PropertyAccessor

2008-02-05 Thread Tommy Becker
If there were a better description, I'd be happy to give it.  As far as 
I can tell, our custom PropertyAccessor is not being used.  What we want 
is to be able to say property in an OGNL expression and have it call 
getPropertyValue(property), not getProperty().  It seems it's 
continuing to try getProperty() despite our attempt at registering a 
custom PropertyAccessor.



Laurie Harper wrote:

Tommy Becker wrote:
I have a question about using OGNL PropertyAccessors.  We have an 
object on the value stack that we expose to JSP pages that does not 
have standard JavaBeans getter/setter methods.  From what I can tell, 
this leaves us 2 options.  We can either call the getter methods 
explicitly via OGNL method calls in the pages, or we can wrap the 
object in a JavaBean-like object.  The second option is unworkable in 
all but the simplest of cases when you realize that the method calls 
can themselves return another object that needs to be wrapped, or 
even a collection of them.  So we've been using method calls in the 
pages (yeah I know).


Reading through the OGNL docs, it seems that what we need is a 
PropertyAccessor that knows how to operate on our object.  So we 
implemented one, and attempted to register it by placing this in our 
struts.xml:


bean type=ognl.PropertyAccessor name=class.we.need.access.to 
class=our.property.accessor.PropertyAccessor/


Unfortunately it doesn't work.  Can someone tell me what we're doing 
wrong, or even if what we're trying to do is possible?  Thanks!


I don't know anything about OGNL's PropertyAccessor, but I doubt 
anyone can offer much help without seeing the code and a better 
description of the failure than it doesn't work.


L.


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



NOTICE: This e-mail message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information of Motricity.  Any 
unauthorized review, use, disclosure or distribution is prohibited.  If you are 
not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message.

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



RE: AjaxTag 1.3 support?

2008-02-05 Thread Griffith, Michael *
Musachy, 

Huh? That can't be right... 

First of all, the document says it wraps the JSON result in /* ... */
comments, it doesn't say anything about escaping quotes.

Second, the default value is false ;-)  Adding this to the result
configuration did nothing to my result.  This seems like a bug.

MG

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 05, 2008 12:14 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?

add:

param name=wrapWithCommentsfalse/param

to the result. See the section Wrap with Comments here:

http://cwiki.apache.org/S2PLUGINS/json-plugin.html

musachy

On Feb 5, 2008 12:58 PM, Griffith, Michael *
[EMAIL PROTECTED] wrote:
 Musachy,

 I've looked over the documentation, and looked in the JSONWriter class
 -- and it is not obvious to me how to configure this plugin setting.
 How is it done?

 MG

 -Original Message-
 From: Musachy Barroso [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 05, 2008 11:23 AM
 To: Struts Users Mailing List

 Subject: Re: AjaxTag 1.3 support?

 Don't give up so easily :). That is just a setting on the json plugin
 to prevent cross site  scripting, and can be disabled.

 musachy

 On Feb 5, 2008 11:27 AM, Griffith, Michael *
 [EMAIL PROTECTED] wrote:
  Well, to answer my own question -- the answer is no. The JSON result
  serialization process escapes quotation marks, so my response that
  looked like this before serialization:
 
  {questions:{420:Is your Java Application a ME, SE or EE
  application?,440:If your Java Application is an SE application
 does
  it use Java Web Start?,450:If your Java Application is a Java
Web
  Application, list the application server used for
  production,490:List any Java Web Services Technologies
  Used,500:List any Java Web Application Technologies Used for
  presentation,510:List any Java EE Technologies used in your
  application}}
 
  Looks like this after serialization:
 
  {\questions\:{\420\:\Is your Java Application a ME, SE or EE
  application?\,\440\:\If your Java Application is an SE
application
  does it use Java Web Start?\,\450\:\If your Java Application is
a
  Java Web Application, list the application server used for
  production\,\490\:\List any Java Web Services Technologies
  Used\,\500\:\List any Java Web Application Technologies Used for
  presentation\,\510\:\List any Java EE Technologies used in your
  application\}}
 
  Making it unrecognizable to the autocompleter. This is pretty
  frustrating to me. Maybe I am expecting this to do something that it
 was
  never designed to do. My end goal was to be able to evaluate the ID
of
  the question that the user selected from the autocompleter.
 
  I'm giving up this path and looking elsewhere.  Thanks to everyone
 that
  replied to my question and tried to help me.
 
  MG
 
 
  -Original Message-
  From: Griffith, Michael * [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 05, 2008 8:32 AM
  To: Struts Users Mailing List
  Subject: RE: AjaxTag 1.3 support?
 
  Musachy,
 
  I can't seem to create the right blend of Entity objects/list/maps
to
  allow the JSON plug in to serialize this response for me. If I
create
  the string below using a loop, can I return it from the JSON plug in
  without the plug in doing anything further to it?
 
  In other words, does the plug in look at what it is trying to
 serialize
  and say, Hey this is already valid JSON, I don't need to do
anything
 to
  it... or will it try to add additional info to the string returned?
 
  I'm guessing the shortest path for me is to just create the string
in
 my
  own serialization loop, but I don't want to confuse the plug in --
if
  that makes any sense.
 
  MG
 
  -Original Message-
  From: Musachy Barroso [mailto:[EMAIL PROTECTED]
  Sent: Monday, February 04, 2008 6:30 PM
  To: Struts Users Mailing List
  Subject: Re: AjaxTag 1.3 support?
 
  Right on.
 
  On Feb 4, 2008 6:45 PM, Griffith, Michael *
  [EMAIL PROTECTED] wrote:
   Dave,
  
   I think the bigger problem is the JSON that is returned, while it
 may
  be
   valid, it not in the right structure expected. I should be
 generating
   JSON like this:
  
   {questions:{420:Is your Java Application a ME, SE or EE
   application?,440:If your Java Application is an SE application
  does
   it use Java Web Start?}}
  
   The [] brackets seem to be ignored by the parser.
  
   -Original Message-
   From: Dave Newton [mailto:[EMAIL PROTECTED]
   Sent: Monday, February 04, 2008 5:34 PM
   To: Struts Users Mailing List
   Subject: RE: AjaxTag 1.3 support?
  
   ...
  
  
   That's probably an issue.
  
   --- Griffith, Michael * [EMAIL PROTECTED] wrote:
Yea, I think so -- I copied and pasted this from the log
   file/console...
   
From: Dave Newton [mailto:[EMAIL PROTECTED]
   
Is it generating those brackets around your JSON?
   
--- Griffith, Michael * [EMAIL PROTECTED] wrote:
   
 Musachy,

 Thanks for your 

Re: AjaxTag 1.3 support?

2008-02-05 Thread Musachy Barroso
Oh I am sorry about that! (doh) Do you see the quoutes escaped in
firebug or something? As far as I remember the plugin doesnt escape
the quoutes. If you put the url in your browser you should see the
generated json as it actually is.

musachy

On Feb 5, 2008 2:12 PM, Griffith, Michael *
[EMAIL PROTECTED] wrote:
 Musachy,

 Huh? That can't be right...

 First of all, the document says it wraps the JSON result in /* ... */
 comments, it doesn't say anything about escaping quotes.

 Second, the default value is false ;-)  Adding this to the result
 configuration did nothing to my result.  This seems like a bug.

 MG

 -Original Message-
 From: Musachy Barroso [mailto:[EMAIL PROTECTED]

 Sent: Tuesday, February 05, 2008 12:14 PM
 To: Struts Users Mailing List
 Subject: Re: AjaxTag 1.3 support?

 add:

 param name=wrapWithCommentsfalse/param

 to the result. See the section Wrap with Comments here:

 http://cwiki.apache.org/S2PLUGINS/json-plugin.html

 musachy

 On Feb 5, 2008 12:58 PM, Griffith, Michael *
 [EMAIL PROTECTED] wrote:
  Musachy,
 
  I've looked over the documentation, and looked in the JSONWriter class
  -- and it is not obvious to me how to configure this plugin setting.
  How is it done?
 
  MG
 
  -Original Message-
  From: Musachy Barroso [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 05, 2008 11:23 AM
  To: Struts Users Mailing List
 
  Subject: Re: AjaxTag 1.3 support?
 
  Don't give up so easily :). That is just a setting on the json plugin
  to prevent cross site  scripting, and can be disabled.
 
  musachy
 
  On Feb 5, 2008 11:27 AM, Griffith, Michael *
  [EMAIL PROTECTED] wrote:
   Well, to answer my own question -- the answer is no. The JSON result
   serialization process escapes quotation marks, so my response that
   looked like this before serialization:
  
   {questions:{420:Is your Java Application a ME, SE or EE
   application?,440:If your Java Application is an SE application
  does
   it use Java Web Start?,450:If your Java Application is a Java
 Web
   Application, list the application server used for
   production,490:List any Java Web Services Technologies
   Used,500:List any Java Web Application Technologies Used for
   presentation,510:List any Java EE Technologies used in your
   application}}
  
   Looks like this after serialization:
  
   {\questions\:{\420\:\Is your Java Application a ME, SE or EE
   application?\,\440\:\If your Java Application is an SE
 application
   does it use Java Web Start?\,\450\:\If your Java Application is
 a
   Java Web Application, list the application server used for
   production\,\490\:\List any Java Web Services Technologies
   Used\,\500\:\List any Java Web Application Technologies Used for
   presentation\,\510\:\List any Java EE Technologies used in your
   application\}}
  
   Making it unrecognizable to the autocompleter. This is pretty
   frustrating to me. Maybe I am expecting this to do something that it
  was
   never designed to do. My end goal was to be able to evaluate the ID
 of
   the question that the user selected from the autocompleter.
  
   I'm giving up this path and looking elsewhere.  Thanks to everyone
  that
   replied to my question and tried to help me.
  
   MG
  
  
   -Original Message-
   From: Griffith, Michael * [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, February 05, 2008 8:32 AM
   To: Struts Users Mailing List
   Subject: RE: AjaxTag 1.3 support?
  
   Musachy,
  
   I can't seem to create the right blend of Entity objects/list/maps
 to
   allow the JSON plug in to serialize this response for me. If I
 create
   the string below using a loop, can I return it from the JSON plug in
   without the plug in doing anything further to it?
  
   In other words, does the plug in look at what it is trying to
  serialize
   and say, Hey this is already valid JSON, I don't need to do
 anything
  to
   it... or will it try to add additional info to the string returned?
  
   I'm guessing the shortest path for me is to just create the string
 in
  my
   own serialization loop, but I don't want to confuse the plug in --
 if
   that makes any sense.
  
   MG
  
   -Original Message-
   From: Musachy Barroso [mailto:[EMAIL PROTECTED]
   Sent: Monday, February 04, 2008 6:30 PM
   To: Struts Users Mailing List
   Subject: Re: AjaxTag 1.3 support?
  
   Right on.
  
   On Feb 4, 2008 6:45 PM, Griffith, Michael *
   [EMAIL PROTECTED] wrote:
Dave,
   
I think the bigger problem is the JSON that is returned, while it
  may
   be
valid, it not in the right structure expected. I should be
  generating
JSON like this:
   
{questions:{420:Is your Java Application a ME, SE or EE
application?,440:If your Java Application is an SE application
   does
it use Java Web Start?}}
   
The [] brackets seem to be ignored by the parser.
   
-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Monday, February 04, 2008 5:34 PM

Re: Custom OGNL PropertyAccessor

2008-02-05 Thread Tommy Becker

No I haven't.  How do I go about doing that?

Dave Newton wrote:

--- Tommy Becker [EMAIL PROTECTED] wrote:
  
If there were a better description, I'd be happy to give it.  As far as 
I can tell, our custom PropertyAccessor is not being used.  What we want 
is to be able to say property in an OGNL expression and have it call 
getPropertyValue(property), not getProperty().  It seems it's 
continuing to try getProperty() despite our attempt at registering a 
custom PropertyAccessor.



Have you turned up OGNL and XWork logging?

Dave

  

Laurie Harper wrote:


Tommy Becker wrote:
  
I have a question about using OGNL PropertyAccessors.  We have an 
object on the value stack that we expose to JSP pages that does not 
have standard JavaBeans getter/setter methods.  From what I can tell, 
this leaves us 2 options.  We can either call the getter methods 
explicitly via OGNL method calls in the pages, or we can wrap the 
object in a JavaBean-like object.  The second option is unworkable in 
all but the simplest of cases when you realize that the method calls 
can themselves return another object that needs to be wrapped, or 
even a collection of them.  So we've been using method calls in the 
pages (yeah I know).


Reading through the OGNL docs, it seems that what we need is a 
PropertyAccessor that knows how to operate on our object.  So we 
implemented one, and attempted to register it by placing this in our 
struts.xml:


bean type=ognl.PropertyAccessor name=class.we.need.access.to 
class=our.property.accessor.PropertyAccessor/


Unfortunately it doesn't work.  Can someone tell me what we're doing 
wrong, or even if what we're trying to do is possible?  Thanks!

I don't know anything about OGNL's PropertyAccessor, but I doubt 
anyone can offer much help without seeing the code and a better 
description of the failure than it doesn't work.


L.


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

  

NOTICE: This e-mail message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information of
Motricity.  Any unauthorized review, use, disclosure or distribution is
prohibited.  If you are not the intended recipient, please contact the
sender by reply e-mail and destroy all copies of the original message.

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

  


NOTICE: This e-mail message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information of Motricity.  Any 
unauthorized review, use, disclosure or distribution is prohibited.  If you are 
not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message.

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



Losing Session Attributes

2008-02-05 Thread daveck

Hi,
I'm looking for some help, or some input on why I might be losing session
attributes (Not the session itself).

Processing Flow:
quest.action -- quest-input.jsp  - quest.action -- MyInterceptor - 
  confirm.jsp - question.action -- quest-success.jsp

I am setting session attributes in my interceptor to have available
following the confirm.jsp.

Sometimes the attributes are there and sometimes they're not.  There doesn't
seem to be any rhyme or reason.

Probably something simple I'm overlooking, but if so, I've been overlooking
it for two days!

Thanks!
David


MyInterceptor.java:

public String intercept (ActionInvocation invocation) throws Exception {

final ActionContext context = invocation.getInvocationContext();
HttpServletRequest request = (HttpServletRequest)
context.get(HTTP_REQUEST);
HttpSession session =  request.getSession(true);

// check if request is coming form the Confirmation Screen
if ((request.getParameter(CONFIRM_SCREEN) != null) 
(request.getParameter(CONFIRM_SCREEN).equals(TRUE))) {

String urlGoingTo = invocation.getProxy().getNamespace() +
invocation.getProxy().getActionName()+.action;

// save input form attributes to session
session.setAttribute(PARMS, request.getParameterMap());

// save the forwarding url for the Confirmation Screen
session.setAttribute(URL_GOING_TO, urlGoingTo);

return confirm;
} else {
return invocation.invoke();
}
 }


Quest.java:

public String execute() throws Exception {

if (this.getSession().containsKey(PARMS)) {
BeanUtils.populate(this, (Map)this.getSession().get(PARMS));

return SUCCESS;

} else {

return INPUT;
}
}


quest-input.jsp

%@ taglib prefix=s uri=/struts-tags %
s:head theme=ajax /
link href=s:url value=/html/body.css/ rel=stylesheet
type=text/css /

s:div id=reg label=Registration Number theme=ajax
labelposition=top 

 s:form action=cowQuest method=Post validate=true
 s:select
 name=nation
 label=Nation
 headerKey=0
 list=nationList /
 s:textfield name=registrationNumber label=Registration Number
size=10/
 s:hidden name=CONFIRM_SCREEN value=TRUE/
 s:submit value=Click Here to Run id=submit/
 /s:form

 /s:div


confirm.jsp
%@ taglib prefix=s uri=/struts-tags%
link href=s:url value=/html/body.css/ rel=stylesheet
type=text/css /

h2Please confirm your request./h2
br
pThis could take several minutes depending on the request./p

s:form method=post
s:param name=action value=quest.action/
s:submit value=Confirm align=center
s:param name=colspan value=%{2} /
s:param name=align value=%{'center'} /
/s:submit
/s:form


struts.xml

 action name=quest class=com.helpme.struts.actions.Quest
 interceptor-ref name=myInterceptor/
 result name=input/quest-input.jsp/result
 result name=confirm/confirm.jsp/result
 result name=success/quest-success.jsp/result
 result name=error/quest-error.jsp/result
 /action
-- 
View this message in context: 
http://www.nabble.com/Losing-Session-Attributes-tp15298791p15298791.html
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: Custom OGNL PropertyAccessor

2008-02-05 Thread mgainty
you can configure the xwork LoggingInterceptor into your default stack..
interceptor name=logger
class=com.opensymphony.xwork2.interceptor.LoggingInterceptor/

looking for clues on OGNL logging???
Anyone?

HTH
Martin
- Original Message -
Wrom: QBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCA
To: Struts Users Mailing List user@struts.apache.org
Sent: Tuesday, February 05, 2008 3:05 PM
Subject: Re: Custom OGNL PropertyAccessor


 No I haven't.  How do I go about doing that?

 Dave Newton wrote:
  --- Tommy Becker [EMAIL PROTECTED] wrote:
 
  If there were a better description, I'd be happy to give it.  As far as
  I can tell, our custom PropertyAccessor is not being used.  What we
want
  is to be able to say property in an OGNL expression and have it call
  getPropertyValue(property), not getProperty().  It seems it's
  continuing to try getProperty() despite our attempt at registering a
  custom PropertyAccessor.
 
 
  Have you turned up OGNL and XWork logging?
 
  Dave
 
 
  Laurie Harper wrote:
 
  Tommy Becker wrote:
 
  I have a question about using OGNL PropertyAccessors.  We have an
  object on the value stack that we expose to JSP pages that does not
  have standard JavaBeans getter/setter methods.  From what I can tell,
  this leaves us 2 options.  We can either call the getter methods
  explicitly via OGNL method calls in the pages, or we can wrap the
  object in a JavaBean-like object.  The second option is unworkable in
  all but the simplest of cases when you realize that the method calls
  can themselves return another object that needs to be wrapped, or
  even a collection of them.  So we've been using method calls in the
  pages (yeah I know).
 
  Reading through the OGNL docs, it seems that what we need is a
  PropertyAccessor that knows how to operate on our object.  So we
  implemented one, and attempted to register it by placing this in our
  struts.xml:
 
  bean type=ognl.PropertyAccessor name=class.we.need.access.to
  class=our.property.accessor.PropertyAccessor/
 
  Unfortunately it doesn't work.  Can someone tell me what we're doing
  wrong, or even if what we're trying to do is possible?  Thanks!
 
  I don't know anything about OGNL's PropertyAccessor, but I doubt
  anyone can offer much help without seeing the code and a better
  description of the failure than it doesn't work.
 
  L.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  NOTICE: This e-mail message is for the sole use of the intended
  recipient(s) and may contain confidential and privileged information of
  Motricity.  Any unauthorized review, use, disclosure or distribution is
  prohibited.  If you are not the intended recipient, please contact the
  sender by reply e-mail and destroy all copies of the original message.
 
  -
  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]
 
 

 NOTICE: This e-mail message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information of
Motricity.  Any unauthorized review, use, disclosure or distribution is
prohibited.  If you are not the intended recipient, please contact the
sender by reply e-mail and destroy all copies of the original message.

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



Re: Custom OGNL PropertyAccessor

2008-02-05 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
 you can configure the xwork LoggingInterceptor into your default stack..
 interceptor name=logger
 class=com.opensymphony.xwork2.interceptor.LoggingInterceptor/
 
 looking for clues on OGNL logging???

Set the level on the OGNL classes to DEBUG via whatever mechanism is being
used underneath commons-logging.

Dave


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



Re: Custom OGNL PropertyAccessor

2008-02-05 Thread Randy Burgess
I use standard log4J settings. This example is from a log4j.properties file
but log4j.xml will work as well. This outputs to the console and since I
usually use Eclipse it is very convenient as the output goes right to the
console view. The ConversionPattern is usually on one line but it wrapped
when I pasted it into this message.

log4j.appender.stdout=org.apache.log4j.ConsoleAppender

log4j.appender.stdout.Target=System.out

log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

log4j.appender.stdout.layout.ConversionPattern=%d{MMM d,  h:mm:s a z}
[%x] %5p %c{2}:%L - %m%n

log4j.logger.com.opensymphony=debug, stdout

This will give you quite a bit more than just OGNL. You could change the
above line to this

log4j.logger.com.opensymphony.xwork2.util=debug, stdout

To narrow it down.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



 From: [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List user@struts.apache.org
 Date: Tue, 5 Feb 2008 15:38:12 -0500
 To: Struts Users Mailing List user@struts.apache.org
 Subject: Re: Custom OGNL PropertyAccessor
 
 you can configure the xwork LoggingInterceptor into your default stack..
 interceptor name=logger
 class=com.opensymphony.xwork2.interceptor.LoggingInterceptor/
 
 looking for clues on OGNL logging???
 Anyone?
 
 HTH
 Martin
 - Original Message -
 Wrom: QBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCA
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Tuesday, February 05, 2008 3:05 PM
 Subject: Re: Custom OGNL PropertyAccessor
 
 
 No I haven't.  How do I go about doing that?
 
 Dave Newton wrote:
 --- Tommy Becker [EMAIL PROTECTED] wrote:
 
 If there were a better description, I'd be happy to give it.  As far as
 I can tell, our custom PropertyAccessor is not being used.  What we
 want
 is to be able to say property in an OGNL expression and have it call
 getPropertyValue(property), not getProperty().  It seems it's
 continuing to try getProperty() despite our attempt at registering a
 custom PropertyAccessor.
 
 
 Have you turned up OGNL and XWork logging?
 
 Dave
 
 
 Laurie Harper wrote:
 
 Tommy Becker wrote:
 
 I have a question about using OGNL PropertyAccessors.  We have an
 object on the value stack that we expose to JSP pages that does not
 have standard JavaBeans getter/setter methods.  From what I can tell,
 this leaves us 2 options.  We can either call the getter methods
 explicitly via OGNL method calls in the pages, or we can wrap the
 object in a JavaBean-like object.  The second option is unworkable in
 all but the simplest of cases when you realize that the method calls
 can themselves return another object that needs to be wrapped, or
 even a collection of them.  So we've been using method calls in the
 pages (yeah I know).
 
 Reading through the OGNL docs, it seems that what we need is a
 PropertyAccessor that knows how to operate on our object.  So we
 implemented one, and attempted to register it by placing this in our
 struts.xml:
 
 bean type=ognl.PropertyAccessor name=class.we.need.access.to
 class=our.property.accessor.PropertyAccessor/
 
 Unfortunately it doesn't work.  Can someone tell me what we're doing
 wrong, or even if what we're trying to do is possible?  Thanks!
 
 I don't know anything about OGNL's PropertyAccessor, but I doubt
 anyone can offer much help without seeing the code and a better
 description of the failure than it doesn't work.
 
 L.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 NOTICE: This e-mail message is for the sole use of the intended
 recipient(s) and may contain confidential and privileged information of
 Motricity.  Any unauthorized review, use, disclosure or distribution is
 prohibited.  If you are not the intended recipient, please contact the
 sender by reply e-mail and destroy all copies of the original message.
 
 -
 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]
 
 
 
 NOTICE: This e-mail message is for the sole use of the intended
 recipient(s) and may contain confidential and privileged information of
 Motricity.  Any unauthorized review, use, disclosure or distribution is
 prohibited.  If you are not the intended recipient, please contact the
 sender by reply e-mail and destroy all copies of the original message.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, 

Re: Custom OGNL PropertyAccessor

2008-02-05 Thread Dave Newton
FWIW, OGNL itself is in the ognl.* package.

Dave

--- Randy Burgess [EMAIL PROTECTED] wrote:

 I use standard log4J settings. This example is from a log4j.properties file
 but log4j.xml will work as well. This outputs to the console and since I
 usually use Eclipse it is very convenient as the output goes right to the
 console view. The ConversionPattern is usually on one line but it wrapped
 when I pasted it into this message.
 
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 
 log4j.appender.stdout.Target=System.out
 
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 
 log4j.appender.stdout.layout.ConversionPattern=%d{MMM d,  h:mm:s a z}
 [%x] %5p %c{2}:%L - %m%n
 
 log4j.logger.com.opensymphony=debug, stdout
 
 This will give you quite a bit more than just OGNL. You could change the
 above line to this
 
 log4j.logger.com.opensymphony.xwork2.util=debug, stdout
 
 To narrow it down.
 
 Regards,
 Randy Burgess
 Sr. Web Applications Developer
 Nuvox Communications
 
 
 
  From: [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List user@struts.apache.org
  Date: Tue, 5 Feb 2008 15:38:12 -0500
  To: Struts Users Mailing List user@struts.apache.org
  Subject: Re: Custom OGNL PropertyAccessor
  
  you can configure the xwork LoggingInterceptor into your default
 stack..
  interceptor name=logger
  class=com.opensymphony.xwork2.interceptor.LoggingInterceptor/
  
  looking for clues on OGNL logging???
  Anyone?
  
  HTH
  Martin
  - Original Message -
  Wrom: QBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCA
  To: Struts Users Mailing List user@struts.apache.org
  Sent: Tuesday, February 05, 2008 3:05 PM
  Subject: Re: Custom OGNL PropertyAccessor
  
  
  No I haven't.  How do I go about doing that?
  
  Dave Newton wrote:
  --- Tommy Becker [EMAIL PROTECTED] wrote:
  
  If there were a better description, I'd be happy to give it.  As far
 as
  I can tell, our custom PropertyAccessor is not being used.  What we
  want
  is to be able to say property in an OGNL expression and have it call
  getPropertyValue(property), not getProperty().  It seems it's
  continuing to try getProperty() despite our attempt at registering a
  custom PropertyAccessor.
  
  
  Have you turned up OGNL and XWork logging?
  
  Dave
  
  
  Laurie Harper wrote:
  
  Tommy Becker wrote:
  
  I have a question about using OGNL PropertyAccessors.  We have an
  object on the value stack that we expose to JSP pages that does not
  have standard JavaBeans getter/setter methods.  From what I can
 tell,
  this leaves us 2 options.  We can either call the getter methods
  explicitly via OGNL method calls in the pages, or we can wrap the
  object in a JavaBean-like object.  The second option is unworkable
 in
  all but the simplest of cases when you realize that the method calls
  can themselves return another object that needs to be wrapped, or
  even a collection of them.  So we've been using method calls in the
  pages (yeah I know).
  
  Reading through the OGNL docs, it seems that what we need is a
  PropertyAccessor that knows how to operate on our object.  So we
  implemented one, and attempted to register it by placing this in our
  struts.xml:
  
  bean type=ognl.PropertyAccessor name=class.we.need.access.to
  class=our.property.accessor.PropertyAccessor/
  
  Unfortunately it doesn't work.  Can someone tell me what we're doing
  wrong, or even if what we're trying to do is possible?  Thanks!
  
  I don't know anything about OGNL's PropertyAccessor, but I doubt
  anyone can offer much help without seeing the code and a better
  description of the failure than it doesn't work.
  
  L.
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  NOTICE: This e-mail message is for the sole use of the intended
  recipient(s) and may contain confidential and privileged information
 of
  Motricity.  Any unauthorized review, use, disclosure or distribution
 is
  prohibited.  If you are not the intended recipient, please contact the
  sender by reply e-mail and destroy all copies of the original message.
  
  -
  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]
  
  
  
  NOTICE: This e-mail message is for the sole use of the intended
  recipient(s) and may contain confidential and privileged information of
  Motricity.  Any unauthorized review, use, disclosure or distribution is
  prohibited.  If you are not the intended recipient, please contact the
  sender by reply e-mail and destroy all copies of the original message.
  
  -
  To 

chaining validation errors

2008-02-05 Thread chubi

Hello,

After submitting editAction to SaveAction, I want to redirect again to
EditAction.
So SaveAction is totally transparent.
But I get lost all fieldErrors if validation return false.
How can I chain validation errors?
I tried the use of several interceptors like: validaiton, chain and params;
didn't success.

Thank you for the support
-- 
View this message in context: 
http://www.nabble.com/chaining-validation-errors-tp15299658p15299658.html
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: chaining validation errors

2008-02-05 Thread Dave Newton
--- chubi [EMAIL PROTECTED] wrote:
 After submitting editAction to SaveAction, I want to redirect again to
 EditAction.
 So SaveAction is totally transparent.
 But I get lost all fieldErrors if validation return false.
 How can I chain validation errors?
 I tried the use of several interceptors like: validaiton, chain and params;
 didn't success.

If you're already using action chaining is to expose the error message
properties in your ActionSupport/DefaultActionSupport sublass via getters.

Dave


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



Re: Custom OGNL PropertyAccessor

2008-02-05 Thread Randy Burgess
My bad. I just did a search for ognl and came up with that real quickly. I
didn't go through my search results very thoroughly. :)

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



 From: Dave Newton [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List user@struts.apache.org
 Date: Tue, 5 Feb 2008 13:11:57 -0800 (PST)
 To: Struts Users Mailing List user@struts.apache.org
 Subject: Re: Custom OGNL PropertyAccessor
 
 FWIW, OGNL itself is in the ognl.* package.
 
 Dave
 
 --- Randy Burgess [EMAIL PROTECTED] wrote:
 
 I use standard log4J settings. This example is from a log4j.properties file
 but log4j.xml will work as well. This outputs to the console and since I
 usually use Eclipse it is very convenient as the output goes right to the
 console view. The ConversionPattern is usually on one line but it wrapped
 when I pasted it into this message.
 
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 
 log4j.appender.stdout.Target=System.out
 
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 
 log4j.appender.stdout.layout.ConversionPattern=%d{MMM d,  h:mm:s a z}
 [%x] %5p %c{2}:%L - %m%n
 
 log4j.logger.com.opensymphony=debug, stdout
 
 This will give you quite a bit more than just OGNL. You could change the
 above line to this
 
 log4j.logger.com.opensymphony.xwork2.util=debug, stdout
 
 To narrow it down.
 
 Regards,
 Randy Burgess
 Sr. Web Applications Developer
 Nuvox Communications
 
 
 
 From: [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List user@struts.apache.org
 Date: Tue, 5 Feb 2008 15:38:12 -0500
 To: Struts Users Mailing List user@struts.apache.org
 Subject: Re: Custom OGNL PropertyAccessor
 
 you can configure the xwork LoggingInterceptor into your default
 stack..
 interceptor name=logger
 class=com.opensymphony.xwork2.interceptor.LoggingInterceptor/
 
 looking for clues on OGNL logging???
 Anyone?
 
 HTH
 Martin
 - Original Message -
 Wrom: QBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCA
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Tuesday, February 05, 2008 3:05 PM
 Subject: Re: Custom OGNL PropertyAccessor
 
 
 No I haven't.  How do I go about doing that?
 
 Dave Newton wrote:
 --- Tommy Becker [EMAIL PROTECTED] wrote:
 
 If there were a better description, I'd be happy to give it.  As far
 as
 I can tell, our custom PropertyAccessor is not being used.  What we
 want
 is to be able to say property in an OGNL expression and have it call
 getPropertyValue(property), not getProperty().  It seems it's
 continuing to try getProperty() despite our attempt at registering a
 custom PropertyAccessor.
 
 
 Have you turned up OGNL and XWork logging?
 
 Dave
 
 
 Laurie Harper wrote:
 
 Tommy Becker wrote:
 
 I have a question about using OGNL PropertyAccessors.  We have an
 object on the value stack that we expose to JSP pages that does not
 have standard JavaBeans getter/setter methods.  From what I can
 tell,
 this leaves us 2 options.  We can either call the getter methods
 explicitly via OGNL method calls in the pages, or we can wrap the
 object in a JavaBean-like object.  The second option is unworkable
 in
 all but the simplest of cases when you realize that the method calls
 can themselves return another object that needs to be wrapped, or
 even a collection of them.  So we've been using method calls in the
 pages (yeah I know).
 
 Reading through the OGNL docs, it seems that what we need is a
 PropertyAccessor that knows how to operate on our object.  So we
 implemented one, and attempted to register it by placing this in our
 struts.xml:
 
 bean type=ognl.PropertyAccessor name=class.we.need.access.to
 class=our.property.accessor.PropertyAccessor/
 
 Unfortunately it doesn't work.  Can someone tell me what we're doing
 wrong, or even if what we're trying to do is possible?  Thanks!
 
 I don't know anything about OGNL's PropertyAccessor, but I doubt
 anyone can offer much help without seeing the code and a better
 description of the failure than it doesn't work.
 
 L.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 NOTICE: This e-mail message is for the sole use of the intended
 recipient(s) and may contain confidential and privileged information
 of
 Motricity.  Any unauthorized review, use, disclosure or distribution
 is
 prohibited.  If you are not the intended recipient, please contact the
 sender by reply e-mail and destroy all copies of the original message.
 
 -
 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]
 
 
 
 NOTICE: This e-mail message is for the sole use of the intended
 recipient(s) and may 

Re: AjaxTag 1.3 support?

2008-02-05 Thread Musachy Barroso
I see, but why are you doing that? If you are going to build the json
string by yourself, then you don't need to use the json plugin at all,
just write it to the outputstream and return null on your action. The
whole point behind using the json plugin is that it will serialize
your object model to json for you.

musachy

On Feb 5, 2008 2:36 PM, Griffith, Michael *
[EMAIL PROTECTED] wrote:
 Musachy,

 This is the actual response from the action when I invoke it from the
 browser:

 {\questions\:{\420\:\Is your Java Application a ME, SE or EE
 application?\,\440\:\If your Java Application is an SE application
 does it use Java Web Start?\,\450\:\If your Java Application is a
 Java Web Application, list the application server used for
 production\,\490\:\List any Java Web Services Technologies
 Used\,\500\:\List any Java Web Application Technologies Used for
 presentation\,\510\:\List any Java EE Technologies used in your
 application\}}

 I am building the JSON string and returning it from the action...
 private static final Character QUOTE= '';
 private static final String DELIM= :;
 private static final String COMMA=,;
 private static final String OPEN_BRACE={;
 private static final String CLOSE_BRACE=};

 StrinBuffer sb= new StringBuffer();
 StringBuffer sb= new StringBuffer();

 sb.append(OPEN_BRACE).append(QUOTE).append(questions).append(QUOTE);
 sb.append(DELIM).append(OPEN_BRACE);
 for (Question question : list) {

 sb.append(QUOTE).append(question.getId().toString()).append(QUOTE).appen
 d(DELIM).append(QUOTE).append(question.getText()).append(QUOTE).append(C
 OMMA);

 }
 ...

 The String actually looks like this before its serialized by the json
 result:

 {questions:{420:Is your Java Application a ME, SE or EE
 application?,440:If your Java Application is an SE application does
 it use Java Web Start?,450:If your Java Application is a Java Web
 Application, list the application server used for
 production,490:List any Java Web Services Technologies
 Used,500:List any Java Web Application Technologies Used for
 presentation,510:List any Java EE Technologies used in your
 application}}

 -Original Message-
 From: Musachy Barroso [mailto:[EMAIL PROTECTED]

 Sent: Tuesday, February 05, 2008 1:20 PM
 To: Struts Users Mailing List
 Subject: Re: AjaxTag 1.3 support?

 Oh I am sorry about that! (doh) Do you see the quoutes escaped in
 firebug or something? As far as I remember the plugin doesnt escape
 the quoutes. If you put the url in your browser you should see the
 generated json as it actually is.

 musachy

 On Feb 5, 2008 2:12 PM, Griffith, Michael *
 [EMAIL PROTECTED] wrote:
  Musachy,
 
  Huh? That can't be right...
 
  First of all, the document says it wraps the JSON result in /* ... */
  comments, it doesn't say anything about escaping quotes.
 
  Second, the default value is false ;-)  Adding this to the result
  configuration did nothing to my result.  This seems like a bug.
 
  MG
 
  -Original Message-
  From: Musachy Barroso [mailto:[EMAIL PROTECTED]
 
  Sent: Tuesday, February 05, 2008 12:14 PM
  To: Struts Users Mailing List
  Subject: Re: AjaxTag 1.3 support?
 
  add:
 
  param name=wrapWithCommentsfalse/param
 
  to the result. See the section Wrap with Comments here:
 
  http://cwiki.apache.org/S2PLUGINS/json-plugin.html
 
  musachy
 
  On Feb 5, 2008 12:58 PM, Griffith, Michael *
  [EMAIL PROTECTED] wrote:
   Musachy,
  
   I've looked over the documentation, and looked in the JSONWriter
 class
   -- and it is not obvious to me how to configure this plugin setting.
   How is it done?
  
   MG
  
   -Original Message-
   From: Musachy Barroso [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, February 05, 2008 11:23 AM
   To: Struts Users Mailing List
  
   Subject: Re: AjaxTag 1.3 support?
  
   Don't give up so easily :). That is just a setting on the json
 plugin
   to prevent cross site  scripting, and can be disabled.
  
   musachy
  
   On Feb 5, 2008 11:27 AM, Griffith, Michael *
   [EMAIL PROTECTED] wrote:
Well, to answer my own question -- the answer is no. The JSON
 result
serialization process escapes quotation marks, so my response that
looked like this before serialization:
   
{questions:{420:Is your Java Application a ME, SE or EE
application?,440:If your Java Application is an SE application
   does
it use Java Web Start?,450:If your Java Application is a Java
  Web
Application, list the application server used for
production,490:List any Java Web Services Technologies
Used,500:List any Java Web Application Technologies Used for
presentation,510:List any Java EE Technologies used in your
application}}
   
Looks like this after serialization:
   
{\questions\:{\420\:\Is your Java Application a ME, SE or EE
application?\,\440\:\If your Java Application is an SE
  application
does it use Java Web 

Database resources

2008-02-05 Thread Zhang, Larry (L.)
 
In struts-fonfig.xml I configured as following to get the messages from
DB instead of MessageResource.properties. I have wrote a method to
getMessage(Locale loc, String key)  to get the message from db. This
works for en_US locale, Now my question is how can I pass the locale so
that I get the locale specific messages?

Thanks.



message-resources factory=com.fordMyDbResourceBundleFactory 
parameter= null=false / 

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



Re: Losing Session Attributes

2008-02-05 Thread Laurie Harper

daveck wrote:

Hi,
I'm looking for some help, or some input on why I might be losing session
attributes (Not the session itself).


Are you sure? Have you confirmed that the session is the same in both 
requests?



[...]

I am setting session attributes in my interceptor to have available
following the confirm.jsp.

[...]

HttpSession session =  request.getSession(true);


getSession(true) will create a session if one doesn't exist on the 
request. If the session got lost somehow, this will mask that fault. You 
might want to use getSession(false) and add a guard to ensure the 
session is really there.



[...]

// save input form attributes to session
session.setAttribute(PARMS, request.getParameterMap());


Assuming the session really is the same, I'm guessing this is the 
problem. You're saving a reference to a map owned by the current 
request. There's no guarantee the underlying HttpServletRequest instance 
wont have been reused by the time you try to access the map.


Try making a copy of the request parameter map and storing that instead.

Also, you don't show any code that's removing the data you placed in the 
session. Do you have clean-up code you didn't show and, if so, could it 
be getting called out of sequence?


L.


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



Re: Losing Session Attributes

2008-02-05 Thread mgainty
you'll definitely need configure in session attributes as in
   interceptor name=sessionAutowiring

class=org.apache.struts2.spring.interceptor.SessionContextAutowiringInterce
ptor/

which session attributes are you losing?
M--
- Original Message -
Wrom: MYXOEAIJJPHSCRTNHGSWZIDREXCA
To: user@struts.apache.org
Sent: Tuesday, February 05, 2008 3:24 PM
Subject: Losing Session Attributes



 Hi,
 I'm looking for some help, or some input on why I might be losing session
 attributes (Not the session itself).

 Processing Flow:
 quest.action -- quest-input.jsp  - quest.action -- MyInterceptor -
   confirm.jsp - question.action -- quest-success.jsp

 I am setting session attributes in my interceptor to have available
 following the confirm.jsp.

 Sometimes the attributes are there and sometimes they're not.  There
doesn't
 seem to be any rhyme or reason.

 Probably something simple I'm overlooking, but if so, I've been
overlooking
 it for two days!

 Thanks!
 David


 MyInterceptor.java:

 public String intercept (ActionInvocation invocation) throws Exception
{

 final ActionContext context = invocation.getInvocationContext();
 HttpServletRequest request = (HttpServletRequest)
 context.get(HTTP_REQUEST);
 HttpSession session =  request.getSession(true);

 // check if request is coming form the Confirmation Screen
 if ((request.getParameter(CONFIRM_SCREEN) != null) 
 (request.getParameter(CONFIRM_SCREEN).equals(TRUE))) {

 String urlGoingTo = invocation.getProxy().getNamespace() +
 invocation.getProxy().getActionName()+.action;

 // save input form attributes to session
 session.setAttribute(PARMS, request.getParameterMap());

 // save the forwarding url for the Confirmation Screen
 session.setAttribute(URL_GOING_TO, urlGoingTo);

 return confirm;
 } else {
 return invocation.invoke();
 }
  }


 Quest.java:

 public String execute() throws Exception {

 if (this.getSession().containsKey(PARMS)) {
 BeanUtils.populate(this, (Map)this.getSession().get(PARMS));

 return SUCCESS;

 } else {

 return INPUT;
 }
 }


 quest-input.jsp

 %@ taglib prefix=s uri=/struts-tags %
 s:head theme=ajax /
 link href=s:url value=/html/body.css/ rel=stylesheet
 type=text/css /

 s:div id=reg label=Registration Number theme=ajax
 labelposition=top 

  s:form action=cowQuest method=Post validate=true
  s:select
  name=nation
  label=Nation
  headerKey=0
  list=nationList /
  s:textfield name=registrationNumber label=Registration
Number
 size=10/
  s:hidden name=CONFIRM_SCREEN value=TRUE/
  s:submit value=Click Here to Run id=submit/
  /s:form

  /s:div


 confirm.jsp
 %@ taglib prefix=s uri=/struts-tags%
 link href=s:url value=/html/body.css/ rel=stylesheet
 type=text/css /

 h2Please confirm your request./h2
 br
 pThis could take several minutes depending on the request./p

 s:form method=post
 s:param name=action value=quest.action/
 s:submit value=Confirm align=center
 s:param name=colspan value=%{2} /
 s:param name=align value=%{'center'} /
 /s:submit
 /s:form


 struts.xml

  action name=quest class=com.helpme.struts.actions.Quest
  interceptor-ref name=myInterceptor/
  result name=input/quest-input.jsp/result
  result name=confirm/confirm.jsp/result
  result name=success/quest-success.jsp/result
  result name=error/quest-error.jsp/result
  /action
 --
 View this message in context:
http://www.nabble.com/Losing-Session-Attributes-tp15298791p15298791.html
 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]



Re: Struts 2 and Weblogic 9.2 - java.net.ConnectException

2008-02-05 Thread Randy Burgess
We need to see your web.xml. I'm running Struts 2 projects on WebLogic 9.2
without any problems.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



 From: Vigneswar Nagarathinam [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List user@struts.apache.org
 Date: Tue, 5 Feb 2008 17:09:23 +0530
 To: user@struts.apache.org
 Subject: Struts 2 and Weblogic 9.2 - java.net.ConnectException
 
 Hi All,
 I'm trying to implement Struts2 with Weblogic 9.2. I'm getting the
 following error while running the Weblogic server. Can you please help me by
 providing a solution:
 
 stack trace:
 ---
 Feb 5, 2008 3:51:35 PM GMT+05:30 Error HTTP BEA-101165 Could not
 load user defined filter in web.xml:
 org.apache.struts2.dispatcher.FilterDispatcher.
 Class: weblogic.net.http.HttpClient
 File: HttpClient.java
 Method: openServer
 Line: 320 - weblogic/net/http/HttpClient.java:320:-1
 at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigur
 ationFiles
 (XmlConfigurationProvider.java:835)
 at
 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocument
s
 (XmlConfigurationProvider.java:131)
 at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
 XmlConfigurationProvider.java:100)
 at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
 DefaultConfiguration.java:130)
 at
 com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(
 ConfigurationManager.java:52)
 Truncated. see log file for complete stacktrace
 Tried all: '1' addresses, but could not connect over HTTP to server: '
 struts.apache.org', port: '80' - Class: weblogic.net.http.HttpClient
 File: HttpClient.java
 Method: openServer
 Line: 320 - weblogic/net/http/HttpClient.java:320:-1
 at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:123)
 at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigur
 ationFiles
 (XmlConfigurationProvider.java:830)
 at
 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocument
s
 (XmlConfigurationProvider.java:131)
 at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
 XmlConfigurationProvider.java:100)
 at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
 DefaultConfiguration.java:130)
 Truncated. see log file for complete stacktrace
 java.net.ConnectException: Tried all: '1' addresses, but could not connect
 over HTTP to server: 'struts.apache.org', port: '80'
 at weblogic.net.http.HttpClient.openServer(HttpClient.java:320)
 at weblogic.net.http.HttpClient.openServer(HttpClient.java:375)
 at weblogic.net.http.HttpClient.init(HttpClient.java:149)
 at weblogic.net.http.HttpClient.New(HttpClient.java:245)
 at weblogic.net.http.HttpURLConnection.connect(
 HttpURLConnection.java:160)
 Truncated. see log file for complete stacktrace
 
 Thanks in advance,
 Vigneswar Nagarathinam



This email and any attachments (Message) may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this 
Message has been addressed to you in error, you are not authorized to read, 
copy, or distribute it, and we ask that you please delete it (including all 
copies) and notify the sender by return email.  Delivery of this Message to any 
person other than the intended recipient(s) shall not be deemed a waiver of 
confidentiality and/or a privilege.

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



Re: chaining validation errors

2008-02-05 Thread chubi

Thank you Dave for helping,

Below is the fragment in struts.xml where editLicense should submit to
saveLicense, which in return should redirect to editLicense again. That is
the call to saveLicense is transparent.
Submit to saveLicense was intercepted by validation. Errors were found!
What happens next? How do I preserve the error stack? 

Thank you for support.

pst: I am using struts2/spring/hibernate.



action name=editLicense class=orgAdminLicenseAction method=edit
result/WEB-INF/pages/lms/orgAdmin/licenseForm.jsp/result
result 
name=error/WEB-INF/pages/lms/orgAdmin/licenseList.jsp/result
/action
 action name=saveLicense class=orgAdminLicenseAction method=save
result name=success type=redirectlicenses.html/result
result name=cancel type=redirectlicenses.html/result
result name=delete type=redirectlicenses.html/result
result name=input type=redirect-action
editLicense.html
true
${license.dkey}
/result
 /action
-- 
View this message in context: 
http://www.nabble.com/chaining-validation-errors-tp15299658p15300085.html
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 2 and Weblogic 9.2 - java.net.ConnectException

2008-02-05 Thread Wes Wannemacher
It appears that weblogic is trying to download a DTD while parsing some
XML. I would imagine there are probably a few solutions - 
1. try to configure weblogic to not validate the xml
2. try to configure weblogic to use another xml parser

I am not a weblogic user though, so that's about as far as I can help
you.

-Wes

On Tue, 2008-02-05 at 17:09 +0530, Vigneswar Nagarathinam wrote:
 Hi All,
 I'm trying to implement Struts2 with Weblogic 9.2. I'm getting the
 following error while running the Weblogic server. Can you please help me by
 providing a solution:
 
 stack trace:
 ---
 Feb 5, 2008 3:51:35 PM GMT+05:30 Error HTTP BEA-101165 Could not
 load user defined filter in web.xml:
 org.apache.struts2.dispatcher.FilterDispatcher.
 Class: weblogic.net.http.HttpClient
 File: HttpClient.java
 Method: openServer
 Line: 320 - weblogic/net/http/HttpClient.java:320:-1
 at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles
 (XmlConfigurationProvider.java:835)
 at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments
 (XmlConfigurationProvider.java:131)
 at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
 XmlConfigurationProvider.java:100)
 at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
 DefaultConfiguration.java:130)
 at
 com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(
 ConfigurationManager.java:52)
 Truncated. see log file for complete stacktrace
 Tried all: '1' addresses, but could not connect over HTTP to server: '
 struts.apache.org', port: '80' - Class: weblogic.net.http.HttpClient
 File: HttpClient.java
 Method: openServer
 Line: 320 - weblogic/net/http/HttpClient.java:320:-1
 at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:123)
 at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles
 (XmlConfigurationProvider.java:830)
 at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments
 (XmlConfigurationProvider.java:131)
 at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
 XmlConfigurationProvider.java:100)
 at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
 DefaultConfiguration.java:130)
 Truncated. see log file for complete stacktrace
 java.net.ConnectException: Tried all: '1' addresses, but could not connect
 over HTTP to server: 'struts.apache.org', port: '80'
 at weblogic.net.http.HttpClient.openServer(HttpClient.java:320)
 at weblogic.net.http.HttpClient.openServer(HttpClient.java:375)
 at weblogic.net.http.HttpClient.init(HttpClient.java:149)
 at weblogic.net.http.HttpClient.New(HttpClient.java:245)
 at weblogic.net.http.HttpURLConnection.connect(
 HttpURLConnection.java:160)
 Truncated. see log file for complete stacktrace
 
 Thanks in advance,
 Vigneswar Nagarathinam


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



Struts 2 Bootstrap Tutorial: Using Tags

2008-02-05 Thread Rostom Aghanian
Hello,
I am new to Struts and going through the Struts 2 tutorial found at 
http://struts.apache.org/2.0.11/docs/using-tags.html

I am having a problem with the Wildcard Mapping section, where it specifies to 
use the following entry in struts.xml:
action name=* 
  result/tutorial/{1}.jsp/result
/action
If I use this action definition and go to 
http://localhost:8080/tutorial/Logon.action, Tomcat attempts to redirect to 
/tutorial/tutorial/Logon.jsp, which obviously fails because /tutorial is 
referenced twice. If I remove the /tutorial part from the  definition, then it 
works fine. 

Please let me know if this tutorial is erroneous in this aspect or if I'm doing 
something wrong. Thanks in advance.

rostom



  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

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



Re: Custom OGNL PropertyAccessor

2008-02-05 Thread Jeromy Evans
My guess, and it is just a guess, is that your bean is being 
instantiated by the Struts2 container but it's not being injected anywhere.


Based on my almost-non-existent understanding of OGNL, the OgnlRuntime 
contains a static synchronized map of Class-PropertyAccessor which you 
can see being setup in OgnlRuntime.java


The static method OgnlRuntime.setPropertyAccessor(Class, 
PropertyAccessor) looks like what you're after.  A quick usage search 
shows it's not used in Struts2 or XWrok anywhere so I think you'll have 
to make a static call from you application to register your 
PropertyAccessor instance yourself.  That means you don't need to define 
a struts2 bean at all (unless you want to access it though the container)


Personally, I think you're setting yourself up for a world of pain 
creating a custom PropertyAccessor. I'd go the simplified bean  service 
façade  route so to ensure I'm not locked into any particular expression 
language/library.


cheers,
Jeromy Evans

Tommy Becker wrote:
I have a question about using OGNL PropertyAccessors.  We have an 
object on the value stack that we expose to JSP pages that does not 
have standard JavaBeans getter/setter methods.  From what I can tell, 
this leaves us 2 options.  We can either call the getter methods 
explicitly via OGNL method calls in the pages, or we can wrap the 
object in a JavaBean-like object.  The second option is unworkable in 
all but the simplest of cases when you realize that the method calls 
can themselves return another object that needs to be wrapped, or even 
a collection of them.  So we've been using method calls in the pages 
(yeah I know).


Reading through the OGNL docs, it seems that what we need is a 
PropertyAccessor that knows how to operate on our object.  So we 
implemented one, and attempted to register it by placing this in our 
struts.xml:


bean type=ognl.PropertyAccessor name=class.we.need.access.to 
class=our.property.accessor.PropertyAccessor/


Unfortunately it doesn't work.  Can someone tell me what we're doing 
wrong, or even if what we're trying to do is possible?  Thanks!


http://www.motricity.com


NOTICE: This e-mail message is for the sole use of the intended 
recipient(s) and may contain confidential and privileged information 
of Motricity.  Any unauthorized review, use, disclosure or 
distribution is prohibited.  If you are not the intended recipient, 
please contact the sender by reply e-mail and destroy all copies of 
the original message.


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



Re: chaining validation errors

2008-02-05 Thread Laurie Harper

chubi wrote:

Thank you Dave for helping,

Below is the fragment in struts.xml where editLicense should submit to
saveLicense, which in return should redirect to editLicense again. That is
the call to saveLicense is transparent.
Submit to saveLicense was intercepted by validation. Errors were found!
What happens next? How do I preserve the error stack? 


Thank you for support.

pst: I am using struts2/spring/hibernate.



action name=editLicense class=orgAdminLicenseAction method=edit
result/WEB-INF/pages/lms/orgAdmin/licenseForm.jsp/result
result 
name=error/WEB-INF/pages/lms/orgAdmin/licenseList.jsp/result
/action
 action name=saveLicense class=orgAdminLicenseAction method=save
result name=success type=redirectlicenses.html/result
result name=cancel type=redirectlicenses.html/result
result name=delete type=redirectlicenses.html/result
result name=input type=redirect-action
editLicense.html
true
${license.dkey}
/result
 /action


Validation error messages are stored in request scope, so a redirect 
loses them. Adding the Message Store interceptor to the saveLicense 
action can solve that problem for you, but you'll need to tweak the 
interceptor stack for editLicense too so that the workflow interceptor 
doesn't try to react to the error messages coming from saveLicense.


L.

[1] http://struts.apache.org/2.0.11/docs/message-store-interceptor.html


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



s:property for s:textarea value

2008-02-05 Thread Raghuveer Rawat
Hi, I want to user to preview s:textarea value before sending to db.
but when I am displaying s:textarea value using s:property it is not
formatting it correctly and wrapping it.
Is there anyone who faced this problem? Is this correct way to display Text
Area value?

s:textarea name=articleDesc cols=58 rows=10 /

s:property value=article.articleDesc/

Thanks in advance..


Re: s:property for s:textarea value

2008-02-05 Thread Dave Newton
--- Raghuveer Rawat [EMAIL PROTECTED] wrote:
 Hi, I want to user to preview s:textarea value before sending to db.
 but when I am displaying s:textarea value using s:property it is not
 formatting it correctly and wrapping it.
 s:textarea name=articleDesc cols=58 rows=10 /
 
 s:property value=article.articleDesc/

I'm not sure what you mean by the s:property.../ tag isn't formatting the
value correctly etc.

You won't be able to use s:property.../ to display a value before you've
filled its property in the action. Above you're using two different
properties, one in the s:textarea.../ and one in the s:property.../.

Do you mean you want to submit the form, then show the information on a new
page, and submit the information to the DB from the second page?

If so, you need to understand that s:property.../ is just going to display
the text as HTML. In other words if there are carriage returns, lots of
spaces, tabs, etc. the browser will not display them in the same way an HTML
textarea... would.

If you want to preserve the formatting from a textarea... tag you'll need
to wrap it in an HTML pre tag or something similar.

Dave



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



Re: Editing an entity in Struts2

2008-02-05 Thread Jeromy Evans

Loading an Entity in the prepare method is a common use-case.
If you're allowing an Entity to be updated directly from the JSP you'll 
probably need the prepare-params-prepare
 (set params including entity's ID, params loads the existing entity, 
prepare sets the params on the entity instance)


I prefer not to do that because you're dirtying an Entity and 
consequently need to rollback the entire transaction in the case of a 
validation error or exception.
ie. you dirty the Entity before S2 validation so it will be committed 
when the EntityManager/Session commits.


It is however a productive way to work if you can control that as you 
don't need to double-handle anything (ie. write to a bean, validate, 
update entities(s) behind a service layer).  I prefer this more-effort 
approach except in the simplest of cases.


GF wrote:

I want to edit an entity, i.e. a Message
i would set the .jsp field this way

s:textfield name=message.title  /

on the MessageAction i would have a edit method that takes the
messageID and then call the business service to load the Message
object, so in the .jsp the file the textfield are loaded with the
current value.
when I submit the form, Struts2 will try to call
getMessage.setTitle(...) and so on, and it try to instatiate a new
Message object.
My idea is to create the object (loading it from hibernate calls on
the business service) in the prepare method, in this way when struts
will call getMessage.setTitle, it will set the new values on the
object loaded from the DB.
My worry is that this idea rely on the fact that the prepare
interceptor is called before the parameters interceptor.
What you think?
any better idea?

thank you.

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



Re: s:property for s:textarea value

2008-02-05 Thread Raghuveer Rawat
Thanks Dave, i am sorry, I didn't explain it properly.
Yes, you understood it correctly. I am submitting form and then displaying
form values in new page.
pre is working for me.
Thanks once again.

On Feb 5, 2008 10:08 PM, Dave Newton [EMAIL PROTECTED] wrote:

 --- Raghuveer Rawat [EMAIL PROTECTED] wrote:
  Hi, I want to user to preview s:textarea value before sending to db.
  but when I am displaying s:textarea value using s:property it is not
  formatting it correctly and wrapping it.
  s:textarea name=articleDesc cols=58 rows=10 /
 
  s:property value=article.articleDesc/

 I'm not sure what you mean by the s:property.../ tag isn't formatting
 the
 value correctly etc.

 You won't be able to use s:property.../ to display a value before you've
 filled its property in the action. Above you're using two different
 properties, one in the s:textarea.../ and one in the s:property.../.

 Do you mean you want to submit the form, then show the information on a
 new
 page, and submit the information to the DB from the second page?

 If so, you need to understand that s:property.../ is just going to
 display
 the text as HTML. In other words if there are carriage returns, lots of
 spaces, tabs, etc. the browser will not display them in the same way an
 HTML
 textarea... would.

 If you want to preserve the formatting from a textarea... tag you'll
 need
 to wrap it in an HTML pre tag or something similar.

 Dave



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




Re: Struts 2 and Weblogic 9.2 - java.net.ConnectException

2008-02-05 Thread Vigneswar

Randy,
here is my web.xml

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app
  display-nameSample Project/display-name
  descriptionSample Project to Work with Struts2./description
  context-param
param-namewebmaster/param-name
param-value[EMAIL PROTECTED]/param-value
description
  The EMAIL address of the administrator to whom questions
  and comments about this application should be addressed.
/description
  /context-param
  !-- Filter Mappings --
  !--  Added for Struts 2 testing - Start --  
filter
filter-nameaction2/filter-name
filter-class
org.apache.struts2.dispatcher.FilterDispatcher
/filter-class
/filter
filter-mapping
filter-nameaction2/filter-name
url-pattern/*/url-pattern
/filter-mapping
!--  Added for Struts 2 testing - End --  
 listener
listener-class
org.springframework.web.context.ContextLoaderListener
/listener-class
/listener 
 context-param
param-namecontextConfigLocation/param-name
param-value/WEB-INF/applicationContext.xml/param-value
/context-param
/web-app

Thanks  Regards.
Vigneswar Nagarathinam


Randy Burgess-3 wrote:
 
 We need to see your web.xml. I'm running Struts 2 projects on WebLogic 9.2
 without any problems.
 
 Regards,
 Randy Burgess
 Sr. Web Applications Developer
 Nuvox Communications
 
 
 
 From: Vigneswar Nagarathinam [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List user@struts.apache.org
 Date: Tue, 5 Feb 2008 17:09:23 +0530
 To: user@struts.apache.org
 Subject: Struts 2 and Weblogic 9.2 - java.net.ConnectException
 
 Hi All,
 I'm trying to implement Struts2 with Weblogic 9.2. I'm getting
 the
 following error while running the Weblogic server. Can you please help me
 by
 providing a solution:
 
 stack trace:
 ---
 Feb 5, 2008 3:51:35 PM GMT+05:30 Error HTTP BEA-101165 Could not
 load user defined filter in web.xml:
 org.apache.struts2.dispatcher.FilterDispatcher.
 Class: weblogic.net.http.HttpClient
 File: HttpClient.java
 Method: openServer
 Line: 320 - weblogic/net/http/HttpClient.java:320:-1
 at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigur
 ationFiles
 (XmlConfigurationProvider.java:835)
 at
 
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocument
 s
 (XmlConfigurationProvider.java:131)
 at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
 XmlConfigurationProvider.java:100)
 at
 com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
 DefaultConfiguration.java:130)
 at
 com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(
 ConfigurationManager.java:52)
 Truncated. see log file for complete stacktrace
 Tried all: '1' addresses, but could not connect over HTTP to server: '
 struts.apache.org', port: '80' - Class: weblogic.net.http.HttpClient
 File: HttpClient.java
 Method: openServer
 Line: 320 - weblogic/net/http/HttpClient.java:320:-1
 at
 com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:123)
 at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigur
 ationFiles
 (XmlConfigurationProvider.java:830)
 at
 
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocument
 s
 (XmlConfigurationProvider.java:131)
 at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
 XmlConfigurationProvider.java:100)
 at
 com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
 DefaultConfiguration.java:130)
 Truncated. see log file for complete stacktrace
 java.net.ConnectException: Tried all: '1' addresses, but could not
 connect
 over HTTP to server: 'struts.apache.org', port: '80'
 at weblogic.net.http.HttpClient.openServer(HttpClient.java:320)
 at weblogic.net.http.HttpClient.openServer(HttpClient.java:375)
 at weblogic.net.http.HttpClient.init(HttpClient.java:149)
 at weblogic.net.http.HttpClient.New(HttpClient.java:245)
 at weblogic.net.http.HttpURLConnection.connect(
 HttpURLConnection.java:160)
 Truncated. see log file for complete stacktrace
 
 Thanks in advance,
 Vigneswar Nagarathinam
 
 
 
 This email and any attachments (Message) may contain legally privileged
 and/or confidential information.  If you are not the addressee, or if this
 Message has been addressed to you in error, you are not authorized to
 read, copy, or distribute it, and we ask that you please delete it
 (including all copies) and notify the sender by return email.  Delivery of
 this Message to any person other than the intended recipient(s) shall not
 be deemed a waiver of confidentiality and/or a privilege.
 
 -
 To unsubscribe, e-mail: [EMAIL 

Re: [OT] Re: Best Tool to develop html pages

2008-02-05 Thread mohammed hussain
hi
 i need a WYSIWYG editor , ya ineed to use in my application



On Feb 5, 2008 6:36 PM, Antonio Petrelli [EMAIL PROTECTED] wrote:

 2008/2/5, mohammed hussain [EMAIL PROTECTED]:
  Hi anybody knowing the best tools to develop to html page,pls let me
 know
  thanx

 Now seriously, Mohammed, your question is too generic.
 Do you need a WYSIWYG editor? Do you need to use it in your
 application (i.e. using a Javascript editor)?

 Antonio

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




Re: [OT] Re: Best Tool to develop html pages

2008-02-05 Thread Jeromy Evans
Hi Mohammed, it really depends on whether you're working with html/php, 
or jsp/asp/etc, and whether you're a developer or a designer.
As far as I know the most popular commercial product is still 
Dreamweaver. I think coders tend to prefer their favourite IDE because 
context-sensitivity and refactoring is more important than than 
drag-and-drop when working with JSP or ASP.


mohammed hussain wrote:

hi
 i need a WYSIWYG editor , ya ineed to use in my application



On Feb 5, 2008 6:36 PM, Antonio Petrelli [EMAIL PROTECTED] wrote:

  

2008/2/5, mohammed hussain [EMAIL PROTECTED]:


Hi anybody knowing the best tools to develop to html page,pls let me
  

know


thanx
  

Now seriously, Mohammed, your question is too generic.
Do you need a WYSIWYG editor? Do you need to use it in your
application (i.e. using a Javascript editor)?

Antonio

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





  



No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.19.20/1261 - Release Date: 5/02/2008 8:57 PM
  



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



Re: [OT] Re: Best Tool to develop html pages

2008-02-05 Thread bhaarat Sharma
kind of OT but i'm one of those developers who tries to stick with the
currently used IDE for html pages.  I am using NB 6.0 these days and
support for html really blows.  I work with a lot of legacy code so
html pages are using some deprecated tags. NB acts extremely slow
because it is too busy trying to determine the deprecated tags. Dont
think there is a way to turn off this feature either..

On Feb 6, 2008 1:36 AM, Jeromy Evans [EMAIL PROTECTED] wrote:
 Hi Mohammed, it really depends on whether you're working with html/php,
 or jsp/asp/etc, and whether you're a developer or a designer.
 As far as I know the most popular commercial product is still
 Dreamweaver. I think coders tend to prefer their favourite IDE because
 context-sensitivity and refactoring is more important than than
 drag-and-drop when working with JSP or ASP.


 mohammed hussain wrote:
  hi
   i need a WYSIWYG editor , ya ineed to use in my application
 
 
 
  On Feb 5, 2008 6:36 PM, Antonio Petrelli [EMAIL PROTECTED] wrote:
 
 
  2008/2/5, mohammed hussain [EMAIL PROTECTED]:
 
  Hi anybody knowing the best tools to develop to html page,pls let me
 
  know
 
  thanx
 
  Now seriously, Mohammed, your question is too generic.
  Do you need a WYSIWYG editor? Do you need to use it in your
  application (i.e. using a Javascript editor)?
 
  Antonio
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
  
 
  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.5.516 / Virus Database: 269.19.20/1261 - Release Date: 5/02/2008 
  8:57 PM

 


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



Re: Struts 2 Bootstrap Tutorial: Using Tags

2008-02-05 Thread Nils-Helge Garli Hegvik
tutorial is most likely the context of your web application, so it
will always be a part of the URL to the resources in your app. All
jsps you reference in the configuration, starting with a '/' will
point to the root of the context for your application. So the
behaviour you see is expected.

Nils-H

On Feb 6, 2008 1:51 AM, Rostom Aghanian [EMAIL PROTECTED] wrote:
 Hello,
 I am new to Struts and going through the Struts 2 tutorial found at 
 http://struts.apache.org/2.0.11/docs/using-tags.html

 I am having a problem with the Wildcard Mapping section, where it specifies 
 to use the following entry in struts.xml:
 action name=* 
   result/tutorial/{1}.jsp/result
 /action
 If I use this action definition and go to 
 http://localhost:8080/tutorial/Logon.action, Tomcat attempts to redirect to 
 /tutorial/tutorial/Logon.jsp, which obviously fails because /tutorial is 
 referenced twice. If I remove the /tutorial part from the  definition, then 
 it works fine.

 Please let me know if this tutorial is erroneous in this aspect or if I'm 
 doing something wrong. Thanks in advance.

 rostom



   
 
 Never miss a thing.  Make Yahoo your home page.
 http://www.yahoo.com/r/hs

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