RE: [OT] customizing JSF view management (was [shale][struts-faces] structured URLs with JSF (reprised))

2005-12-22 Thread David G. Friedman
I've also been thinking about the ViewHandler approach for a day or two but 
haven't tried anything with that yet.  Your
code is much simpler than what I'd been daydreaming/pondering in between other 
tasks today.

Regards,
David

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Laurie Harper
Sent: Friday, December 23, 2005 12:59 AM
To: user@struts.apache.org
Subject: Re: [OT] customizing JSF view management (was
[shale][struts-faces] structured URLs with JSF (reprised))


Craig McClanahan wrote:
> On 12/22/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
>> I think I've found an easier way... It looks like both our needs can be
>> met by installing a custom ViewHandler that just delegates all methods
>> to its parent, but which changes the viewId passed into createView
>> before calling super.createView:
>>
>>public class ProjectivaViewHandler extends ViewHandler {
>>  private ViewHandler parent;
>>
>>  public ProjectivaViewHandler(ViewHandler parent) {
>>this.parent = parent;
>>  }
>>
>>  public UIViewRoot createView(FacesContext ctx, String viewId) {
>>String pathToActualView = myViewLogic(viewId);
>>return super.createView(ctx, pathToActualView);
>>  }
>>
>>  ...
>>}
>>
>> In my case I'd also need to push data from the original viewId into the
>> request for use during rendering and use a custom NavigationHandler to
>> let me carry parts of the from-view-id into the to-view-id, but I don't
>> think you'd need that: just calling createView(ctx, "/somehost" +
>> viewId) would be sufficient for you.
>>
>> Craig, does this sound like a reasonable thing to be doing? It sure
>> *looks* like a solution to the problem :-)
>
>
> The view that ultimately gets created will have a view identifier (as
> returned by getFacesContext().getViewRoot().getViewId()) of the *actual*
> view that was created, not the identifier you passed in from the navigation
> rule.  As long as that's OK with your business logic, it sounds like you
> might have a reasonable solution.

Meaning that getFacesContext().getViewRoot().getViewId() will return
what I pass into super.createView (pathToActualView), not what was
passed into createView originally (viewId)?

To be honest, I don't know JSF well enough yet to understand the
consequences of that. I don't have anything yet which depends on or
calls that method, so I suspect it's OK... I've just implemented what I
described above and it certainly seem to be working for me so far; i
still have to figure out how to write a NavigationHandler that
cooperates with this scheme, though.

Sounds like I'm on the right track, I'll see how it goes tomorrow with
writing a nav handler that closes the loop.

L.


-
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] customizing JSF view management (was [shale][struts-faces] structured URLs with JSF (reprised))

2005-12-22 Thread Laurie Harper

Craig McClanahan wrote:

On 12/22/05, Laurie Harper <[EMAIL PROTECTED]> wrote:

I think I've found an easier way... It looks like both our needs can be
met by installing a custom ViewHandler that just delegates all methods
to its parent, but which changes the viewId passed into createView
before calling super.createView:

   public class ProjectivaViewHandler extends ViewHandler {
 private ViewHandler parent;

 public ProjectivaViewHandler(ViewHandler parent) {
   this.parent = parent;
 }

 public UIViewRoot createView(FacesContext ctx, String viewId) {
   String pathToActualView = myViewLogic(viewId);
   return super.createView(ctx, pathToActualView);
 }

 ...
   }

In my case I'd also need to push data from the original viewId into the
request for use during rendering and use a custom NavigationHandler to
let me carry parts of the from-view-id into the to-view-id, but I don't
think you'd need that: just calling createView(ctx, "/somehost" +
viewId) would be sufficient for you.

Craig, does this sound like a reasonable thing to be doing? It sure
*looks* like a solution to the problem :-)



The view that ultimately gets created will have a view identifier (as
returned by getFacesContext().getViewRoot().getViewId()) of the *actual*
view that was created, not the identifier you passed in from the navigation
rule.  As long as that's OK with your business logic, it sounds like you
might have a reasonable solution.


Meaning that getFacesContext().getViewRoot().getViewId() will return 
what I pass into super.createView (pathToActualView), not what was 
passed into createView originally (viewId)?


To be honest, I don't know JSF well enough yet to understand the 
consequences of that. I don't have anything yet which depends on or 
calls that method, so I suspect it's OK... I've just implemented what I 
described above and it certainly seem to be working for me so far; i 
still have to figure out how to write a NavigationHandler that 
cooperates with this scheme, though.


Sounds like I'm on the right track, I'll see how it goes tomorrow with 
writing a nav handler that closes the loop.


L.


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



custom server side validation in shale

2005-12-22 Thread JEEVANATHAM P. /BPCRP/INFOTECH/VASHI
Hi all,

Please let me know about how can we do server side validation in shale. Like
user validation, 

when user enters some value that time we need to check with database whether
that is correct one or not. 

If not that will through a alert not message on the screen.

 

 

Regards,

JEEVANANTHAM PARAMASAMY, 
Software Engineer, 
3i - INFOTECH Limited, 
Alwarpet, 
Chennai - 600018. 

Phone: 044 24678000 extn:418
Cell no: 09840933967

 

-- 
Greetings!

 


ICICI Infotech is now 3i Infotech.


The e-mail addresses of the company's employees have been changed to @3i-infotech.com. You are requested to take note of this new e-mail ID and 
make use of the same in future

 
"This e-mail message may contain confidential, proprietary or legally 
privileged information. It should not be used by anyone who is not the original 
intended recipient. If you have erroneously received this message, please 
delete it immediately and notify the sender. The recipient acknowledges that 3i 
Infotech or its subsidiaries and associated companies, (collectively "3i 
Infotech"), are unable to exercise control or ensure or guarantee the integrity 
of/over the contents of the information contained in e-mail transmissions and 
further acknowledges that any views expressed in this message are those of the 
individual sender and no binding nature of the message shall be implied or 
assumed unless the sender does so expressly with due authority of 3i Infotech. 
Before opening any attachments please check them for viruses and defects."



Re: [OT] customizing JSF view management (was [shale][struts-faces] structured URLs with JSF (reprised))

2005-12-22 Thread Craig McClanahan
On 12/22/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
>
> I think I've found an easier way... It looks like both our needs can be
> met by installing a custom ViewHandler that just delegates all methods
> to its parent, but which changes the viewId passed into createView
> before calling super.createView:
>
>public class ProjectivaViewHandler extends ViewHandler {
>  private ViewHandler parent;
>
>  public ProjectivaViewHandler(ViewHandler parent) {
>this.parent = parent;
>  }
>
>  public UIViewRoot createView(FacesContext ctx, String viewId) {
>String pathToActualView = myViewLogic(viewId);
>return super.createView(ctx, pathToActualView);
>  }
>
>  ...
>}
>
> In my case I'd also need to push data from the original viewId into the
> request for use during rendering and use a custom NavigationHandler to
> let me carry parts of the from-view-id into the to-view-id, but I don't
> think you'd need that: just calling createView(ctx, "/somehost" +
> viewId) would be sufficient for you.
>
> Craig, does this sound like a reasonable thing to be doing? It sure
> *looks* like a solution to the problem :-)


The view that ultimately gets created will have a view identifier (as
returned by getFacesContext().getViewRoot().getViewId()) of the *actual*
view that was created, not the identifier you passed in from the navigation
rule.  As long as that's OK with your business logic, it sounds like you
might have a reasonable solution.

L.


Craig

David G. Friedman wrote:
> > I'm trying to do something similar with a lifecycle. My goal is to
> virtual host but retain the viewId of /about.jsf
> > while building off the main file /somehostname/about.jsf.
> >
> > Here's what I have done so far, added a lifecycleFactory to my
> faces-config.xml file.  My own factory's init method is
> > the only thing I changed.  I added my own lifecycle class using the name
> "VIRTUALHOST" then set the web.xml param
> > javax.faces.LIFECYCLE_ID to use the name "VIRTUALHOST" instead of the
> default lifecycle object which gets loaded in the
> > name "DEFAULT"
> >
> > It's complicated and slow going since I'm working on it on my own time
> but I hope this information helps.
> >
> > Regards,
> > David
> >
> > -Original Message-
> > From: news [mailto:[EMAIL PROTECTED] Behalf Of Laurie Harper
> > Sent: Wednesday, December 21, 2005 9:31 PM
> > To: user@struts.apache.org
> > Subject: Re: [shale][struts-faces] structured URLs with JSF (reprised)
> >
> >
> > Craig McClanahan wrote:
> >> On 12/20/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
> >>> So I'm pretty much sold on migrating from Struts/JSPs to JSF at this
> >>> point, with one remaining caveat I've yet to figure out. I've brought
> >>> this up before, but haven't found a good solution yet. I think the
> >>> easiest way to get what I want is to use struts-faces, but then I
> can't
> >>> get the benefits of Shale... So, I'd like to revisit the base
> >>> requirements to see if anyone can see a way to do what I want w/out
> >>> Struts Action / struts-faces in the mix...
> >>>
> >>> My base requirement is that everything be directly addressable by a
> >>> bookmark-able URL. So, for example, I'd like to have a URL like
> >>> http://.../users to be rendered by /users.jsp as a list of users and,
> >>> when you click on an entry in the list, you'd get taken to
> >>> http://.../users/bob which would be rendered by /userInfo.jsp. For any
> >>> X, the URL http://.../users/X would be rendered by /userInfo.jsp, with
> X
> >>> being made available to the JSP (or backing bean) as a request
> >>> parameter, request attribute or whatever.
> >>>
> >>> Using struts-faces, I can get what I want by using wild-card action
> >>> mappings to map logical URLs to physical JSPs, passing wild-card
> matched
> >>> parts of the request URL on to the view in the action; something like,
> >>> roughly:
> >>>
> >>>
> >>>  
> >>>
> >>> I need a way to get the same mapping from logical URLs to actual JSPs
> >>> with vanilla JSF / Shale. Sean suggested I could try writing a custom
> >>> navigation handler, but that doesn't seem to work since a navigation
> >>> handler only gets to influence how from-view-id/from-outcome pairs get
> >>> mapped to views.
> >>>
> >>> I tried setting up a front controller servlet that encapsulates the
> >>> URL-to-view mapping logic, but that doesn't work because to-view-id in
> a
> >>> navigation-rule is not a context relative path, so my navigation rules
> >>> can't route through my controller servlet...
> >>>
> >>> I'm really hoping I can find a way to do this that doesn't involve
> >>> deploying Struts + struts-faces as a front controller to Shale ;-) My
> >>> requirements can't be *that* weird can they?
> >>
> >> No, you just need a custom NavigationHandler, coupled with using
> 
> >> elements in your navigation rules to ensure that the URLs in the
> browser are
> >> what you are after.  (See also my response to your comment 

Re: [OT] customizing JSF view management (was [shale][struts-faces] structured URLs with JSF (reprised))

2005-12-22 Thread Laurie Harper
I think I've found an easier way... It looks like both our needs can be 
met by installing a custom ViewHandler that just delegates all methods 
to its parent, but which changes the viewId passed into createView 
before calling super.createView:


  public class ProjectivaViewHandler extends ViewHandler {
private ViewHandler parent;

public ProjectivaViewHandler(ViewHandler parent) {
  this.parent = parent;
}

public UIViewRoot createView(FacesContext ctx, String viewId) {
  String pathToActualView = myViewLogic(viewId);
  return super.createView(ctx, pathToActualView);
}

...
  }

In my case I'd also need to push data from the original viewId into the 
request for use during rendering and use a custom NavigationHandler to 
let me carry parts of the from-view-id into the to-view-id, but I don't 
think you'd need that: just calling createView(ctx, "/somehost" + 
viewId) would be sufficient for you.


Craig, does this sound like a reasonable thing to be doing? It sure 
*looks* like a solution to the problem :-)


L.

David G. Friedman wrote:

I'm trying to do something similar with a lifecycle. My goal is to virtual host 
but retain the viewId of /about.jsf
while building off the main file /somehostname/about.jsf.

Here's what I have done so far, added a lifecycleFactory to my faces-config.xml 
file.  My own factory's init method is
the only thing I changed.  I added my own lifecycle class using the name 
"VIRTUALHOST" then set the web.xml param
javax.faces.LIFECYCLE_ID to use the name "VIRTUALHOST" instead of the default 
lifecycle object which gets loaded in the
name "DEFAULT"

It's complicated and slow going since I'm working on it on my own time but I 
hope this information helps.

Regards,
David

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Laurie Harper
Sent: Wednesday, December 21, 2005 9:31 PM
To: user@struts.apache.org
Subject: Re: [shale][struts-faces] structured URLs with JSF (reprised)


Craig McClanahan wrote:

On 12/20/05, Laurie Harper <[EMAIL PROTECTED]> wrote:

So I'm pretty much sold on migrating from Struts/JSPs to JSF at this
point, with one remaining caveat I've yet to figure out. I've brought
this up before, but haven't found a good solution yet. I think the
easiest way to get what I want is to use struts-faces, but then I can't
get the benefits of Shale... So, I'd like to revisit the base
requirements to see if anyone can see a way to do what I want w/out
Struts Action / struts-faces in the mix...

My base requirement is that everything be directly addressable by a
bookmark-able URL. So, for example, I'd like to have a URL like
http://.../users to be rendered by /users.jsp as a list of users and,
when you click on an entry in the list, you'd get taken to
http://.../users/bob which would be rendered by /userInfo.jsp. For any
X, the URL http://.../users/X would be rendered by /userInfo.jsp, with X
being made available to the JSP (or backing bean) as a request
parameter, request attribute or whatever.

Using struts-faces, I can get what I want by using wild-card action
mappings to map logical URLs to physical JSPs, passing wild-card matched
parts of the request URL on to the view in the action; something like,
roughly:

   
 

I need a way to get the same mapping from logical URLs to actual JSPs
with vanilla JSF / Shale. Sean suggested I could try writing a custom
navigation handler, but that doesn't seem to work since a navigation
handler only gets to influence how from-view-id/from-outcome pairs get
mapped to views.

I tried setting up a front controller servlet that encapsulates the
URL-to-view mapping logic, but that doesn't work because to-view-id in a
navigation-rule is not a context relative path, so my navigation rules
can't route through my controller servlet...

I'm really hoping I can find a way to do this that doesn't involve
deploying Struts + struts-faces as a front controller to Shale ;-) My
requirements can't be *that* weird can they?


No, you just need a custom NavigationHandler, coupled with using 
elements in your navigation rules to ensure that the URLs in the browser are
what you are after.  (See also my response to your comment on the myfaces
list too ... view identifiers for the default view handler *are* context
relative paths starting with a '/'.)


So I figured out how to install a custom navigation handler, and gave
this a try but when I make a request to a particular URL the navigation
handler isn't called. It only gets called when I click on a command link
or other navigation element in a rendered view.

What I need is to completely decouple the URL the browser requests from
the JSP that gets rendered as a result, to provide a less direct mapping
from the one to the other.

Is there something I'm missing about the navigation handler approach? Is
there some way to get it to be invoked on an initial request?

Thanks,

L.


-
T

Re: NewB: Struts FormFile and Session scope FormBean

2005-12-22 Thread Laurie Harper

Kedar Panse wrote:

Hello gurus,

I want to use a wizard type of flow where in one screen there is File
Upload.  As  this is wizard, i was using session scoped formbean with one
property formfile.  But seems like formfile is not serializable.  What is
proper way of handling this?


Given that a file could be arbitrarily large, is doesn't really make 
sense to store it in the session. I'd suggest saving it to temporary 
disk and replacing the reference in the form bean with the path to the 
temporary file. You can then reload the temp file when your wizard is 
ready to deal with it.


So, in your action when the file upload is received, stream it to a temp 
file, set the form bean property for the uploaded file to null, and set 
another property to the path to the temp file. The form bean should then 
serialize without problem, and you can get at the file later when you 
need to.


L.


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



Re: Problem in

2005-12-22 Thread Laurie Harper

Vikrama Sanjeeva wrote:

Hi,

  The "myForm.jsp" is called when a user clicks a link in another JSP.
Here is the flow:

1. User click the link in "home.jsp" .

My Form

2. Action, "SetUpMyForm" is called and it actually set's up some variables,
pull-down menues and then it "return (mapping.findForward("
continueCallingMyForm.jsp"));"

  I think this is what you said here:

"If you're calling an action which forwards to the JSP page, the browser
doesn't know the physical location of the JSP and will resolve relative URLs
with respect to the actionpath, not the JSP path."


Right; as far as the browser knows, the relative path 'img.gif' means 
'/do/img.gif', since the path is relative to the URL '/do/SetUpMyFrom'.



I've read the html:base tag, but it's not clear to me how to use this tag in
calling  Can you give any related example?


You don't use it as part of constructing the img tag. It goes in the 
'head' section of your page. I.e. you need something like


  

...
  

The result is an HTML 'base' tag that tells the browser the URL to use 
as the base for relative paths, which should make your img tag behave as 
you expect.


L.


Bye,
Viki.

On 12/22/05, Laurie Harper <[EMAIL PROTECTED]> wrote:

Vikrama Sanjeeva wrote:

Hi,

  I've "img.gif" and and "myForm.jsp" in same folder. But when I call

the "

img.gif" with following path, it does not display in myForm.jsp. here it

is:




But when I call with src="../img.gif", it works. Here it is:




Why it so? Some url related problem?

How do you reference your JSP? If you're calling an action which
forwards to the JSP page, the browser doesn't know the physical location
of the JSP and will resolve relative URLs with respect to the action
path, not the JSP path.

You might want to look at the html:base tag [1] to help with this; it
allows you to tell the browser what base path to use for resolving
relative URLs in the page.

L.

[1]
http://struts.apache.org//struts-doc-1.2.8/userGuide/struts-html.html#base


-
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: Checkboxes...

2005-12-22 Thread Wendy Smoak
On 12/22/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> Even though teh default boxes are unchecked, they are
> coming as selected in the java code.
>
> How can i unselect them...

Are you setting them to false in the 'reset' method of your form bean,
as described in the documentation?

http://struts.apache.org/struts-taglib/tagreference-struts-html.html#html:checkbox

"WARNING: In order to correctly recognize unchecked checkboxes, the
ActionForm bean associated with this form must include a statement
setting the corresponding boolean property to false in the reset()
method."

--
Wendy

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



Ich bin im Urlaub

2005-12-22 Thread bednarz
Sehr geehrte Damen und Herren,

in der Zeit vom 27. Dezember 2005 bis 1. Januar 2006 bin
ich im Urlaub. Bitte wenden Sie sich bei allen Fragen und 
technischen Problemen entweder direkt an [EMAIL PROTECTED] 
oder telefonisch an: 0511 / 300 345 00

Mit freundlichen Grüßen,

Andreas Bednarz
ID.on GmbH






Mit freundlichen Grüßen

Andreas Bednarz
Senior Entwickler J2EE
...
ID.on GmbH
Am Graswege 6
30169 Hannover

E-Mail:   [EMAIL PROTECTED]
Telefon: +49 (0) 511 / 300 345-00
Telefax: +49 (0) 511 / 300 345-45
...
http://www.id-on.de
http://www.e-konfigurator.de



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



Checkboxes...

2005-12-22 Thread Shilpa . Nalgonda
Hi All, 
I am using struts checkboxes.  When the checkboxes are populated i make some of 
them as checked by default.
But the user submits the page there might be cases when default ones will be 
unchecked...

Even though teh default boxes are unchecked, they are coming as selected in the 
java code.  

How can i unselect them...

i am using the below code ...


 
  
" value="true" />

  
 


Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


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



Re: Maven version for Struts

2005-12-22 Thread James Mitchell

I see that Wendy did this yesterday.  Sorry for the noise.

--
James Mitchell
678.910.8017
Skpe: jmitchtx



On Dec 22, 2005, at 5:37 PM, James Mitchell wrote:


I'm sure someone will get to that eventually.

Thanks

--
James Mitchell
678.910.8017
Skpe: jmitchtx



On Dec 21, 2005, at 11:25 PM, Andres Paz Sampedro wrote:


Hi,

I saw you have worked in the StrutsMaintenanceMaven wiki page, that's
why I'm bothering you.

I have been trying to build struts myself following the instructions
in this page (and in the Struts web-site), it seemed to be something
trivial, but I couldn't so I was getting very frustrated. It turned
out the problem was the Maven version I was using. First I started
with 2.0 which is not even backwards compatible so nothing happened,
then I went on with 1.1 but kept getting parsing errors. It was until
I started using 1.0.2 (latest stable build) that things started
compiling.

So my request is, could you add a simple note in the Wiki page
recommending to use Maven's latest stable build (if that's what is
supposed people to be using)? I hope this will help some other novice
developers like myself in the future.

Thanks!

-a.



-
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: Maven version for Struts

2005-12-22 Thread James Mitchell

I'm sure someone will get to that eventually.

Thanks

--
James Mitchell
678.910.8017
Skpe: jmitchtx



On Dec 21, 2005, at 11:25 PM, Andres Paz Sampedro wrote:


Hi,

I saw you have worked in the StrutsMaintenanceMaven wiki page, that's
why I'm bothering you.

I have been trying to build struts myself following the instructions
in this page (and in the Struts web-site), it seemed to be something
trivial, but I couldn't so I was getting very frustrated. It turned
out the problem was the Maven version I was using. First I started
with 2.0 which is not even backwards compatible so nothing happened,
then I went on with 1.1 but kept getting parsing errors. It was until
I started using 1.0.2 (latest stable build) that things started
compiling.

So my request is, could you add a simple note in the Wiki page
recommending to use Maven's latest stable build (if that's what is
supposed people to be using)? I hope this will help some other novice
developers like myself in the future.

Thanks!

-a.



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



Re: Back Button Problem..

2005-12-22 Thread Marcelo Morales

Hello again
On Dec 22, 2005, at 3:27 PM, Priya Saloni wrote:


Hi  Marcelo,

//You solve this issue with a redirtect-after-post hack on the logoff
//action.

Thats what iam doing in the following code..

request.getSession().removeAttribute("sessionState");
request.getSession().invalidate();
response.sendRedirect("/BMS/logout_success.jsp");


Yep, That's quite odd. I suppose you must be doing some nonstandard  
processing. I was having throuble with this issue myself. I kindda  
solved it the way everybody else told you to.


This is as usefull as i can be:

First, debug your HTTP conversations. Use an HTTP Monitor (something  
like NetBeans' HTTP monitor) or a tool like wget (use it with the -S  
modifier). Ckeck for the next headers: Pragma, Expires, Client-Date  
and Date.


Secondly, check for the standard browser configuration. In IEs,   
Mozillas and operas there are some nasty configurations regarding  
history and cache. So I'm not sure if there is a complete solution  
available. Had no time to test most of nonstandard configurations.  
Last time i checked, Opera still showed the secured pages when going  
back.


Finally, if you check out the javadoc for RequestProcessor, there is  
this note:


method:
processNoCache

on class:
org.apache.struts.action.RequestProcessor


NOTE - This header will be overridden automatically if a  
RequestDispatcher.forward call is ultimately invoked.



I'm not sure what it means but you may take a look.

There were some discusions back on dec 1st or 3rd on this same list  
regarding this same problem. I think this discussion comes and goes  
every couple of months or so. Is there already an answer on the  
archives?. i bet there is. We may be just making more noise than we  
should.


//This you solve by putting nocache=true in the   
element in

//the struts configuration file

here is the code i added into my struts-config.xml file




//Different Actions..






Iam Still Getting the same problem.In IE i have to hit back button  
severel
times continuously to to the secured pages after logout.But in  
Firefox its

displaying with Single hit to Back Button.

Thanks For Your time

Priya


Hope i helps

Regards

Marcelo Morales

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



Re: [OT] JavaWebParts and Struts / Ajax integration

2005-12-22 Thread Frank W. Zammetti
Sorry to not reply sooner Peter... my web host has been under a major 
DoS attack today, my mail just came back up a minute or so ago.


Pilgrim, Peter wrote:

Hi Frank et Al

I am not sure if the latest 1.0 current version of JavaWebPart
actually distributes the right libraries. 


If looks like ``javawebparts_core.jar'' has the wrong base dir.

It contains strangs paths that look incorrect e.g 
	
	`javawebparts\core\org\apache\commons\beanutils'. 


I would have thought it should have been `

`org\apache\commons\beanutils''


Those paths actually *are* correct... a few releases back we rolled in 
some Commons code so that there would be no external dependencies 
(except for Commons Logging, which we left external to try and alleviate 
any classloaded issues that might arise).  To do this, the packages were 
modified so that org/apache/commons/* is under javawebparts/core.



In order to build the type suggestion, what are the correct jars
to include. I thought it was ``javawebparts_core.jar'' 
and ``javawebparts_taglibs.jar''. Now I get a strange deployment

error like Error: Could not load asds: weblogic.servlet.jsp.JspException: (line 
6): Error in using tag library uri='/tags/javawebparts_ajaxtags.tld' 
prefix='ajax': cannot find tag class: 
'javawebparts.taglib.ajaxtags.AjaxEventTag'


That's right, only the core (which is always required) and the taglib 
jars should be required.


I'm confused though... are you trying to build the cookbook apps or the 
sample app, or your own app?  It *looks* like a simple classpath issue, 
the taglib jar doesn't look to be found by Weblogic.  You can also take 
a look in your server logs... Every class in JWP does a dependency check 
at classload and will report via System.err any dependencies (outside 
the JDK) that it can't find.  I actually burned myself a week or so ago 
trying to use the Chain implementation and forgot to include the code 
JAR, and for a few hours my webapp was just silently not starting up, no 
errors or anything.  I finally figured it out (D'oh!) and decided *that* 
wasn't going to happen again :)


Frank




-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
Sent: 04 December 2005 04:18
To: Sonali Kulkarni; Struts User
Subject: Re: Integrating Struts in DWR??


Sorry about that, I obviously screwed up in QC... the latest build of 
AjaxChat IS NOT A PROPER WEBAPP.  My build script is obviously not 
working right as far as the distro task goes, and I didn't notice. 
Please use the v1.0 alpha, NOT alpha2, which is, AFAIK, correct.  It 
does have some bugs, but they shouldn't bother you if you are just 
checking the AJAX stuff out.


I will correct the latest version tomorrow and cut a new 
release... it 
is ready to be called 1.0 GA at this point anyway, so it's 
just as well. 
 Alternatively, you could check out from CVS HEAD right now, which 
should work fine, but you'll have to compile first.


Frank

Sonali Kulkarni wrote:


Hi Frank,

I downloaded ajaxchat.zip from 
link 


http://sourceforge.net/project/showfiles.php?group_id=49385&pa
ckage_id=171010&release_id=375018 






But I could not find abt jsp files in the zip, Hence cannot run the 
application.
I am planning to run it in Tomcat. Where can I get the 


complete source code


for the application, that I can run, and study.

Thanks,
Sonali


On 12/3/05, *Frank W. Zammetti* <[EMAIL PROTECTED] 
> wrote:


   Some of the questions you ask here are really more for 


you to decide...

   there aren't any canned answers.  That being said, I'll 


do my best...

   To begin with, I highly suggest checking out the 


numerous articles on

   AJAX out there to get a firm grasp on what it really 


is, and if I may be


   so bold, start with my own:

   http://www.omnytex.com/articles

   This will show one way AJAX can be integrated with 


Struts.  You can also

   check out my AjaxChat example app on the Struts Apps 


SourceForge site:


   http://struts.sourceforge.net

   The short answer is that AJAX, generically, is nothing 


but an HTTP

   request.  As far as whatever is on the server is 


concerned, be it a

   Struts apps or something else, it doesn't look any 


different than any

   other request.  Well, I suppose more accurately, it 


doesn't *have* to

   look any different.  If you simply pass simple 


parameters from the


   client and forego XML, then to Struts there's no difference.

   If you want to use XML and Struts, then you will at 


this point have to

   do your own parsing.  With Struts 1.3, it would be 


trivial to add a

   Command to the processing chain to parse an incoming 


XML message and

   translate it to request parameters... come to think of 


it, that exists


   already:

   http://sourceforge.net/projects/strutsws

   Although that's for Web Services, the underlying theory 


is 

Re: Back Button Problem..

2005-12-22 Thread Priya Saloni
Hi  Marcelo,

//You solve this issue with a redirtect-after-post hack on the logoff
//action.

Thats what iam doing in the following code..

request.getSession().removeAttribute("sessionState");
request.getSession().invalidate();
response.sendRedirect("/BMS/logout_success.jsp");
//This you solve by putting nocache=true in the  element in
//the struts configuration file

here is the code i added into my struts-config.xml file




//Different Actions..






Iam Still Getting the same problem.In IE i have to hit back button severel
times continuously to to the secured pages after logout.But in Firefox its
displaying with Single hit to Back Button.

Thanks For Your time

Priya


On 12/22/05, Marcelo Morales <[EMAIL PROTECTED]> wrote:
>
> Hello
> On Dec 16, 2005, at 10:48 AM, Priya Saloni wrote:
>
> > Hi there,
> >
> > I facing a BIG problem in my struts based application.When i logout my
> > website and hit back button it showing a page like the following
> >
> > //
> >  Warning: Page has Expired
> > The page you requested was created using information you submitted
> > in a
> > form. This page is no longer available. As a security precaution,
> > Internet
> > Explorer does not automatically resubmit your information for you.
> >
> > To resubmit your information and view this Web page, click the
> > *Refresh*button.
> >
>
> You solve this issue with a redirtect-after-post hack on the logoff
> action.
>
> >
> > //
> >
> > When i refresh the page its showing the secured web pages too.
>
> This you solve by putting nocache=true in the  element in
> the struts configuration file
>
>
> > My code in
> > LogoutAction is as follows
> >
> > request.getSession().removeAttribute("sessionState");
> > request.getSession().invalidate();
> > response.sendRedirect("/BMS/logout_success.jsp");
>
> This is correct. Should do the tick
>
> >
> > sessionState is the VO where iam keeping all the objects  i want to
> > keep in
> > session..Is there any way in struts to make sure that it won't
> > display the
> > page like above..
> >
> > Thanks
> >
> > Priya.
>
>
> Hope It helps
>
>
> Marcelo Morales
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Back Button Problem..

2005-12-22 Thread Marcelo Morales

Hello
On Dec 16, 2005, at 10:48 AM, Priya Saloni wrote:


Hi there,

I facing a BIG problem in my struts based application.When i logout my
website and hit back button it showing a page like the following

//
 Warning: Page has Expired
The page you requested was created using information you submitted  
in a
form. This page is no longer available. As a security precaution,  
Internet

Explorer does not automatically resubmit your information for you.

To resubmit your information and view this Web page, click the  
*Refresh*button.




You solve this issue with a redirtect-after-post hack on the logoff  
action.




//

When i refresh the page its showing the secured web pages too.


This you solve by putting nocache=true in the  element in  
the struts configuration file




My code in
LogoutAction is as follows

request.getSession().removeAttribute("sessionState");
request.getSession().invalidate();
response.sendRedirect("/BMS/logout_success.jsp");


This is correct. Should do the tick



sessionState is the VO where iam keeping all the objects  i want to  
keep in
session..Is there any way in struts to make sure that it won't  
display the

page like above..

Thanks

Priya.



Hope It helps


Marcelo Morales


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



Re: html:multibox with LabelValueBean

2005-12-22 Thread Craig McClanahan
On 12/22/05, fea jabi <[EMAIL PROTECTED]> wrote:
>
> Thanks, Laurie. that worked.
>
> why is JSTL prefered over the logic tags? is there any doc I can read
> about
> the same?
>
> Thanks.


A couple of reasons I (as the original developer of the logic tags :-)
prefer the JSTL versions:

* The expression syntax for JSTL's logic tags is much more powerful
  and concise.

* JSTL provides the equivalent of a "switch" statement in Java or C
  for dealing with if/else or if-elseif-elseif-else type scenarios.  Struts
does not.
  See the , , and  tags.

* The JSTL tags are provided by the container, and can potentially be
  performance optimized by the container provider.

* The JSTL expression syntax is now (as of JSP 2.0) available everywhere
  in a JSP page, not just in tags that understand the syntax.

* The JSTL syntax is very similar to the JSF expression syntax, so if you
  ever switch to using JSF for your view technology, you won't have to
  learn a new expression language syntax.

The Struts logic tags preceeded JSTL, but they have basically been
superceded by the standard functionality.  They're still in the library
primarily for backwards compatibility.

Craig


Re: [.do -> JSF/Shale]

2005-12-22 Thread Craig McClanahan
On 12/22/05, Garner, Shawn <[EMAIL PROTECTED]> wrote:
>
> Can you elaborate on the first two bullets (*)?
> I'm not familiar with either.


The current remoting implementation in Shale allows you to register commands
or chains (in the Commons Chain sense) to context-relative URL patterns.  It
uses a filter to intercept such requests ahead of the standard JSF
processing servlet.  The "use cases" example webapp that comes with Shale
illustrates this with a couple examples, such as this one in the
chain-config.xml file:








...



So, when a context relative URL of "/list/stateNames.remote" is recognized
on an incoming request, the specified chain is executed to prepare the
response (in this case, it creates a list of US state abbreviations and
names in an XML format), instead of the usual JSF processing.

It would be straightforward to make the matching a bit more flexible, so you
could match a pattern like "/list/*.remote" instead, going to a chain that
would then be able to parse out which list you wanted.  But, even without
that, you could create a chain for all the interesting URLs with the
existing technology.

I'm not inclined to be for the idea of mixing architectures by including
> action based struts in JSF/Shale so I'm not big on the third bullet (*).
>
> Shawn


Craig


Ich bin im Urlaub

2005-12-22 Thread bednarz
Sehr geehrte Damen und Herren,

in der Zeit vom 27. Dezember 2005 bis 1. Januar 2006 bin
ich im Urlaub. Bitte wenden Sie sich bei allen Fragen und 
technischen Problemen entweder direkt an [EMAIL PROTECTED] 
oder telefonisch an: 0511 / 300 345 00

Mit freundlichen Grüßen,

Andreas Bednarz
ID.on GmbH






Mit freundlichen Grüßen

Andreas Bednarz
Senior Entwickler J2EE
...
ID.on GmbH
Am Graswege 6
30169 Hannover

E-Mail:   [EMAIL PROTECTED]
Telefon: +49 (0) 511 / 300 345-00
Telefax: +49 (0) 511 / 300 345-45
...
http://www.id-on.de
http://www.e-konfigurator.de



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



Re: instance validation struts shale?

2005-12-22 Thread Craig McClanahan
On 12/22/05, JEEVANATHAM P. /BPCRP/INFOTECH/VASHI <
[EMAIL PROTECTED]> wrote:
>
>
>
> Can we do instance validation for particular field in SHALE? Like onblur()
> event.


Shale's support for validation, along with other features, are described on
the Shale web site:

  http://struts.apache.org/struts-shale/features-commons-validator.html


Please let me know
>
> Regards,
>
> JEEVANANTHAM PARAMASAMY,


Craig


RE: Tiles with Struts

2005-12-22 Thread Buntin, Seth - KATE
Thanks Antonio.  That was it.  I just found that off a web site and I
guess the site was somewhat old.

 

Seth Buntin

Web Resources Coordinator

Kentucky Academy of Technology Education

Murray State University

 



WebLogic serializing ServletContext

2005-12-22 Thread George.Dinwiddie
Is anyone successfully using Struts on a WebLogic Managed Server?

We are seeing errors like this:

   
<[ServletContext(id=18877050,name=servicerlink,context-path=)] 
could not deserialize the context attribute 
"org.apache.struts.action.PLUG_INS"
java.io.NotSerializableException:
org.apache.struts.validator.ValidatorPlugIn
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)

and


<[ServletContext(id=3031962,name=direct,context-path=/direct)] 
could not deserialize the context attribute 
"org.apache.struts.tiles.DEFINITIONS_FACTORY"
java.io.NotSerializableException:
com.wellsfargo.link.view.controllers.IndexController
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)

We started down the path of wrapping objects in wrapper classes that
implement Serializable, but that seemed like a never-ending quest.  This
looks like exactly the same problem as that described in
http://issues.apache.org/bugzilla/show_bug.cgi?id=28868.  It appears to
be somewhat different from bug 26322, and I don't think bug 28868 is
really a duplicate of 26322.

I do not know why BEA is serializing the ServletContext, and my reading
of the Servlet 2.2 and 2.3 specs gives me doubt that they should be
doing so.  Perhaps it's due to a misconfiguration on our part.  It
occurs to me, however, that there must be others successfully using
Struts on WebLogic.  If so, I'd like to hear from you.

 - George

--
 George Dinwiddie
 410-884-6473
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]

"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies."  -- C. A. R. Hoare

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



Re: Tiles with Struts

2005-12-22 Thread brenmcguire

>
>
>DoFirst.java:
>
>package edu.msu.kate.struts.action;
>
>
>
>import org.apache.struts.action.*;
>
>import javax.servlet.http.*;
>
>
>
>public class DoFirst extends Action {
>
>public ActionForward perform(
>
>ActionMapping aMapping,
>
>ActionForm aForm,
>
>HttpServletRequest aRequest,
>
>HttpServletResponse aResponse
>
>){
>
>return aMapping.findForward("success");
>
>}
>
>}
>

Override "execute" method, not "perform". It is deprecated, but it should
be removed at all.
Ciao
Antonio Petrelli


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



Re: Same action with multiple submit buttons

2005-12-22 Thread Dakota Jack
Again, how lookup dispatch action "works" is explained at
http://www.michaelmcgrady.com/button/.  But the options there are simpler,
faster, superior.  LookupDispatchAction is a dynosaur.

On 12/21/05, Shiby Maria John <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I tried using the LookupDispatchAction for this...
> But I am gettng this error..
>
> Can anyone explain how this class works??
>
> java.lang.NullPointerException
>
> org.apache.struts.actions.LookupDispatchAction.execute(
> LookupDispatchAction.java:233)
>
>
> org.apache.struts.action.RequestProcessor.processActionPerform(
> RequestProcessor.java:480)
>
>
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java
> :274)
>
>
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
>
>
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> ---Code
> follows---
> jsp code:-
> <%@ taglib  uri="/WEB-INF/tlds/struts-html.tld"  prefix="html"%>
> <%@ taglib  uri="/WEB-INF/tlds/struts-logic.tld"  prefix="logic"%>
> <%@ taglib  uri="/WEB-INF/tlds/struts-bean.tld"  prefix="bean"%>
>
> <%
> response.setDateHeader("Expires", 1);
> response.setHeader("Cache-control", "must-revalidate");
> %>
>
> 
>   
> DispatchAction Test
> 
>   
>   
> 
> Enter a value in the
> text1
>  property="method">Submit1
> Enter a value in the
> text2
>  property="method">Submit2
> 
>   
> 
>
> struts-config :-
>  parameter="method"
> name="myDispForm">
>path="/jsp/dispatchActionResult.jsp" />
> 
>
> MyDispatchAction:-
>
> public class MyDispatchAction extends LookupDispatchAction {
>
>   @Override
>   protected Map getKeyMethodMap() {
> Map map = new HashMap();
> map.put("Submit1", "submit1");
> map.put("Submit2", "submit2");
> return null;
>   }
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~


Re: Tiles with Struts

2005-12-22 Thread Buntin, Seth - KATE
My web.xml file has:

 



  index.jsp



 

index.jsp:

<%@ taglib uri="/tags/struts-logic" prefix="logic" %>



 

 

struts-config.xml:



  



  



  



  



 

DoFirst.java:

package edu.msu.kate.struts.action;

 

import org.apache.struts.action.*;

import javax.servlet.http.*;

 

public class DoFirst extends Action {

public ActionForward perform(

ActionMapping aMapping,

ActionForm aForm,

HttpServletRequest aRequest,

HttpServletResponse aResponse

){

return aMapping.findForward("success");

}

}

 

Seth Buntin

Web Resources Coordinator

Kentucky Academy of Technology Education

Murray State University

 



Re: html:multibox with LabelValueBean

2005-12-22 Thread Pazhanikanthan Periasamy
If the requirement is deviated from the regular / common requirements, 
then obviously it is possible. Based on my experience, I have not faced a 
situation where I cannot use. Not offending anyone in particular, most of 
such difficulties arise becoz some of us (developers including me) dont 
know how to use the tag libs properly.

Thanks and regards,
Pazhanikanthan. P
Project Leader,
Caritor (India) Pvt. Ltd.,
Madras - 600 006
Mob: 9886152717
Extn: 40123



Srinivas Jadcharla <[EMAIL PROTECTED]> 
12/22/2005 09:19 PM
Please respond to
"Struts Users Mailing List" 


To
Struts Users Mailing List 
cc

Subject
Re: html:multibox with LabelValueBean






I may be wrong but i saw in some situations i dont have proper tag libs in
struts.

On 12/22/05, Pazhanikanthan Periasamy 
<[EMAIL PROTECTED]>
wrote:
>
> Apache Struts developers are very very clever to ensure that you wont 
get
> an oppurtunity for using JSTL :)
>
> Thanks and regards,
> Pazhanikanthan. P
> Project Leader,
> Caritor (India) Pvt. Ltd.,
> Madras - 600 006
> Mob: 9886152717
> Extn: 40123
>
>
>
> Srinivas Jadcharla <[EMAIL PROTECTED]>
> 12/22/2005 09:14 PM
> Please respond to
> "Struts Users Mailing List" 
>
>
> To
> Struts Users Mailing List 
> cc
>
> Subject
> Re: html:multibox with LabelValueBean
>
>
>
>
>
>
> I think its always better to use Struts taglibs where ever it is 
possible
> because of less coding.Where exactly we need JSTL(Wild guess .where its
> not
> possible with  Struts tag libs?) .Correct me if iam wrong
>
> On 12/22/05, Pazhanikanthan Periasamy
> <[EMAIL PROTECTED]>
> wrote:
> >
> > Hello Fea,
> >
> > I dont think, there are any differences in the way both JSTL and 
Struts
> > logic tags work. Fundamentally they both iterate the same input array
> and
> > produce the output. Using Logic Iterate tags, you can eliminate many
> > scriptlet tags that you might end up using when you use JSTL scripts.
> The
> > choice is yours as to which to choose.
> >
> > JSTL is Java standard. Logic Iterate is Struts specific.
> >
> > Thanks and regards,
> > Pazhanikanthan. P
> > Project Leader,
> > Caritor (India) Pvt. Ltd.,
> > Madras - 600 006
> > Mob: 9886152717
> > Extn: 40123
> >
> >
> >
> > "fea jabi" <[EMAIL PROTECTED]>
> > 12/22/2005 09:03 PM
> > Please respond to
> > "Struts Users Mailing List" 
> >
> >
> > To
> > user@struts.apache.org
> > cc
> >
> > Subject
> > Re: html:multibox with LabelValueBean
> >
> >
> >
> >
> >
> >
> > Thanks, Laurie. that worked.
> >
> > why is JSTL prefered over the logic tags? is there any doc I can read
> > about
> > the same?
> >
> > Thanks.
> >
> >
> > >From: Laurie Harper <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List" 
> > >To: user@struts.apache.org
> > >Subject: Re: html:multibox with LabelValueBean
> > >Date: Wed, 21 Dec 2005 16:55:06 -0500
> > >
> > >fea jabi wrote:
> > >>Trying to use html:multibox with LabelValueBean.
> > >>
> > >>Getting error doing the same.
> > >>
> > >>
> > >>  
> > >>  > >>type="java.util.ArrayList[]"/>
> > >>
> > >>
> > >>
> > >>
> > >>In prepare Action
> > >>...
> > >>...
> > >>
> > >>LabelValueBean lblValueBean1 = new LabelValueBean("Visa1", "V1");
> > >>LabelValueBean lblValueBean2 = new LabelValueBean("MasterCard1",
> "M1");
> > >>
> > >>
> > >>  ArrayList misList = new ArrayList();
> > >>  misList.add(lblValueBean1);
> > >>  misList.add(lblValueBean2);
> > >>
> > >>  ArrayList selectedList = new ArrayList();
> > >>  selectedList.add(lblValueBean1);
> > >>
> > >>  form.set("Items", misList);
> > >>  form.set("SelectedItems", selectedList);
> > >>.
> > >>.
> > >>
> > >>
> > >>In JSP
> > >>
> > >>..
> > >>
> > >>
> > >>  
> > >>
> > >>  
> > >>
> > >>
> > >>
> > >>not sure what's wrong in here.
> > >
> > >For one thing, you've declared your form bean properties to be of 
type
> > >ArrayList[], but you're actually setting them with just ArrayList --
> i.e.
> >
> > >you're declaring an array of lists, but only supplying a single list.
> > Don't
> > >know if that's the problem but it's definitely odd :-)
> > >
> > >>Also, would like to know if it's better to use the logicIterate or
> JSTL
> > to
> > >>loop thru the items as I am new to JSTL too.
> > >
> > >In general the JSTL tags should be prefered over the Struts logic 
tags,
> > >though either will work fine in most cases.
> > >
> > >L.
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> > _
> > Express yourself instantly with MSN Messenger! Download today - it's
> FREE!
> >
> > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-m

Re: html:multibox with LabelValueBean

2005-12-22 Thread Srinivas Jadcharla
I may be wrong but i saw in some situations i dont have proper tag libs in
struts.

On 12/22/05, Pazhanikanthan Periasamy <[EMAIL PROTECTED]>
wrote:
>
> Apache Struts developers are very very clever to ensure that you wont get
> an oppurtunity for using JSTL :)
>
> Thanks and regards,
> Pazhanikanthan. P
> Project Leader,
> Caritor (India) Pvt. Ltd.,
> Madras - 600 006
> Mob: 9886152717
> Extn: 40123
>
>
>
> Srinivas Jadcharla <[EMAIL PROTECTED]>
> 12/22/2005 09:14 PM
> Please respond to
> "Struts Users Mailing List" 
>
>
> To
> Struts Users Mailing List 
> cc
>
> Subject
> Re: html:multibox with LabelValueBean
>
>
>
>
>
>
> I think its always better to use Struts taglibs where ever it is possible
> because of less coding.Where exactly we need JSTL(Wild guess .where its
> not
> possible with  Struts tag libs?) .Correct me if iam wrong
>
> On 12/22/05, Pazhanikanthan Periasamy
> <[EMAIL PROTECTED]>
> wrote:
> >
> > Hello Fea,
> >
> > I dont think, there are any differences in the way both JSTL and Struts
> > logic tags work. Fundamentally they both iterate the same input array
> and
> > produce the output. Using Logic Iterate tags, you can eliminate many
> > scriptlet tags that you might end up using when you use JSTL scripts.
> The
> > choice is yours as to which to choose.
> >
> > JSTL is Java standard. Logic Iterate is Struts specific.
> >
> > Thanks and regards,
> > Pazhanikanthan. P
> > Project Leader,
> > Caritor (India) Pvt. Ltd.,
> > Madras - 600 006
> > Mob: 9886152717
> > Extn: 40123
> >
> >
> >
> > "fea jabi" <[EMAIL PROTECTED]>
> > 12/22/2005 09:03 PM
> > Please respond to
> > "Struts Users Mailing List" 
> >
> >
> > To
> > user@struts.apache.org
> > cc
> >
> > Subject
> > Re: html:multibox with LabelValueBean
> >
> >
> >
> >
> >
> >
> > Thanks, Laurie. that worked.
> >
> > why is JSTL prefered over the logic tags? is there any doc I can read
> > about
> > the same?
> >
> > Thanks.
> >
> >
> > >From: Laurie Harper <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List" 
> > >To: user@struts.apache.org
> > >Subject: Re: html:multibox with LabelValueBean
> > >Date: Wed, 21 Dec 2005 16:55:06 -0500
> > >
> > >fea jabi wrote:
> > >>Trying to use html:multibox with LabelValueBean.
> > >>
> > >>Getting error doing the same.
> > >>
> > >>
> > >>  
> > >>  > >>type="java.util.ArrayList[]"/>
> > >>
> > >>
> > >>
> > >>
> > >>In prepare Action
> > >>...
> > >>...
> > >>
> > >>LabelValueBean lblValueBean1 = new LabelValueBean("Visa1", "V1");
> > >>LabelValueBean lblValueBean2 = new LabelValueBean("MasterCard1",
> "M1");
> > >>
> > >>
> > >>  ArrayList misList = new ArrayList();
> > >>  misList.add(lblValueBean1);
> > >>  misList.add(lblValueBean2);
> > >>
> > >>  ArrayList selectedList = new ArrayList();
> > >>  selectedList.add(lblValueBean1);
> > >>
> > >>  form.set("Items", misList);
> > >>  form.set("SelectedItems", selectedList);
> > >>.
> > >>.
> > >>
> > >>
> > >>In JSP
> > >>
> > >>..
> > >>
> > >>
> > >>  
> > >>
> > >>  
> > >>
> > >>
> > >>
> > >>not sure what's wrong in here.
> > >
> > >For one thing, you've declared your form bean properties to be of type
> > >ArrayList[], but you're actually setting them with just ArrayList --
> i.e.
> >
> > >you're declaring an array of lists, but only supplying a single list.
> > Don't
> > >know if that's the problem but it's definitely odd :-)
> > >
> > >>Also, would like to know if it's better to use the logicIterate or
> JSTL
> > to
> > >>loop thru the items as I am new to JSTL too.
> > >
> > >In general the JSTL tags should be prefered over the Struts logic tags,
> > >though either will work fine in most cases.
> > >
> > >L.
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> > _
> > Express yourself instantly with MSN Messenger! Download today - it's
> FREE!
> >
> > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
>
> --
> Thanks & RegardsSrinivas732-648-9421(Cell)
>
>
>


--
Thanks & RegardsSrinivas732-648-9421(Cell)


Re: validation.xml

2005-12-22 Thread Rahul Akolkar
On 12/22/05, Srinivas Jadcharla <[EMAIL PROTECTED]> wrote:
> When it looks validate = true in struts-config.xml and when you form extends
> ValidatorForm it looks for validations in Validator.xml this is how Client
> Side Validation Works.How Exactly you are implementing Serverside
> validations?
>


Look at Commons Validator:
http://jakarta.apache.org/commons/validator/

Server-side bits:
http://jakarta.apache.org/commons/validator/apidocs/index.html

-Rahul


> On 22 Dec 2005 15:21:39 -, rahul kshirsagar <[EMAIL PROTECTED]>
> wrote:
> >
> > Hi,
> >
> > I am using validation.xml in my application.It takes care of client side
> > as well as server side validations.It is working fine.But i dont
> > understand how exactly it takes care of both validations.
> >
> > Regards,
> > Rahul.
> >
> >
>
>
> --
> Thanks & RegardsSrinivas732-648-9421(Cell)
>

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



Re: html:multibox with LabelValueBean

2005-12-22 Thread Pazhanikanthan Periasamy
Apache Struts developers are very very clever to ensure that you wont get 
an oppurtunity for using JSTL :)

Thanks and regards,
Pazhanikanthan. P
Project Leader,
Caritor (India) Pvt. Ltd.,
Madras - 600 006
Mob: 9886152717
Extn: 40123



Srinivas Jadcharla <[EMAIL PROTECTED]> 
12/22/2005 09:14 PM
Please respond to
"Struts Users Mailing List" 


To
Struts Users Mailing List 
cc

Subject
Re: html:multibox with LabelValueBean






I think its always better to use Struts taglibs where ever it is possible
because of less coding.Where exactly we need JSTL(Wild guess .where its 
not
possible with  Struts tag libs?) .Correct me if iam wrong

On 12/22/05, Pazhanikanthan Periasamy 
<[EMAIL PROTECTED]>
wrote:
>
> Hello Fea,
>
> I dont think, there are any differences in the way both JSTL and Struts
> logic tags work. Fundamentally they both iterate the same input array 
and
> produce the output. Using Logic Iterate tags, you can eliminate many
> scriptlet tags that you might end up using when you use JSTL scripts. 
The
> choice is yours as to which to choose.
>
> JSTL is Java standard. Logic Iterate is Struts specific.
>
> Thanks and regards,
> Pazhanikanthan. P
> Project Leader,
> Caritor (India) Pvt. Ltd.,
> Madras - 600 006
> Mob: 9886152717
> Extn: 40123
>
>
>
> "fea jabi" <[EMAIL PROTECTED]>
> 12/22/2005 09:03 PM
> Please respond to
> "Struts Users Mailing List" 
>
>
> To
> user@struts.apache.org
> cc
>
> Subject
> Re: html:multibox with LabelValueBean
>
>
>
>
>
>
> Thanks, Laurie. that worked.
>
> why is JSTL prefered over the logic tags? is there any doc I can read
> about
> the same?
>
> Thanks.
>
>
> >From: Laurie Harper <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" 
> >To: user@struts.apache.org
> >Subject: Re: html:multibox with LabelValueBean
> >Date: Wed, 21 Dec 2005 16:55:06 -0500
> >
> >fea jabi wrote:
> >>Trying to use html:multibox with LabelValueBean.
> >>
> >>Getting error doing the same.
> >>
> >>
> >>  
> >>  >>type="java.util.ArrayList[]"/>
> >>
> >>
> >>
> >>
> >>In prepare Action
> >>...
> >>...
> >>
> >>LabelValueBean lblValueBean1 = new LabelValueBean("Visa1", "V1");
> >>LabelValueBean lblValueBean2 = new LabelValueBean("MasterCard1", 
"M1");
> >>
> >>
> >>  ArrayList misList = new ArrayList();
> >>  misList.add(lblValueBean1);
> >>  misList.add(lblValueBean2);
> >>
> >>  ArrayList selectedList = new ArrayList();
> >>  selectedList.add(lblValueBean1);
> >>
> >>  form.set("Items", misList);
> >>  form.set("SelectedItems", selectedList);
> >>.
> >>.
> >>
> >>
> >>In JSP
> >>
> >>..
> >>
> >>
> >>  
> >>
> >>  
> >>
> >>
> >>
> >>not sure what's wrong in here.
> >
> >For one thing, you've declared your form bean properties to be of type
> >ArrayList[], but you're actually setting them with just ArrayList -- 
i.e.
>
> >you're declaring an array of lists, but only supplying a single list.
> Don't
> >know if that's the problem but it's definitely odd :-)
> >
> >>Also, would like to know if it's better to use the logicIterate or 
JSTL
> to
> >>loop thru the items as I am new to JSTL too.
> >
> >In general the JSTL tags should be prefered over the Struts logic tags,
> >though either will work fine in most cases.
> >
> >L.
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> Express yourself instantly with MSN Messenger! Download today - it's 
FREE!
>
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>


--
Thanks & RegardsSrinivas732-648-9421(Cell)



Re: html:multibox with LabelValueBean

2005-12-22 Thread Srinivas Jadcharla
I think its always better to use Struts taglibs where ever it is possible
because of less coding.Where exactly we need JSTL(Wild guess .where its not
possible with  Struts tag libs?) .Correct me if iam wrong

On 12/22/05, Pazhanikanthan Periasamy <[EMAIL PROTECTED]>
wrote:
>
> Hello Fea,
>
> I dont think, there are any differences in the way both JSTL and Struts
> logic tags work. Fundamentally they both iterate the same input array and
> produce the output. Using Logic Iterate tags, you can eliminate many
> scriptlet tags that you might end up using when you use JSTL scripts. The
> choice is yours as to which to choose.
>
> JSTL is Java standard. Logic Iterate is Struts specific.
>
> Thanks and regards,
> Pazhanikanthan. P
> Project Leader,
> Caritor (India) Pvt. Ltd.,
> Madras - 600 006
> Mob: 9886152717
> Extn: 40123
>
>
>
> "fea jabi" <[EMAIL PROTECTED]>
> 12/22/2005 09:03 PM
> Please respond to
> "Struts Users Mailing List" 
>
>
> To
> user@struts.apache.org
> cc
>
> Subject
> Re: html:multibox with LabelValueBean
>
>
>
>
>
>
> Thanks, Laurie. that worked.
>
> why is JSTL prefered over the logic tags? is there any doc I can read
> about
> the same?
>
> Thanks.
>
>
> >From: Laurie Harper <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" 
> >To: user@struts.apache.org
> >Subject: Re: html:multibox with LabelValueBean
> >Date: Wed, 21 Dec 2005 16:55:06 -0500
> >
> >fea jabi wrote:
> >>Trying to use html:multibox with LabelValueBean.
> >>
> >>Getting error doing the same.
> >>
> >>
> >>  
> >>  >>type="java.util.ArrayList[]"/>
> >>
> >>
> >>
> >>
> >>In prepare Action
> >>...
> >>...
> >>
> >>LabelValueBean lblValueBean1 = new LabelValueBean("Visa1", "V1");
> >>LabelValueBean lblValueBean2 = new LabelValueBean("MasterCard1", "M1");
> >>
> >>
> >>  ArrayList misList = new ArrayList();
> >>  misList.add(lblValueBean1);
> >>  misList.add(lblValueBean2);
> >>
> >>  ArrayList selectedList = new ArrayList();
> >>  selectedList.add(lblValueBean1);
> >>
> >>  form.set("Items", misList);
> >>  form.set("SelectedItems", selectedList);
> >>.
> >>.
> >>
> >>
> >>In JSP
> >>
> >>..
> >>
> >>
> >>  
> >>
> >>  
> >>
> >>
> >>
> >>not sure what's wrong in here.
> >
> >For one thing, you've declared your form bean properties to be of type
> >ArrayList[], but you're actually setting them with just ArrayList -- i.e.
>
> >you're declaring an array of lists, but only supplying a single list.
> Don't
> >know if that's the problem but it's definitely odd :-)
> >
> >>Also, would like to know if it's better to use the logicIterate or JSTL
> to
> >>loop thru the items as I am new to JSTL too.
> >
> >In general the JSTL tags should be prefered over the Struts logic tags,
> >though either will work fine in most cases.
> >
> >L.
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> Express yourself instantly with MSN Messenger! Download today - it's FREE!
>
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>


--
Thanks & RegardsSrinivas732-648-9421(Cell)


Re: html:multibox with LabelValueBean

2005-12-22 Thread Pazhanikanthan Periasamy
Hello Fea,

I dont think, there are any differences in the way both JSTL and Struts 
logic tags work. Fundamentally they both iterate the same input array and 
produce the output. Using Logic Iterate tags, you can eliminate many 
scriptlet tags that you might end up using when you use JSTL scripts. The 
choice is yours as to which to choose.

JSTL is Java standard. Logic Iterate is Struts specific.

Thanks and regards,
Pazhanikanthan. P
Project Leader,
Caritor (India) Pvt. Ltd.,
Madras - 600 006
Mob: 9886152717
Extn: 40123



"fea jabi" <[EMAIL PROTECTED]> 
12/22/2005 09:03 PM
Please respond to
"Struts Users Mailing List" 


To
user@struts.apache.org
cc

Subject
Re: html:multibox with LabelValueBean






Thanks, Laurie. that worked.

why is JSTL prefered over the logic tags? is there any doc I can read 
about 
the same?

Thanks.


>From: Laurie Harper <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" 
>To: user@struts.apache.org
>Subject: Re: html:multibox with LabelValueBean
>Date: Wed, 21 Dec 2005 16:55:06 -0500
>
>fea jabi wrote:
>>Trying to use html:multibox with LabelValueBean.
>>
>>Getting error doing the same.
>>
>>
>>  
>> >type="java.util.ArrayList[]"/>
>>
>>
>>
>>
>>In prepare Action
>>...
>>...
>>
>>LabelValueBean lblValueBean1 = new LabelValueBean("Visa1", "V1");
>>LabelValueBean lblValueBean2 = new LabelValueBean("MasterCard1", "M1");
>>
>>
>>  ArrayList misList = new ArrayList();
>>  misList.add(lblValueBean1);
>>  misList.add(lblValueBean2);
>>
>>  ArrayList selectedList = new ArrayList();
>>  selectedList.add(lblValueBean1);
>>
>>  form.set("Items", misList);
>>  form.set("SelectedItems", selectedList);
>>.
>>.
>>
>>
>>In JSP
>>
>>..
>>
>>
>>  
>>
>>  
>>
>>
>>
>>not sure what's wrong in here.
>
>For one thing, you've declared your form bean properties to be of type 
>ArrayList[], but you're actually setting them with just ArrayList -- i.e. 

>you're declaring an array of lists, but only supplying a single list. 
Don't 
>know if that's the problem but it's definitely odd :-)
>
>>Also, would like to know if it's better to use the logicIterate or JSTL 
to 
>>loop thru the items as I am new to JSTL too.
>
>In general the JSTL tags should be prefered over the Struts logic tags, 
>though either will work fine in most cases.
>
>L.
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 

http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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




Re: html:multibox with LabelValueBean

2005-12-22 Thread fea jabi

Thanks, Laurie. that worked.

why is JSTL prefered over the logic tags? is there any doc I can read about 
the same?


Thanks.



From: Laurie Harper <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: user@struts.apache.org
Subject: Re: html:multibox with LabelValueBean
Date: Wed, 21 Dec 2005 16:55:06 -0500

fea jabi wrote:

Trying to use html:multibox with LabelValueBean.

Getting error doing the same.


 
type="java.util.ArrayList[]"/>





In prepare Action
...
...

LabelValueBean lblValueBean1 = new LabelValueBean("Visa1", "V1");
LabelValueBean lblValueBean2 = new LabelValueBean("MasterCard1", "M1");


 ArrayList misList = new ArrayList();
 misList.add(lblValueBean1);
 misList.add(lblValueBean2);

 ArrayList selectedList = new ArrayList();
 selectedList.add(lblValueBean1);

 form.set("Items", misList);
 form.set("SelectedItems", selectedList);
.
.


In JSP

..

   
 
   
 



not sure what's wrong in here.


For one thing, you've declared your form bean properties to be of type 
ArrayList[], but you're actually setting them with just ArrayList -- i.e. 
you're declaring an array of lists, but only supplying a single list. Don't 
know if that's the problem but it's definitely odd :-)


Also, would like to know if it's better to use the logicIterate or JSTL to 
loop thru the items as I am new to JSTL too.


In general the JSTL tags should be prefered over the Struts logic tags, 
though either will work fine in most cases.


L.


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



_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



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



Re: validation.xml

2005-12-22 Thread Pazhanikanthan Periasamy
Hello Srinivas,

When Struts identifies the attribute validate="true" in its config files, 
it check whether the Validator Plug In is configured in the configuration. 
Then it checks if the validation.xml contains the form name which is being 
accessed. If yes, it identifies the form fields to be validated and calls 
the plugin methods for validation.

Thanks and regards,
Pazhanikanthan. P
Project Leader,
Caritor (India) Pvt. Ltd.,
Madras - 600 006
Mob: 9886152717
Extn: 40123



Srinivas Jadcharla <[EMAIL PROTECTED]> 
12/22/2005 08:59 PM
Please respond to
"Struts Users Mailing List" 


To
Struts Users Mailing List , rahul kshirsagar 
<[EMAIL PROTECTED]>
cc

Subject
Re: validation.xml






When it looks validate = true in struts-config.xml and when you form 
extends
ValidatorForm it looks for validations in Validator.xml this is how Client
Side Validation Works.How Exactly you are implementing Serverside
validations?

On 22 Dec 2005 15:21:39 -, rahul kshirsagar <[EMAIL PROTECTED]>
wrote:
>
> Hi,
>
> I am using validation.xml in my application.It takes care of client side
> as well as server side validations.It is working fine.But i dont
> understand how exactly it takes care of both validations.
>
> Regards,
> Rahul.
>
>


--
Thanks & RegardsSrinivas732-648-9421(Cell)



Re: validation.xml

2005-12-22 Thread Srinivas Jadcharla
When it looks validate = true in struts-config.xml and when you form extends
ValidatorForm it looks for validations in Validator.xml this is how Client
Side Validation Works.How Exactly you are implementing Serverside
validations?

On 22 Dec 2005 15:21:39 -, rahul kshirsagar <[EMAIL PROTECTED]>
wrote:
>
> Hi,
>
> I am using validation.xml in my application.It takes care of client side
> as well as server side validations.It is working fine.But i dont
> understand how exactly it takes care of both validations.
>
> Regards,
> Rahul.
>
>


--
Thanks & RegardsSrinivas732-648-9421(Cell)


Re: validation.xml

2005-12-22 Thread Pazhanikanthan Periasamy
I believe you would have read this article from Struts documentation.

http://struts.apache.org/struts-doc-1.2.4/userGuide/dev_validator.html

Thanks and regards,
Pazhanikanthan. P
Project Leader,
Caritor (India) Pvt. Ltd.,
Madras - 600 006
Mob: 9886152717
Extn: 40123



"rahul  kshirsagar" <[EMAIL PROTECTED]> 
12/22/2005 08:51 PM
Please respond to
"Struts Users Mailing List" 


To
user@struts.apache.org
cc

Subject
validation.xml






Hi,

I am using validation.xml in my application.It takes care of client side 
as well as server side validations.It is working fine.But i dont 
understand how exactly it takes care of both validations.

Regards,
Rahul.  



validation.xml

2005-12-22 Thread rahul kshirsagar
Hi,

I am using validation.xml in my application.It takes care of client side as 
well as server side validations.It is working fine.But i dont understand how 
exactly it takes care of both validations.

Regards,
Rahul.  


Re: Tiles with Struts

2005-12-22 Thread Greg Reddin


On Dec 22, 2005, at 8:59 AM, Buntin, Seth - KATE wrote:

I am having an issue getting Tiles to work.  I am totally new to  
Struts

so bear with me.  The issue is I don't see anything.  I got to home.do
(which is set up as what the user will see first) and it is totally
blank and the source is totally empty.  I think I have everything  
in my

configuration correct but don't know what to do.


Does your web.xml point to an index.jsp or something similar for a  
welcome-file?  Can you post the contents of that?  What does the  
configuration for the home.do action look like?


There are several reasons why this might happen.

Thanks,
Greg

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



Re: Tiles with Struts

2005-12-22 Thread brenmcguire
How about your "home.do" action mapping and the connected action? Maybe
you return a wrong ActionForward...
Ciao
Antonio Petrelli

Buntin, Seth - KATE ha scritto:

>I am having an issue getting Tiles to work.  I am totally new to Struts
>so bear with me.  The issue is I don't see anything.  I got to home.do
>(which is set up as what the user will see first) and it is totally
>blank and the source is totally empty.  I think I have everything in my
>configuration correct but don't know what to do.  Here are my files:
>
>
>
>/WEB-INF/tiles-def.xml:
>
>
>
>
>
>
>   "-//Apache Software Foundation//DTD Tiles Configuration 1.3//EN"
>
>   "http://struts.apache.org/dtds/tiles-config_1_3.dtd";>
>
>
>
>
>
>  
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>  
>
>
>
>
>
>
>
>
>
>
>
>/layout/layout.jsp:
>
>
>
><%@ taglib uri="/tags/struts-bean" prefix="bean" %>
>
><%@ taglib uri="/tags/struts-html" prefix="html" %>
>
><%@ taglib uri="/tags/struts-logic" prefix="logic" %>
>
><%@ taglib uri="http://struts.apache.org/tags-tiles"; prefix="tiles" %>
>
>
>
>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
>
>http://www.w3.org/1999/xhtml";>
>
>  
>
>
>
>type="text/css" />
>
>  
>
>
>
>  
>
>
>
>  
>
>  
>
>
>
>
>
>
>
>  <%-- include header --%>
>
>  
>
>  
>
>
>
>
>
>
>
>
>
>
>
>  <%-- include navigation --%>
>
>  
>
>
>
>
>
>
>
>
>
>
>
>  
>
><%-- include body --%>
>
>  
>
>  
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>  <%-- include footer --%>
>
>  
>
>
>
>
>
>
>
>  
>
>  
>
>
>
>  
>
>
>
>
>
>I have these in my /WEB-INF/struts-config.xml file:
>
>
>
>processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
>
>
>
>value="/WEB-INF/tiles-defs.xml" />
>
>
>
>
>
>
>
>Can someone point me in the right direction?
>
>
>
>Thanks,
>
>
>
>Seth Buntin
>
>Web Resources Coordinator
>
>Kentucky Academy of Technology Education
>
>Murray State University
>
>
>
>



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



RE: [JSF/Shale] Controller returning null

2005-12-22 Thread Garner, Shawn
Cool thanks,

I was hoping that was the case.
Makes for a lot less work.

Shawn

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
McClanahan
Sent: Wednesday, December 21, 2005 7:08 PM
To: Struts Users Mailing List
Subject: Re: [JSF/Shale] Controller returning null

On 12/21/05, Alexandre Poitras <[EMAIL PROTECTED]> wrote:
>
> I am not 100% sure but I think it does return the previously rendered
> view.
>
> On 12/21/05, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> >
> > I see examples of the controller method returning "success" or "error"
> > type
> > situations which are mapped in the faces-config.xml file.
> >
> > What happens if you return null from a controller method?
> >


Apologies if this is a repeat ... I can't see any evidence that the reply I
*thought* I sent to this question actually got sent.

The precise behavior in this case is up to the NavigationHandler instance
being used, but the behavior for the *default* NavigationHandler instance is
specified (see Section 7.4.2 of the JSF Specification).  A null return
indicates that the current view should be rerendered, as Alexandre states
above.

Craig

 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 


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



RE: [.do -> JSF/Shale]

2005-12-22 Thread Garner, Shawn
Can you elaborate on the first two bullets (*)?
I'm not familiar with either.

I'm not inclined to be for the idea of mixing architectures by including
action based struts in JSF/Shale so I'm not big on the third bullet (*).

Shawn

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
McClanahan
Sent: Wednesday, December 21, 2005 5:52 PM
To: Struts Users Mailing List
Subject: Re: [.do -> JSF/Shale]

On 12/21/05, Garner, Shawn <[EMAIL PROTECTED]> wrote:
>
> so I can enter something like
>
> http://www.mycompany.com/mycontext/mymanagedbean.mymethod
>
> in my browser
>
> and it will call the mymethod method in my managed bean named
> mymanagedbean?


Shale won't directly do this for you today, but it would indeed be very easy
to set something like that up -- the existing remoting facility maps context
relative paths to a command (in the Commons Chain sense).  Any of the
following approaches would be fairly simple:

* Map all the interesting cases of "/mymanagedbean.mymethod" to a common
  Command instance (that you would have to write at the moment) that would
  inspect the incoming servlet path + path info and calculate the correct
method
  binding expression.

* Modify the remoting support in Shale to do more generalized pattern
matching
  (versus straight string matching) so that you wouldn't have to literally
configure
  every possible managed bean method you want to call (presumably using
  regular expressions or something).

* Use an action oriented framework (Struts 1.x, WebWork, Spring MVC, etc.)
for this
  portion of your application, while using standard JSF stuff for the rest.

On the first two points, you've piqued my interest enough to think that this
sort of thing should be easier (in Shale) than it currently is.  The use
cases for AJAX style requests (or, more generally, any sort of REST-style
interface towards your application's mode data) are pretty compelling.

The third point represents a personal bias that I will happily claim -- if
you are writing an application that is interactive with a *human* rather
than with a *machine*, you shoud consider URLs to be an irrelevant
implementation detail, rather than a fundamental architectural principle
:-).  Yes, requirements for thngs like bookmarks complicate this a little --
but application designers in an AJAX world are going to be faced with this
kind of problem no matter what frameworks they are using.  What are you
going to do if you end up using an AJAX-style approach that migrates the
entire application into a singe page (which is an architectural style at one
end of the extremes of what is reasonable with AJAX, but it's definitely
going to need consideration)?

Craig

 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 


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



Tiles with Struts

2005-12-22 Thread Buntin, Seth - KATE
I am having an issue getting Tiles to work.  I am totally new to Struts
so bear with me.  The issue is I don't see anything.  I got to home.do
(which is set up as what the user will see first) and it is totally
blank and the source is totally empty.  I think I have everything in my
configuration correct but don't know what to do.  Here are my files:

 

/WEB-INF/tiles-def.xml:

 



http://struts.apache.org/dtds/tiles-config_1_3.dtd";>

 



  















  









 

/layout/layout.jsp:

 

<%@ taglib uri="/tags/struts-bean" prefix="bean" %>

<%@ taglib uri="/tags/struts-html" prefix="html" %>

<%@ taglib uri="/tags/struts-logic" prefix="logic" %>

<%@ taglib uri="http://struts.apache.org/tags-tiles"; prefix="tiles" %>

 

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

http://www.w3.org/1999/xhtml";>

  



 

  

  

  

  

  

  







  <%-- include header --%>

  

  











  <%-- include navigation --%>

  





 





  

<%-- include body --%>

  

  











  









  <%-- include footer --%>

  







  

  

  

  



 

I have these in my /WEB-INF/struts-config.xml file:

 











 

Can someone point me in the right direction?

 

Thanks,

 

Seth Buntin

Web Resources Coordinator

Kentucky Academy of Technology Education

Murray State University

 



Accessing global constants programatically

2005-12-22 Thread Ramesh Mohan Reddy
Hi there,

I am using 1.2.7 version of struts.  Is there any way
using which I can access global constants declared in
validation xml file inside my actions.  The reason
being I need to apply regular expressions explicitly.

Regards,
Ramesh.



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: text field not populating after validate() fails.

2005-12-22 Thread Rahul Akolkar
On 12/22/05, Vikrama Sanjeeva <[EMAIL PROTECTED]> wrote:
> Actually I'm using a javascript which needs to define form name. And in
> struts, when you define form name it is mandatory to define type too.
>
>I just change the "scope" in struts-config from "request" to "session"
> and it is working fine now. But question is, why it is not working with
> scope=request?
>


What is the pre-population mechanism that you mention below? Is it
request-sensitive for the controls that don't get pre-populated?

-Rahul


> Bye,
> Viki.
>
> On 12/22/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
> >
> > You shouldn't need either name or type, Struts will derive both from the
> > configuration. Since you say that's working OK for you, why are you
> > trying to add them?
> >
> > L.
> >
> > Vikrama Sanjeeva wrote:
> > > Hi,
> > >
> > >  I have a form which consists of pull-down menus, radio button, text
> > area
> > > and text fields. The form takes all the required input fields from user,
> > > validate them and if validation fail's, the same form is called with
> > > pre-populated values (as entered 1st time by user). This is true when
> > there
> > > is NO form "name" and "type" is given in form tag. But when I give form
> > > "name" and "type" in form tag, only pull-down menus are populated if
> > > validation fails. Whereas, text field, text area and radio buttons are
> > not
> > > pre-poulated.
> > >
> > >   I'm not sure what is going wrong here?? Below is the related code I'm
> > > using.
> > >
> > > / struts-config.xml***/
> > >
> > > 
> > >
> > >  > > type="com.world.MyActionClass"
> > > name="myForm"
> > > scope="request"
> > > validate="true"
> > > input="myForm.jsp"
> > > >
> > >  > > name="success"
> > > path="/myHome.jsp"/>
> > >  
> > >
> > > / struts-config.xml***/
> > >
> > > /START myForm.jsp***/
> > >
> > > 
> > >
> > >  > > method="post" enctype="multipart/form-data">
> > >
> > > Happy
> > >
> > > 
> > > Select Country
> > >   > property="countryName"
> > > labelProperty="countryName" />
> > > 
> > >
> > > 
> > >
> > >
> > >
> > > 
> > > / END myForm.jsp***/
> > >
> > >
> > > Bye,
> > > Viki.
> > >


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



[OT] Leaving the list

2005-12-22 Thread Gregory Seidman
I can't say I've been very active on this list, but I used to read it
carefully. I find that I am now only giving it a cursory glance. I
originally joined because I had intended to create a wedding guest
management webapp for my own user for planning my wedding. (I wrote a
prototype with JSP and a tag library.)

Well, that was over two years ago and I've been married for more than a
year now, and the webapp never did get off the ground. I still have some
intention of developing it anyway, but I am not going to use Struts. Or
Faces, Springs, Tiles, Shale, Hibernate, iBatis, JSP, or even Java. I gave
up on Java for GUI work some time ago, having done significant development
with AWT (1.0 and 1.1) and Swing and found it frustrating at best (no, I
haven't tried SWT). On the other hand, I was impressed with JSP and
servlets and the frameworks around them. Now, though, I am giving up on it
as a web development platform as well.

I almost unsubscribed when I started using ASP.NET at work, and discovered
the real pleasure of C# and the ASP.NET web control system. (Oh, the misery
of Beans as compared to real reflectable properties!) I was sufficiently
wary of the vendor lockin involved to want to remain abreast of Java web
development, however. I have now gotten into Ruby, and I am so impressed
with it as a language and Ruby on Rails as a web development platform that
I see little reason to bother with Java at all anymore, much less Struts.

I am not writing this as evangelism, a troll, or flamebait. I could have
just quietly unsubscribed. Instead, I wanted to give the list some sense of
why someone would give up on Struts. It isn't just some failing of Struts
itself (though most of my initial difficulties when I was trying to port my
webapp prototype to Struts involved shortcomings in documentation, despite
the various online documentation and having purchased _Struts_Kickstart_),
but of Java as well.

I am unsubscribing now, so I will not see any responses to this sent only
to the Struts list. If you have a response you think would interest me (and
I assure you, flames do not interest me), feel free to CC me or send me
email directly. It's been fun and, often, highly informative. Best wishes
to everyone.

--Greg


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



[OT] JavaWebParts and Struts / Ajax integration

2005-12-22 Thread Pilgrim, Peter
Hi Frank et Al

I am not sure if the latest 1.0 current version of JavaWebPart
actually distributes the right libraries. 

If looks like ``javawebparts_core.jar'' has the wrong base dir.

It contains strangs paths that look incorrect e.g 

`javawebparts\core\org\apache\commons\beanutils'. 

I would have thought it should have been `

`org\apache\commons\beanutils''

In order to build the type suggestion, what are the correct jars
to include. I thought it was ``javawebparts_core.jar'' 
and ``javawebparts_taglibs.jar''. Now I get a strange deployment
error like Error: Could not load asds: weblogic.servlet.jsp.JspException: (line 
6): Error in using tag library uri='/tags/javawebparts_ajaxtags.tld' 
prefix='ajax': cannot find tag class: 
'javawebparts.taglib.ajaxtags.AjaxEventTag'

> -Original Message-
> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 04 December 2005 04:18
> To: Sonali Kulkarni; Struts User
> Subject: Re: Integrating Struts in DWR??
> 
> 
> Sorry about that, I obviously screwed up in QC... the latest build of 
> AjaxChat IS NOT A PROPER WEBAPP.  My build script is obviously not 
> working right as far as the distro task goes, and I didn't notice. 
> Please use the v1.0 alpha, NOT alpha2, which is, AFAIK, correct.  It 
> does have some bugs, but they shouldn't bother you if you are just 
> checking the AJAX stuff out.
> 
> I will correct the latest version tomorrow and cut a new 
> release... it 
> is ready to be called 1.0 GA at this point anyway, so it's 
> just as well. 
>   Alternatively, you could check out from CVS HEAD right now, which 
> should work fine, but you'll have to compile first.
> 
> Frank
> 
> Sonali Kulkarni wrote:
> > Hi Frank,
> >  
> > I downloaded ajaxchat.zip from 
> > link 
> http://sourceforge.net/project/showfiles.php?group_id=49385&pa
> ckage_id=171010&release_id=375018 
> > 
>  ackage_id=171010&release_id=375018>
> >  
> > But I could not find abt jsp files in the zip, Hence cannot run the 
> > application.
> > I am planning to run it in Tomcat. Where can I get the 
> complete source code
> > for the application, that I can run, and study.
> >  
> > Thanks,
> > Sonali
> > 
> >  
> > On 12/3/05, *Frank W. Zammetti* <[EMAIL PROTECTED] 
> > > wrote:
> > 
> > Some of the questions you ask here are really more for 
> you to decide...
> > there aren't any canned answers.  That being said, I'll 
> do my best...
> > 
> > To begin with, I highly suggest checking out the 
> numerous articles on
> > AJAX out there to get a firm grasp on what it really 
> is, and if I may be
> > so bold, start with my own:
> > 
> > http://www.omnytex.com/articles
> > 
> > This will show one way AJAX can be integrated with 
> Struts.  You can also
> > check out my AjaxChat example app on the Struts Apps 
> SourceForge site:
> > 
> > http://struts.sourceforge.net
> > 
> > The short answer is that AJAX, generically, is nothing 
> but an HTTP
> > request.  As far as whatever is on the server is 
> concerned, be it a
> > Struts apps or something else, it doesn't look any 
> different than any
> > other request.  Well, I suppose more accurately, it 
> doesn't *have* to
> > look any different.  If you simply pass simple 
> parameters from the
> > client and forego XML, then to Struts there's no difference.
> > 
> > If you want to use XML and Struts, then you will at 
> this point have to
> > do your own parsing.  With Struts 1.3, it would be 
> trivial to add a
> > Command to the processing chain to parse an incoming 
> XML message and
> > translate it to request parameters... come to think of 
> it, that exists
> > already:
> > 
> > http://sourceforge.net/projects/strutsws
> > 
> > Although that's for Web Services, the underlying theory 
> is identical.
> > There is a 1.3 version, courtesy of Marco Mistroni, but 
> you can see my
> > original version with the customized RP.  The same 
> thing would work
> > nicely for AJAX, although one can envision other ways 
> of doing it too.
> > 
> > You could just as well have this function in your 
> servlet... it's
> > just a
> > matter of getting the body content of the HTTP request, 
> which would be
> > XML, parsing it and doing what you'd always do.  If 
> this interests you,
> > have a look at the code in CVS HEAD here:
> > 
> > http://javawebparts.sourceforge.net
> > 
> > I'll probably cut a release this weekend, but the code 
> in CVS for the
> > AjaxTags component in the sample app does exactly 
> that... an AJAX
> > request is made with XML in the HTTP body, and a 
> servlet in this case
> > gets it (via the handy RequestHelpers.getBodyContent() 
> method) and then
> > uses Digester to parse it.
> > 
> > Everything I've talked about here is "naked" AJAX, 
> i.e., without t

NewB: Struts FormFile and Session scope FormBean

2005-12-22 Thread Kedar Panse
Hello gurus,

I want to use a wizard type of flow where in one screen there is File
Upload.  As  this is wizard, i was using session scoped formbean with one
property formfile.  But seems like formfile is not serializable.  What is
proper way of handling this?


Thanks!

Kedar


Struts implementation of Synchronizer Token pattern

2005-12-22 Thread Shiby Maria John

Hi,

I was trying to check out this implementation of Synchronizer Token
pattern  in Struts.
But I am getting an error while trying to run the example code given
in the Java tip for the same.

java.lang.NullPointerException

org.apache.struts.util.RequestUtils.pageURL(RequestUtils.java:1441)

org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:456)

org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:495)

org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:353)

org.apache.jsp.index_jsp._jspx_meth_html_link_0(org.apache.jsp.index_jsp:95)


org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:67)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)


org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)


org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


Please some one please tell me when this error occur




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



Re: Problem in

2005-12-22 Thread Vikrama Sanjeeva
Hi,

  The "myForm.jsp" is called when a user clicks a link in another JSP.
Here is the flow:

1. User click the link in "home.jsp" .

My Form

2. Action, "SetUpMyForm" is called and it actually set's up some variables,
pull-down menues and then it "return (mapping.findForward("
continueCallingMyForm.jsp"));"

  I think this is what you said here:

"If you're calling an action which forwards to the JSP page, the browser
doesn't know the physical location of the JSP and will resolve relative URLs
with respect to the actionpath, not the JSP path."

I've read the html:base tag, but it's not clear to me how to use this tag in
calling  Can you give any related example?

Bye,
Viki.

On 12/22/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
>
> Vikrama Sanjeeva wrote:
> > Hi,
> >
> >   I've "img.gif" and and "myForm.jsp" in same folder. But when I call
> the "
> > img.gif" with following path, it does not display in myForm.jsp. here it
> is:
> >
> > 
> >  > style="cursor: pointer; border: 1px solid red;" title="Date selector"
> >   onmouseover="this.style.background='red';" onmouseout="
> > this.style.background=''" />
> >
> > But when I call with src="../img.gif", it works. Here it is:
> >
> > 
> >  > style="cursor: pointer; border: 1px solid red;" title="Date selector"
> >   onmouseover="this.style.background='red';" onmouseout="
> > this.style.background=''" />
> >
> > Why it so? Some url related problem?
>
> How do you reference your JSP? If you're calling an action which
> forwards to the JSP page, the browser doesn't know the physical location
> of the JSP and will resolve relative URLs with respect to the action
> path, not the JSP path.
>
> You might want to look at the html:base tag [1] to help with this; it
> allows you to tell the browser what base path to use for resolving
> relative URLs in the page.
>
> L.
>
> [1]
> http://struts.apache.org//struts-doc-1.2.8/userGuide/struts-html.html#base
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


instance validation struts shale?

2005-12-22 Thread JEEVANATHAM P. /BPCRP/INFOTECH/VASHI
 

Can we do instance validation for particular field in SHALE? Like onblur()
event.

Please let me know

Regards,

JEEVANANTHAM PARAMASAMY, 
Software Engineer, 
3i - INFOTECH Limited, 
Alwarpet, 
Chennai - 600018. 

Phone: 044 24678000 extn:418
Cell no: 09840933967

 

-- 
Greetings!

 


ICICI Infotech is now 3i Infotech.


The e-mail addresses of the company's employees have been changed to @3i-infotech.com. You are requested to take note of this new e-mail ID and 
make use of the same in future

 
"This e-mail message may contain confidential, proprietary or legally 
privileged information. It should not be used by anyone who is not the original 
intended recipient. If you have erroneously received this message, please 
delete it immediately and notify the sender. The recipient acknowledges that 3i 
Infotech or its subsidiaries and associated companies, (collectively "3i 
Infotech"), are unable to exercise control or ensure or guarantee the integrity 
of/over the contents of the information contained in e-mail transmissions and 
further acknowledges that any views expressed in this message are those of the 
individual sender and no binding nature of the message shall be implied or 
assumed unless the sender does so expressly with due authority of 3i Infotech. 
Before opening any attachments please check them for viruses and defects."



Re: text field not populating after validate() fails.

2005-12-22 Thread Vikrama Sanjeeva
Actually I'm using a javascript which needs to define form name. And in
struts, when you define form name it is mandatory to define type too.

I just change the "scope" in struts-config from "request" to "session"
and it is working fine now. But question is, why it is not working with
scope=request?

Bye,
Viki.

On 12/22/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
>
> You shouldn't need either name or type, Struts will derive both from the
> configuration. Since you say that's working OK for you, why are you
> trying to add them?
>
> L.
>
> Vikrama Sanjeeva wrote:
> > Hi,
> >
> >  I have a form which consists of pull-down menus, radio button, text
> area
> > and text fields. The form takes all the required input fields from user,
> > validate them and if validation fail's, the same form is called with
> > pre-populated values (as entered 1st time by user). This is true when
> there
> > is NO form "name" and "type" is given in form tag. But when I give form
> > "name" and "type" in form tag, only pull-down menus are populated if
> > validation fails. Whereas, text field, text area and radio buttons are
> not
> > pre-poulated.
> >
> >   I'm not sure what is going wrong here?? Below is the related code I'm
> > using.
> >
> > / struts-config.xml***/
> >
> > 
> >
> >  > type="com.world.MyActionClass"
> > name="myForm"
> > scope="request"
> > validate="true"
> > input="myForm.jsp"
> > >
> >  > name="success"
> > path="/myHome.jsp"/>
> >  
> >
> > / struts-config.xml***/
> >
> > /START myForm.jsp***/
> >
> > 
> >
> >  > method="post" enctype="multipart/form-data">
> >
> > Happy
> >
> > 
> > Select Country
> >   property="countryName"
> > labelProperty="countryName" />
> > 
> >
> > 
> >
> >
> >
> > 
> > / END myForm.jsp***/
> >
> >
> > Bye,
> > Viki.
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>