Thank you, Struts!

2005-01-10 Thread Vamsee Kanakala
Hey folks,
  Well, I have been working with Struts for the past 1 month, and 
though the initial setup was a bit complex (the first time) and 
firguring out the action mappings was tough, I am slowly discovering how 
cool Struts is. Maybe that's why it's so popular. A heartfelt thanks to 
Craig and everybody  who's working on Sturts, you guys make my life 
easier and fun :) The documentation is truly, truly excellent. When I 
get some time, I will surely contribute. You guys rock!

Thanks for everything,
-Vamsee Kanakala.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to detect Cancel button i pressed ?

2005-01-10 Thread Manisha Sathe
Hi Nicolas,
 
Thanks for the response,
 
1)I tried this, but giving me error. Pls would u mind giving some code example ?
 
2)About exception - do u mean to say my own method common to all ? This also if 
u can explain with code example would be of great help. 
 
Thanks once again,
 
regards
Manisha


Nicolas De Loof <[EMAIL PROTECTED]> wrote:

You can check for cancel in actions using
isCanceled(request)

Struts cancel tag uses a magic value that this method will detect 
(formbean validation is also skipped)

About exception, I used to set a global exception handler that logs 
exception stack and forwards to a generic error page.

Nico.

Manisha Sathe a écrit :

>I had posted it before - might hv missed the response. I want to check whether 
>Cancel button is pressed, if yes then want to redirect it to another page
> 
>Also how to handle th Exceptions. I am catching many exceptions inside my 
>Action Handlers. 
>what shall i do with them ? Currently just printing the error messages on 
>System.out, but what is the good practice to handle exceptions ? Close all 
>Resultsets/ connections and redirect to error page ? write some standard 
>routine ? 
> 
>In struts-config i have given mapping to "errors" as global forward, but what 
>if exceptions occur inside my common classes ?
> 
>regards
>Manisha
>
>__
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
> 
>

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient, you are not authorized 
to read, print, retain, copy, disseminate, distribute, or use this message or 
any part thereof. If you receive this message in error, please notify the 
sender immediately and delete all copies of this message.


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




-
Do you Yahoo!?
 Yahoo! Mail - Find what you need with new enhanced search. Learn more.

Re: Determining the "original" request URL from within a tile

2005-01-10 Thread Kishore Senji
1) You can have a Controller (org.apache.struts.tiles.Controller) and
in the "perform" you can get the "original" request url and save it as
a "request" attribute; and the tile can pull that request attribute.
You can specify the controller class for your tiles definition.
Just Before the jsp is rendered the controller is called and so the
tile has the original url available in the request.

2) You can do the same thing in the BaseAction as well. (You can also
have a custom ActionMapping and set the url in the request for only a
set of actions for which a property in the custom ActionMapping is
enabled).

Regarding the request parameters not having the original values; I
don't see any reason why unless you are redirecting.



On Mon, 10 Jan 2005 17:20:21 -0800, Rick Mann <[EMAIL PROTECTED]> wrote:
> Hi. We have a tiles-based webapp. Buried down deep in a tile that gets
> reused in a few different pages is the need to render a link back to
> the current request, with a parameter added. This acts as a switch to
> re-render the page a bit differently.
> 
> Unfortunately, request.getRequestURL() reflects the included file (in
> this case, the layout JSP used) and NOT the request in the address bar
> of the browser.
> 
> Also available to the tile are SOME of the request parameters (all of
> the names are there, but they have null values, and not the values
> specified in the original request).
> 
> What's the best way to get at this "original" information?
> 
> TIA,
> 
> --
> Rick
> 
> -
> 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: Edit Form - populate values from database

2005-01-10 Thread Wendy Smoak
From: "Manisha Sathe" <[EMAIL PROTECTED]>
For Edit what i want is to get the values from database and display it on 
form as default.
What i am doing is ->
1)First calling one action handler getting the values from database and 
putting inside one data bean. Putting that bean inside request scope then 
forwarding to Edit Form
2)Inside Edit form I want to get these values as by default for text box
Rather than putting your bean in request scope, populate the form bean 
before forwarding to EditForm.  The easiest way is with 
BeanUtils.copyProperties() [assuming the property names match].  You can see 
an example of this in struts-example.war.

Using the 'value' attribute (or nested  tag) means that the form 
will always be rendered with the values from the database-- this could be a 
problem if you need to validate the form and re-display the incorrect input.

--
Wendy Smoak 


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


Re: Validate with DynaActionForm

2005-01-10 Thread Janarthan Sathiamurthy
Hi Uma,
 
Refer to struts-validation.war that comes with the struts distribution

Best Regards,
Janarthan S

Uma <[EMAIL PROTECTED]> wrote:
Hi,
How do I validate if a field is entered or not using the DynaActionForm?

My HTML form has and buttons. I want to check if
the user has entered some text in the text field and that he has selected
the radio button.

If he has not selected, then show him a error message in the jsp. How to do
this? Do I need to configure any xml file for this? An example would be
great.

Thanks
Uma



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



-
Do you Yahoo!?
 Read only the mail you want - Yahoo! Mail SpamGuard.

Re: Edit Form - populate values from database

2005-01-10 Thread Janarthan Sathiamurthy
Hi,
 
If you have a bean by name myBean in request scope, a property of the bean by 
name myProperty can be displayed in the jsp page by -



 
Best Regards,
Janarthan S

Manisha Sathe <[EMAIL PROTECTED]> wrote:
I have Add/Edit/Delete for one database table.

For Edit what i want is to get the values from database and display it on form 
as default.

What i am doing is -> 
1)First calling one action handler getting the values from database and putting 
inside one data bean. Putting that bean inside request scope then forwarding to 
Edit Form
2)Inside Edit form I want to get these values as by default for text box

I tried something many different combination using cout / html:bean... etc etc 
but i am not getting the values.

Is there any good solution for getting default values inside Edit Form?

regards
Manisha


-
Do you Yahoo!?
Meet the all-new My Yahoo! – Try it today! 



-
Do you Yahoo!?
 Take Yahoo! Mail with you! Get it on your mobile phone.

Edit Form - populate values from database

2005-01-10 Thread Manisha Sathe
I have Add/Edit/Delete for one database table.
 
For Edit what i want is to get the values from database and display it on form 
as default.
 
What i am doing is -> 
1)First calling one action handler getting the values from database and putting 
inside one data bean. Putting that bean inside request scope then forwarding to 
Edit Form
2)Inside Edit form I want to get these values as by default for text box
 
I tried something  many different 
combination using cout / html:bean... etc etc but i am not getting the values.
 
Is there any good solution for getting default values inside Edit Form?
 
regards
Manisha


-
Do you Yahoo!?
 Meet the all-new My Yahoo! – Try it today! 

Re: How to view the actual HTTP generated by a struts action.

2005-01-10 Thread Richard Yee
There is also a feature in JDeveloper 10g that lets you monitor TCP/IP 
traffic using a proxy. If you use the Apache SOAP library, there is another 
utility available inside it called TcpTunnelGUI in the 
org.apache.soap.util.net package.

-Richard
At 02:47 PM 1/10/2005, you wrote:
Jim Barrows wrote:
-Original Message-
From: kjc [mailto:[EMAIL PROTECTED]
Is there a way to log the HTTP post string that is sent by the browser when
clicking on

Why won't right click view source not work?
I think the OP meant what the HTTP Post looks like, not what the generated 
HTML looks like.

I use a feature that comes with MyEclipse (its not unique to MyEclipse, 
but its the one I'm familiar with). I think another popular one is 
ProxyWorkbench http://www.tcpiq.com/tcpIQ/ProxyWorkbench/.

Basically, they act like a proxy. Suppose your Tomcat listens on port 
8080.  You setup your proxy to listen to another port, like say 8081. It 
redirects to port 8080. You then setup your app to post to port 8081. The 
proxy logs the conversation.

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


Struts FormFile and

2005-01-10 Thread Sullivan, Sean C - MWT

I read the documentation for the  tag

  http://struts.apache.org/userGuide/struts-html.html#file

According to the Struts documentation:

"WARNING: In order to correctly recognize uploaded files, the 
 ActionForm bean associated with this form must include a 
 statement setting the corresponding org.apache.struts.upload.FormFile 
 property to null in the reset() method."

I examined the Struts Upload example application and I noticed that 
UploadForm.java has a reset method.  However, UploadForm's reset 
method _does not_ set the FormFile property to null:

http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/examples/org/apache
/struts/webapp/upload/UploadForm.java?rev=HEAD&view=markup

I have an "upload form" in my application and I want to know if I need
to implement set the FormFile variable equal to null in my form's reset
method.

Thanks in advance.

-Sean


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



Determining the "original" request URL from within a tile

2005-01-10 Thread Rick Mann
Hi. We have a tiles-based webapp. Buried down deep in a tile that gets 
reused in a few different pages is the need to render a link back to 
the current request, with a parameter added. This acts as a switch to 
re-render the page a bit differently.

Unfortunately, request.getRequestURL() reflects the included file (in 
this case, the layout JSP used) and NOT the request in the address bar 
of the browser.

Also available to the tile are SOME of the request parameters (all of 
the names are there, but they have null values, and not the values 
specified in the original request).

What's the best way to get at this "original" information?
TIA,
--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: struts and testing

2005-01-10 Thread Neil
Try also JMeter for testing 5 or 10 users


On Mon, 10 Jan 2005 11:59:38 -0800 (PST), Martin Wegner
<[EMAIL PROTECTED]> wrote:
> 
> If you are looking to test your Actions and Forms outside of the container
> then StrutsTetstCase is an excellent choice.  For integration testing you
> could use something HttpUnit.
> 
> --Marty
> 
> --- Ashish Kulkarni <[EMAIL PROTECTED]> wrote:
> 
> > Hi
> > what is the best way of testing struts action classes,
> > i need to do functional testing as well as
> > unit/integration testing.
> > I also need to create a scenario as if 5 or 10 users
> > are logged on to the web site
> >
> > Ashish
> >
> > =
> > A$HI$H
> >
> >
> >
> > __
> > Do you Yahoo!?
> > Yahoo! Mail - now with 250MB free storage. Learn more.
> > http://info.mail.yahoo.com/mail_250
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



Re:

2005-01-10 Thread Brandon Mercer
Ashish Kulkarni wrote:
Hi
How do i display a drop down box from hashtable data
here is my form definiation



in my html i define

method="post" style="margin:0px;" >
// logic to display html:select with html:option tag

 

Yes, totally possible.  Here are some snippets.  :-)
This is what you'd have in your JSP
   
   
   

And this is how I build the list in my classes:
First my Action:
   ArrayList trusts = AssetData.getTrusts(
   getDataSource(request,"trustmaster"), errors);
   if ((assets == null) || (codes == null) || (trusts == null)) {
   errors.add(
   ActionErrors.GLOBAL_ERROR,
   new ActionError("error.resultset.null"));
   }  else {
   // Put our results set in a bean in the session
   session.setAttribute("assets", assets);
   session.setAttribute("codes", codes);
   session.setAttribute("trusts", trusts);
   }
Now my Data:
  public static ArrayList getTrusts(
   final DataSource dataSource,
   final ActionErrors errors)
   throws Exception {
   Connection conn = null;
   Statement stmt = null;
   ResultSet rs = null;
   ArrayList trusts = new ArrayList();
   try {
   conn = dataSource.getConnection();
   stmt = conn.createStatement();
   rs = stmt.executeQuery("select * from trusts;");
  
   // While there are results from our query
   // create the codes bean with the proper
   // values from the database.
   while (rs.next()) {
   trusts.add(
   new LabelValueBean(
   rs.getString("trust_name"),
   rs.getString("code")));
   }
  
   } finally {
   if (rs != null) {
   rs.close();
   }
   if (stmt != null) {
   stmt.close();
   }
   if (conn != null) {
   conn.close();
   }

   }
   return trusts;
   }
Hopefully this helps.
Brandon
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Struts 1.3 Snapshots ?

2005-01-10 Thread Joe Germuska
At 4:34 PM -0600 1/10/05, Durham David R Jr Contr 805 CSPTS/SCE wrote:
 > If you're really daring, check out
 http://wiki.apache.org/struts/StrutsChain
 http://www.apache.org/~germuska/struts-1.3.0-dev/
This is a bit off topic, but the switch to SVN has made it easier for
users like me (behind a proxy) to checkout the source.
(cool!)
How would I checkout the StrutsChain code from svn?  And is your 1.3-dev
also available via SVN?
My page in the Wiki mistakenly used CVS where it should have used SVN.
General information about getting Struts from SVN is at 
http://struts.apache.org/acquiring.html#SourceCode

Thus, for features described in the section now entitled "What's in 
SVN", you can just check it out following the above instructions. 
These features will also be in the nightly builds 
(http://cvs.apache.org/builds/jakarta-struts/nightly/).

The other stuff is not in SVN yet, because I don't want to commit it 
until I've put it through at least some testing, and really, there 
are whole ideas in there for which I'd appreciate at least a few 
external confirmations.  But the links in my Apache webdir include 
source and binary forms, so it's about as good as getting it from 
SVN, until you want incremental updates.

Joe
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

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


Re: How to view the actual HTTP generated by a struts action.

2005-01-10 Thread Bryce Fischer
Jim Barrows wrote:
-Original Message-
From: kjc [mailto:[EMAIL PROTECTED]
Is there a way to log the HTTP post string that is sent by 
the browser when
clicking on


Why won't right click view source not work?
I think the OP meant what the HTTP Post looks like, not what the 
generated HTML looks like.

I use a feature that comes with MyEclipse (its not unique to MyEclipse, 
but its the one I'm familiar with). I think another popular one is 
ProxyWorkbench http://www.tcpiq.com/tcpIQ/ProxyWorkbench/.

Basically, they act like a proxy. Suppose your Tomcat listens on port 
8080.  You setup your proxy to listen to another port, like say 8081. It 
redirects to port 8080. You then setup your app to post to port 8081. 
The proxy logs the conversation.

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


Struts-Nested-Tags- Recursing

2005-01-10 Thread Jens Kulenkamp
Hi there,
i am desperate with the nested-Tags.
My Problem: I have a bean A with holding a collection of  bean B. Now i 
would like to get access,  through the collection, to get each bean B.
What do i get? I get each Bean B - instance in the main.jsp. Thats OK! 
But i get only the first bean b - instance in the included tree.jsp and 
i have now idea where i make a mistake. (I read the monky-tutorial and 
googled a lot). Maby u have an idea or can give me a tip.

See the small example:
The main JSP-Page looks like this:
[...]
 
class="Catalog"
scope="session"/>
  
   
   
 come from main: 
 
   
   
[]

The tree.jsp looks like this:
[...]

come from tree: 

[...]
The generated output looks like this:
come from main: bs[0]
come from tree:   bs[0]
come from main: bs[1]
come from tree:   bs[0]
come from main: bs[2]
come from tree:   bs[0]
come from main: bs[3]
come from tree:   bs[0]
I am using on a linux OS:
Tomcat: 4.1.27
Struts: 1.2.4
Greets
Jens

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


RE: How to view the actual HTTP generated by a struts action.

2005-01-10 Thread Jim Barrows

> -Original Message-
> From: kjc [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 10, 2005 3:25 PM
> To: Struts Users Mailing List
> Subject: How to view the actual HTTP generated by a struts action.
> 
> 
> Is there a way to log the HTTP post string that is sent by 
> the browser when
> clicking on
> 
> 

Why won't right click view source not work?


> 
> buttonOps is an instance of ImageButton pattern. I'm sure 
> readers of the 
> group are familiar with it.
> 
> Thanks in advance.
> 
> -
> 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]



user@struts.apache.org

2005-01-10 Thread Ashish Kulkarni
Hi
How do i display a drop down box from hashtable data
here is my form definiation




in my html i define

// logic to display html:select with html:option tag


Ashish



__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


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



RE: Struts 1.3 Snapshots ?

2005-01-10 Thread Durham David R Jr Contr 805 CSPTS/SCE
> If you're really daring, check out
> http://wiki.apache.org/struts/StrutsChain
> http://www.apache.org/~germuska/struts-1.3.0-dev/

This is a bit off topic, but the switch to SVN has made it easier for
users like me (behind a proxy) to checkout the source.

How would I checkout the StrutsChain code from svn?  And is your 1.3-dev
also available via SVN?


Thanks,

Dave


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



How to view the actual HTTP generated by a struts action.

2005-01-10 Thread kjc
Is there a way to log the HTTP post string that is sent by the browser when
clicking on

buttonOps is an instance of ImageButton pattern. I'm sure readers of the 
group are familiar with it.

Thanks in advance.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: General Action Question

2005-01-10 Thread Jim Barrows


> -Original Message-
> From: Brandon Mercer [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 10, 2005 11:06 AM
> To: user@struts.apache.org
> Subject: General Action Question
> 
> 
> Hello Group,
> I'm reading an off the shelf book about DynaActionForms and 
> I've got a 
> question about best practice stuff.  In this book it says 
> that you need 
> to create an Action to work with the info you got much the 
> same as the 
> ActionForm you typically use.  In my previous work I've 
> always just sent 
> the request into my 'data' class to pull info from and send 
> it into the 
> database.  Let me send some code snippets:
>String action = request.getParameter("action");
>  AssetData.addAsset(request, session, 
> getDataSource(request,"trustmaster"));
> 
> So if I'm sending the request and working with that, is there 
> a need to 
> parse the DynaActionForm using:
> 
>DynaActionForm lookupForm = (DynaActionForm) form;
>String symbol = (String)lookupForm.get("symbol");

Yes, in general your data class has absolutely no need to know about a request, 
so you would normally copy the ActionForm into a Data Transfer Object, and pass 
that to your data layer.
So, you would do this:
DynaActionFrom lookupForm = (DynaActionForm)form;
BeanUtils.copyProperties( lookupDto, lookupForm);
AssetData.addAsset( lookupDto);

This allows you to cleanly seperate the UI from your backend code.

> 
> Specifically, I want to know if I'm validating the input in 
> both cases, 

Depends... with the default struts valiation is being done before you get to 
the action class.


> and inserting the entire request into the database (after I parse out 
> each value) if I need to use the second example to work with 
> DynaActionForms.  I'm using multi-page forms, but I insert the values 
> into the JSP page for each new page in the wizard.  Thanks 
> for any help, 
> as I'm "fresh" with struts. Brandon Mercer
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



Re: struts and testing

2005-01-10 Thread Martin Wegner

If you are looking to test your Actions and Forms outside of the container
then StrutsTetstCase is an excellent choice.  For integration testing you
could use something HttpUnit.


--Marty

--- Ashish Kulkarni <[EMAIL PROTECTED]> wrote:

> Hi
> what is the best way of testing struts action classes,
> i need to do functional testing as well as
> unit/integration testing.
> I also need to create a scenario as if 5 or 10 users
> are logged on to the web site
> 
> Ashish
> 
> =
> A$HI$H
> 
> 
>   
> __ 
> Do you Yahoo!? 
> Yahoo! Mail - now with 250MB free storage. Learn more.
> http://info.mail.yahoo.com/mail_250
> 
> -
> 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]



struts and testing

2005-01-10 Thread Ashish Kulkarni
Hi
what is the best way of testing struts action classes,
i need to do functional testing as well as
unit/integration testing.
I also need to create a scenario as if 5 or 10 users
are logged on to the web site

Ashish

=
A$HI$H



__ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

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



General Action Question

2005-01-10 Thread Brandon Mercer
Hello Group,
I'm reading an off the shelf book about DynaActionForms and I've got a 
question about best practice stuff.  In this book it says that you need 
to create an Action to work with the info you got much the same as the 
ActionForm you typically use.  In my previous work I've always just sent 
the request into my 'data' class to pull info from and send it into the 
database.  Let me send some code snippets:
  String action = request.getParameter("action");
AssetData.addAsset(request, session, 
getDataSource(request,"trustmaster"));

So if I'm sending the request and working with that, is there a need to 
parse the DynaActionForm using:

  DynaActionForm lookupForm = (DynaActionForm) form;
  String symbol = (String)lookupForm.get("symbol");
Specifically, I want to know if I'm validating the input in both cases, 
and inserting the entire request into the database (after I parse out 
each value) if I need to use the second example to work with 
DynaActionForms.  I'm using multi-page forms, but I insert the values 
into the JSP page for each new page in the wizard.  Thanks for any help, 
as I'm "fresh" with struts. Brandon Mercer

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


Re: Struts 1.3 Snapshots ?

2005-01-10 Thread Joe Germuska
At 1:54 PM + 1/10/05, Pilgrim, Peter wrote:
Is there any site where one can download Struts 1.3 Daily snapshots?
If you're really daring, check out
http://wiki.apache.org/struts/StrutsChain
http://www.apache.org/~germuska/struts-1.3.0-dev/
This is where I'm hoping to get people looking at some of the bigger 
changes related to the chain-based RequestProcessor before 
committing.  Note that I have not even run a Struts app on the code 
in these builds.  It compiles, but given how much is in config files, 
that's no guarantee!

Joe
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

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


Re: Struts 1.3 Snapshots ?

2005-01-10 Thread Craig McClanahan
On Mon, 10 Jan 2005 13:54:42 -, Pilgrim, Peter
<[EMAIL PROTECTED]> wrote:
> Is there any site where one can download Struts 1.3 Daily snapshots?

The usual nightly builds:

  http://cvs.apache.org/builds/jakarta-struts/nightly/

are compiled from the trunk of the repository, so they constitute
snapshots of the ongoing 1.3 development.

Craig

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



Re: setting image dom properites with

2005-01-10 Thread Jeff Beal
For documentation, try http://struts.apache.org/userGuide/struts-html.html.
styleId is the attribute that you want to be able to access your image 
from JavaScript, I believe.

-- Jeff
John McCosker wrote:
Hi,
this what I am trying to achieve,

I want to name the images so I can get at specifically in javascript with
looping through all
document.images, however when I do this I get this error,
javax.servlet.ServletException: Cannot find bean spacerBody1 in any scope
I checked the struts-html-el.tld library and there is no reference for name
attribute in the 
org.apache.strutsel.taglib.html.ELImageTag bean.

Is there a way to do this?
Also there does not seem to be any documentation for the struts tag
librarys,
is there a docs page for them anywhere for struts 1.1?

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


RE: setting image dom properites with

2005-01-10 Thread John McCosker
I seem to be getting these mixed up,
im using the org.apache.strutsel.taglib.html.ELImgTag bean, 

and the property name does exist, I wonder if I should be declaring these in
my properties
file.

-Original Message-
From: John McCosker [mailto:[EMAIL PROTECTED]
Sent: 10 January 2005 14:20
To: 'Struts Users Mailing List'
Subject: setting image dom properites with 


Hi,
this what I am trying to achieve,


I want to name the images so I can get at specifically in javascript with
looping through all
document.images, however when I do this I get this error,

javax.servlet.ServletException: Cannot find bean spacerBody1 in any scope

I checked the struts-html-el.tld library and there is no reference for name
attribute in the 
org.apache.strutsel.taglib.html.ELImageTag bean.

Is there a way to do this?
Also there does not seem to be any documentation for the struts tag
librarys,
is there a docs page for them anywhere for struts 1.1?


setting image dom properites with

2005-01-10 Thread John McCosker
Hi,
this what I am trying to achieve,


I want to name the images so I can get at specifically in javascript with
looping through all
document.images, however when I do this I get this error,

javax.servlet.ServletException: Cannot find bean spacerBody1 in any scope

I checked the struts-html-el.tld library and there is no reference for name
attribute in the 
org.apache.strutsel.taglib.html.ELImageTag bean.

Is there a way to do this?
Also there does not seem to be any documentation for the struts tag
librarys,
is there a docs page for them anywhere for struts 1.1?


Re: Help with DynaActionForm

2005-01-10 Thread Pedro Salgado
On 10/1/05 2:33 pm, "Uma" <[EMAIL PROTECTED]> wrote:

> But since I am not writing any validate() method, how do my validate() get
> fired? And if I have to show error messages to the user, how do I handle
> this?

don't use DynaActionForm. use DynaValidatorForm. if you specify the rules on
validation.xml it will get fired automatically. it will automatically
generate the javascript and even if the user has disabled javascript, before
the action is executed, the RequestProcessor runs the validation on the
server side and if something goes it forwards to the action input.


try a simple form at first... with only one rule and see what happens.

check the files on attachment ;).

Pedro Salgado

> 
> Uma
> 
> -Original Message-
> From: Pedro Salgado [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 10, 2005 5:29 AM
> To: Struts Users Mailing List
> Subject: Re: Help with DynaActionForm
> 
> 
> check commons-validator.
> 
> declare the commons-validator plugin on your struts-config.xml.
> use the validator-rules to specify validation rules (basic copy paste).
> use the validation.xml to specify the rules that apply to which fields on
> a form.
> 
> on your jsp use .
> 
> 
> Pedro Salgado
> 
> On 10/1/05 2:16 pm, "Kalluru Uma. Maheswar"
> <[EMAIL PROTECTED]> wrote:
> 
>> Hi,
>> 
>> I posted the same question last week but could not get any reply. Can
>> someone help me please?
>> 
>> 
>> 
>> How do I validate if a field is entered or not using the DynaActionForm?
>> 
>> 
>> 
>> My HTML form has  and  buttons. I want to check
>> if the user has entered some text in the text field and that he has
>> selected the radio button.
>> 
>> 
>> 
>> If he has not selected, then show him a error message in the jsp. How to
>> do this? Do I need to configure any xml file for this? An example would
>> be great.
>> 
>> 
>> 
>> Thanks
>> 
>> Uma
>> 
>> 
>> 
>> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Struts 1.3 Snapshots ?

2005-01-10 Thread Pilgrim, Peter
Is there any site where one can download Struts 1.3 Daily snapshots?

mtia

--
Peter Pilgrim
Operations/IT - Credit Suisse First Boston, 
10 South Colonnade, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497


==
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==


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



RE: Help with DynaActionForm

2005-01-10 Thread Uma
But since I am not writing any validate() method, how do my validate() get
fired? And if I have to show error messages to the user, how do I handle
this?

Sorry if my questions are stupid, I am new to struts.

Uma

-Original Message-
From: Pedro Salgado [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 10, 2005 5:29 AM
To: Struts Users Mailing List
Subject: Re: Help with DynaActionForm


  check commons-validator.

  declare the commons-validator plugin on your struts-config.xml.
  use the validator-rules to specify validation rules (basic copy paste).
  use the validation.xml to specify the rules that apply to which fields on
a form.

  on your jsp use .


Pedro Salgado

On 10/1/05 2:16 pm, "Kalluru Uma. Maheswar"
<[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I posted the same question last week but could not get any reply. Can
> someone help me please?
> 
> 
> 
> How do I validate if a field is entered or not using the DynaActionForm?
> 
> 
> 
> My HTML form has  and  buttons. I want to check
> if the user has entered some text in the text field and that he has
> selected the radio button.
> 
> 
> 
> If he has not selected, then show him a error message in the jsp. How to
> do this? Do I need to configure any xml file for this? An example would
> be great.
> 
> 
> 
> Thanks
> 
> Uma
> 
> 
> 
> 


-
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: Help with DynaActionForm

2005-01-10 Thread Pedro Salgado

  check commons-validator.

  declare the commons-validator plugin on your struts-config.xml.
  use the validator-rules to specify validation rules (basic copy paste).
  use the validation.xml to specify the rules that apply to which fields on
a form.

  on your jsp use .


Pedro Salgado

On 10/1/05 2:16 pm, "Kalluru Uma. Maheswar"
<[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I posted the same question last week but could not get any reply. Can
> someone help me please?
> 
> 
> 
> How do I validate if a field is entered or not using the DynaActionForm?
> 
> 
> 
> My HTML form has  and  buttons. I want to check
> if the user has entered some text in the text field and that he has
> selected the radio button.
> 
> 
> 
> If he has not selected, then show him a error message in the jsp. How to
> do this? Do I need to configure any xml file for this? An example would
> be great.
> 
> 
> 
> Thanks
> 
> Uma
> 
> 
> 
> 


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



Re: convertStringToDate

2005-01-10 Thread Larry Meadors
Look at the DateFormat and SimpleDateFormat classes.

http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormat.html

http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html

Larry

On Mon, 10 Jan 2005 11:12:25 -0200, Flávio Maldonado
<[EMAIL PROTECTED]> wrote:
> Hi people...
> 
> I'm trying to convert String to java.sql.Date and I'm having some problems.
> Maybe anybody has a method that do it and can send to us.
> 
> Thanks...
> 
> Flávio Vilasboas Maldonado
> Diretor de Desenvolvimento
> SedNet Soluções
> +55(35)3471-9381
> 
> -
> 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: accessing bean properties in a jsp

2005-01-10 Thread John McCosker
Thanks a million for your response,

yea both beans are the same one for client end and the other for server end
when set,
I was wondering if I could get away with the one (the session bean) and use
it also client
end but this flakes on me,



error,

org.apache.jasper.JasperException: An error occurred while evaluating custom
action attribute "value" with value
"${pageContext.session.cookieSession.customerName}": Unable to find a value
for "cookieSession" in object of class
"org.apache.catalina.session.StandardSessionFacade" using operator "."
(null)

however the original problem I got resolved,

in my bean my methods where declared private and not public so now the
original method works fine.



-Original Message-
From: Hollaway, Shedrick L CIV TRIREFFAC
[mailto:[EMAIL PROTECTED]
Sent: 10 January 2005 12:29
To: Struts Users Mailing List
Subject: RE: accessing bean properties in a jsp


consider setting your CustomerSessionBean values differently.

CustomerSessionBean sb = new

CustomerSessionBean(scv.getCustomerid(),scv.getCustomerName(),
scv.getCfid(),scv.getCftoken());
session.setAttribute("cookieSession", sb);
request.setAttribute("clientSession",sb);


CustomerSessionBean sb = new CustomerSessionBean();
sb.setCustomerid(scv.getCustomerid());
sb.setCustomerName(scv.getCustomerName());
sb.setCfid(scv.getCfid());
sb.setCftoken(scv.getCftoken());
session.setAttribute("cookieSession", sb);
request.setAttribute("clientSession",sb);

OR (if both beans have the same attributes)

import org.apache.commons.beanutils.BeanUtils;

BeanUtils.copyProperties(sb, scv);
session.setAttribute("cookieSession", sb);
request.setAttribute("clientSession",sb);

Hopefully this help.

Shed.
-Original Message-
From: John McCosker [mailto:[EMAIL PROTECTED]
Sent: Monday, January 10, 2005 6:49
To: 'Struts Users Mailing List'
Subject: accessing bean properties in a jsp


Hi, I am a struts newbie,

I am trying to access a bean in my jsp page like this,



I validate and then set the bean in my action,

package com.neo.five.ereports;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpSession;

import com.neo.five.cookies.SessionCookieValidator;
import com.neo.five.beans.CustomerSessionBean;

public final class EreportAction extends Action{

public ActionForward execute(ActionMapping mapping,

ActionForm
form,

HttpServletRequest request,

HttpServletResponse response){
//get the session object
HttpSession session = request.getSession(false);

//validate the session cookie if session object dows not
exist

Cookie[] cookies = request.getCookies();
SessionCookieValidator scv = new
SessionCookieValidator(cookies);
scv.checkCookie();

//forward to appropriate destination
//if there is a cookie continue
if(scv.hasSessionCookie()){
//check for session object
if (session != null) {
//if session does not exist put bean
into
session that holds the cookie
//values

if(session.getAttribute("cookieSession")==null){

CustomerSessionBean sb = new
CustomerSessionBean(scv.getCustomerid(),scv.getCustomerName(),scv.getCfi
d(),
scv.getCftoken());

session.setAttribute("cookieSession", sb);

request.setAttribute("clientSession",sb);

}

return (mapping.findForward("success"));

}else{

return (mapping.findForward("failure"));

}

}else{

return (mapping.findForward("failure"));

}

}

}

however I am getting this error,

HTTP Status 500 - 





type Exception report

message 

description The server encountered an internal error () that prevented
it
from fulfilling this request.

exception 

org.a

Help with DynaActionForm

2005-01-10 Thread Kalluru Uma. Maheswar
Hi,

I posted the same question last week but could not get any reply. Can
someone help me please?

 

How do I validate if a field is entered or not using the DynaActionForm?

 

My HTML form has  and  buttons. I want to check
if the user has entered some text in the text field and that he has
selected the radio button.

 

If he has not selected, then show him a error message in the jsp. How to
do this? Do I need to configure any xml file for this? An example would
be great.

 

Thanks

Uma

 



convertStringToDate

2005-01-10 Thread Flávio Maldonado
Hi people...
I'm trying to convert String to java.sql.Date and I'm having some problems.
Maybe anybody has a method that do it and can send to us.
Thanks...
Flávio Vilasboas Maldonado
Diretor de Desenvolvimento
SedNet Soluções
+55(35)3471-9381 


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


Re: Security in Struts Application

2005-01-10 Thread Vic
I posted on wiki:
http://wiki.apache.org/struts/ApplicationSecurity
(any FAQ, maybe people create or edit WIKI)
.V
Hari Saptoadi wrote:
Hi All
i'd like to say sorry if someone already asked this question before...
what is best practice implement security in struts apps ?
i'm looking something that similar with acegi security but more suitable with  struts 

 


--
RiA-SoA w/JDNC  forums
- help develop a community
My blog 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: accessing bean properties in a jsp

2005-01-10 Thread Hollaway, Shedrick L CIV TRIREFFAC
consider setting your CustomerSessionBean values differently.

CustomerSessionBean sb = new

CustomerSessionBean(scv.getCustomerid(),scv.getCustomerName(),
scv.getCfid(),scv.getCftoken());
session.setAttribute("cookieSession", sb);
request.setAttribute("clientSession",sb);


CustomerSessionBean sb = new CustomerSessionBean();
sb.setCustomerid(scv.getCustomerid());
sb.setCustomerName(scv.getCustomerName());
sb.setCfid(scv.getCfid());
sb.setCftoken(scv.getCftoken());
session.setAttribute("cookieSession", sb);
request.setAttribute("clientSession",sb);

OR (if both beans have the same attributes)

import org.apache.commons.beanutils.BeanUtils;

BeanUtils.copyProperties(sb, scv);
session.setAttribute("cookieSession", sb);
request.setAttribute("clientSession",sb);

Hopefully this help.

Shed.
-Original Message-
From: John McCosker [mailto:[EMAIL PROTECTED]
Sent: Monday, January 10, 2005 6:49
To: 'Struts Users Mailing List'
Subject: accessing bean properties in a jsp


Hi, I am a struts newbie,

I am trying to access a bean in my jsp page like this,



I validate and then set the bean in my action,

package com.neo.five.ereports;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpSession;

import com.neo.five.cookies.SessionCookieValidator;
import com.neo.five.beans.CustomerSessionBean;

public final class EreportAction extends Action{

public ActionForward execute(ActionMapping mapping,

ActionForm
form,

HttpServletRequest request,

HttpServletResponse response){
//get the session object
HttpSession session = request.getSession(false);

//validate the session cookie if session object dows not
exist

Cookie[] cookies = request.getCookies();
SessionCookieValidator scv = new
SessionCookieValidator(cookies);
scv.checkCookie();

//forward to appropriate destination
//if there is a cookie continue
if(scv.hasSessionCookie()){
//check for session object
if (session != null) {
//if session does not exist put bean
into
session that holds the cookie
//values

if(session.getAttribute("cookieSession")==null){

CustomerSessionBean sb = new
CustomerSessionBean(scv.getCustomerid(),scv.getCustomerName(),scv.getCfi
d(),
scv.getCftoken());

session.setAttribute("cookieSession", sb);

request.setAttribute("clientSession",sb);

}

return (mapping.findForward("success"));

}else{

return (mapping.findForward("failure"));

}

}else{

return (mapping.findForward("failure"));

}

}

}

however I am getting this error,

HTTP Status 500 - 





type Exception report

message 

description The server encountered an internal error () that prevented
it
from fulfilling this request.

exception 

org.apache.jasper.JasperException: An error occurred while evaluating
custom
action attribute "value" with value "${clientSession.customerName}":
Unable
to find a value for "customerName" in object of class
"com.neo.five.beans.CustomerSessionBean" using operator "." (null)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:2
54)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.
java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp
atch
er.java:432)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat
cher
.java:356)
at
or

accessing bean properties in a jsp

2005-01-10 Thread John McCosker
Hi, I am a struts newbie,

I am trying to access a bean in my jsp page like this,



I validate and then set the bean in my action,

package com.neo.five.ereports;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpSession;

import com.neo.five.cookies.SessionCookieValidator;
import com.neo.five.beans.CustomerSessionBean;

public final class EreportAction extends Action{

public ActionForward execute(ActionMapping mapping,
ActionForm
form,

HttpServletRequest request,

HttpServletResponse response){
//get the session object
HttpSession session = request.getSession(false);

//validate the session cookie if session object dows not
exist

Cookie[] cookies = request.getCookies();
SessionCookieValidator scv = new
SessionCookieValidator(cookies);
scv.checkCookie();

//forward to appropriate destination
//if there is a cookie continue
if(scv.hasSessionCookie()){
//check for session object
if (session != null) {
//if session does not exist put bean into
session that holds the cookie
//values

if(session.getAttribute("cookieSession")==null){

CustomerSessionBean sb = new
CustomerSessionBean(scv.getCustomerid(),scv.getCustomerName(),scv.getCfid(),
scv.getCftoken());

session.setAttribute("cookieSession", sb);

request.setAttribute("clientSession",sb);

}

return (mapping.findForward("success"));

}else{

return (mapping.findForward("failure"));

}

}else{

return (mapping.findForward("failure"));

}

}

}

however I am getting this error,

HTTP Status 500 - 




type Exception report

message 

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception 

org.apache.jasper.JasperException: An error occurred while evaluating custom
action attribute "value" with value "${clientSession.customerName}": Unable
to find a value for "customerName" in object of class
"com.neo.five.beans.CustomerSessionBean" using operator "." (null)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
54)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:432)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:356)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
69)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
sor.java:455)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
o

Re: Struts 1.1 UTF-8 problem

2005-01-10 Thread Guillaume Cottenceau
Koon Yue Lam  writes:

> Hi, here is the situation:
> Tomcat 5.25
> MySQL 4.1
> Struts 1.1
> 
> when I use Struts form to get some form data submited by a webpage, it
> is encode in latin but not utf-8. I have already set the page encoding
> to UTF-8 in my JSP.
> 
> I need to new a String specific the encoding to UTF-8 in order to save
> unicode data into MySQL
> 
> Is there any way to tell Struts encode all data in UTF-8 ??

You might want to browse the archives.

http://marc.theaimsgroup.com/?l=struts-user&m=110484806414499
http://marc.theaimsgroup.com/?l=struts-user&m=110175805321521

-- 
Guillaume Cottenceau

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



Re: How to detect Cancel button i pressed ?

2005-01-10 Thread Nicolas De Loof
You can check for cancel in actions using
isCanceled(request)
Struts cancel tag uses a magic value that this method will detect 
(formbean validation is also skipped)

About exception, I used to set a global exception handler that logs 
exception stack and forwards to a generic error page.

Nico.
Manisha Sathe a écrit :
I had posted it before - might hv missed the response. I want to check whether 
Cancel button is pressed, if yes then want to redirect it to another page
Also how to handle th Exceptions. I am catching many exceptions inside my Action Handlers. 
what shall i do with them ? Currently just printing the error messages on System.out, but what is the good practice to handle exceptions ? Close all Resultsets/ connections and redirect to error page ? write some standard routine ? 

In struts-config i have given mapping to "errors" as global forward, but what 
if exceptions occur inside my common classes ?
regards
Manisha
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Removing deprecations from library using Tiles

2005-01-10 Thread brenmcguire
I am going to modify the code of a Tiles-based library and I want to
remove some deprecations (from Struts 1.1 to 1.2.4).
In particular, I want to remove the "DefinitionsUtil" class. In fact it is
only used to refer to the "DefinitionsUtils.userDebugLevel" and
"DefinitionsUtils.NO_DEBUG". What is the best way to remove these
deprecations? Should I use commons-logging?
Thanks in advance
Antonio Petrelli


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



How to detect Cancel button i pressed ?

2005-01-10 Thread Manisha Sathe
I had posted it before - might hv missed the response. I want to check whether 
Cancel button is pressed, if yes then want to redirect it to another page
 
Also how to handle th Exceptions. I am catching many exceptions inside my 
Action Handlers. 
what shall i do with them ? Currently just printing the error messages on 
System.out, but what is the good practice to handle exceptions ? Close all 
Resultsets/ connections and redirect to error page ? write some standard 
routine ? 
 
In struts-config i have given mapping to "errors" as global forward, but what 
if exceptions occur inside my common classes ?
 
regards
Manisha

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

RE: Paging through a collection on a page

2005-01-10 Thread McDonnell, Colm (MLIM)

I'm not interested in display tag or one of those.


I'm not sure whether you would categorise the pager taglib as "one of
those" but it is a popular approach to paging in JSPs and it is
reasonably lightweight.

http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html


-Original Message-
From: Donie Kelly [mailto:[EMAIL PROTECTED] 
Sent: 07 January 2005 17:39
To: Struts Users Mailing List
Subject: Paging through a collection on a page


HI all

 

Anybody got some sample code that allows me to display multiple pages
from a
collection with next and previous page links. The collection is stored
in
the form class so I'm wondering how easy this is to do. If there are
some
samples on the web I'd be interested in having a look. I'm not
interested in
display tag or one of those. I just need it to be simple and
straightforward.

 

Many thanks

Donie


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.9 - Release Date: 06/01/2005 

 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Click here for important additional terms relating to this 
e-mail. http://www.ml.com/email_terms/ 

 

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



RE: cross application form bean

2005-01-10 Thread mohan.radhakrishnan
JAAS would help but that's not Struts specific.


Mohan 

-Original Message-
From: Craig McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 08, 2005 9:30 AM
To: Struts Users Mailing List; Oleg
Subject: Re: cross application form bean

Sessions are unique to individual applications.  In addition, individual
applications are loaded by different class loaders (because they have
different WEB-INF/lib directories), so its quite likely that you'd get
ClassNotFoundException errors even if sessions were allowed to cross the
boundaries.

If you want the "single sign on" type support you are talking about, you
should investigate using your container's facilities for this (for
example, Tomcat supports it), or figure out some way to simulate it,
such as a specially crafted cookie that is recognized by each of your
applications.

Craig


On Fri, 7 Jan 2005 19:49:18 -0800, Oleg <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Is there a way to access a form bean (login info) cross applications.
> For example, a user logs in application 1, the form bean created with 
> session scope and than redirected to the URL of second application, 
> there application finds created from bean and will not ask to login 
> again.
> 
> I tried that by including jsessionid with the redirect URL but second 
> application still creates a different session.
> 
> Any ideas?
> 
> Thank you
> Oleg
> 
> -
> 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]



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in 
error, please notify the sender immediately and delete the original.  Any other 
use of the email by you is prohibited.

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