Re: Too many moving parts in Tiles

2006-10-25 Thread Greg Reddin


On Oct 25, 2006, at 6:01 PM, Chris Pratt wrote:


Greg, to answer your question, "how do I think this should work?"  One
improvement I can think of would be to allow this type of  
construct.  In the

tiles-defs.xml, specify a definition like:


[snip]


Then allow inserting, referencing and populating in one fell swoop,
something similar to:

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


 
 
 


which right now ignores all the puts in the body of the insert and  
just

inserts the definition.  This would allow you to separate the reusable
definitions from the single use pages.


Thanks, that helps a lot.   I think there's a lot of people out there  
who would like it to work this way.  We've had some discussions on  
the dev list about restructuring the tags in Tiles 2.  The problem is  
that the  tag means multiple things.  In some cases it  
means "insert this definition here" (like your example above).   In  
other cases it assumes you are "inside" a definition template and it  
means "insert the specified attribute here".  I can see what you mean  
about trying to insert a definition on the fly instead of defining it  
in the XML file.  Have you tried using the  tag?


Greg


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



Re: Too many moving parts in Tiles

2006-10-25 Thread Greg Reddin


On Oct 25, 2006, at 5:04 PM, Laurie Harper wrote:


Chris Pratt wrote:
Hmmm, I'm not using Tiles alone or Struts 2.  I'm using the Tiles  
integrated
into Struts 1.2.9.  I've tried using the ForwardAction to forward  
something

like:
   
But it doesn't work, it just returns 404's.


You probably want something like

  

I think you actually want something like this:



The above assumes Struts 1.2.9 with the Tiles plugin installed.  Of  
course the path attribute is what you'd type into the browser and the  
forward attribute is the tiles def.


Greg



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



Re: Form not found for locale 'en_US' warning message

2006-10-25 Thread Martin Gainty
MessageResources.properties assumes a default configuration for en english and 
US
if you copy your MessageResources.properties (presumably in american english) 
to MessageResources_en_US.properties
then that error should be addressed

Martin --

This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: "Strachan, Paul" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Wednesday, October 25, 2006 9:28 PM
Subject: RE: Form not found for locale 'en_US' warning message


could it be you have validate="true" but no form validations defined ?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 24 October 2006 9:38 PM
To: user@struts.apache.org
Subject: Form not found for locale 'en_US' warning message


Hi,


I am the getting the below warning message whenever I access the
formbeans


Form not found for locale 'en_US'



I am using the downloaded version of the Struts 1.3.5 that was available
in struts site.


With reference to BugId -
http://issues.apache.org/bugzilla/show_bug.cgi?id=38081  this bug is
fixed in struts 1.3.


I am not sure what more files i need to include here.


Any help asap is appreciated.


Thanks,
Vinodh.


Note: I copied all of the jar files in lib directory of struts 1.3.5
where there was no 'struts.jar' file available.





The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments.


WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.


www.wipro.com
**
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**

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



RE: Form not found for locale 'en_US' warning message

2006-10-25 Thread Strachan, Paul
could it be you have validate="true" but no form validations defined ?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 24 October 2006 9:38 PM
To: user@struts.apache.org
Subject: Form not found for locale 'en_US' warning message


Hi,


I am the getting the below warning message whenever I access the
formbeans


Form not found for locale 'en_US'



I am using the downloaded version of the Struts 1.3.5 that was available
in struts site.


With reference to BugId -
http://issues.apache.org/bugzilla/show_bug.cgi?id=38081  this bug is
fixed in struts 1.3.


I am not sure what more files i need to include here.


Any help asap is appreciated.


Thanks,
Vinodh.


Note: I copied all of the jar files in lib directory of struts 1.3.5
where there was no 'struts.jar' file available.





The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments.


WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.


www.wipro.com
**
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**

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



Re: Too many moving parts in Tiles

2006-10-25 Thread Chris Pratt

Greg, to answer your question, "how do I think this should work?"  One
improvement I can think of would be to allow this type of construct.  In the
tiles-defs.xml, specify a definition like:


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


   
 
   
   
   
   
   
   
 /**
  * Page Level Initialization
  */
 function init () {
 } //init
   
   
   
   
 
   
 


Then allow inserting, referencing and populating in one fell swoop,
something similar to:

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

 
 
 


which right now ignores all the puts in the body of the insert and just
inserts the definition.  This would allow you to separate the reusable
definitions from the single use pages.
 (*Chris*)

On 10/24/06, Greg Reddin <[EMAIL PROTECTED]> wrote:



On Oct 24, 2006, at 12:20 PM, Chris Pratt wrote:

> First I have to create
> an essentially empty file for each page that uses Tiles, something
> like:
>
> <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles-
> el"%>
> 

First off, I'm assuming you're using Tiles 2?  That may affect the
way we answer the rest of your questions.

This is a drawback to using Tiles in standalone mode.  Tiles is meant
to be inserted into the view layer of an MVC application.  It is
meant to interface with the controller component of an MVC
framework.  So, if you're using Struts or JSF, you'd configure your
controller layer to forward requests to Tiles.  Instead of a 2-line
JSP page along with a Tile definition and associated pages for every
"page" you'd have 2 lines of configuration in your controller layer
along with the Tiles components for every page.  But in standalone
mode you don't have a front controller so your intermediate JSP page
becomes the front controller.  In my current project I'm using
Facelets.  I'd like to see Tiles implement a feature of Facelets in
which the "page" calls the template.  Tiles works the other way
around.  In Tiles you have to define a definition that references
both the template and the page content.  In Facelets you invoke a
page that, in turn, pulls in a template.

But Tiles is currently missing this feature.  Maybe you should
consider including a controller in your app to avoid this problem.
Currently, there is no Struts 1.x support for Tiles 2, but there is
Struts 2 and JSF (by way of Shale) support.  Note that I haven't used
either in an application yet.

> Then since 90% of our files are separated into a blue section (with
> breadcrumbs) at the top of the page and a white section at the
> bottom, I
> extended the main layout definition to add those tiles.  But to
> extend a
> tile it apparently takes two definitions (which doesn't make any
> sense to
> me):
>
>  
>
>  
>
>  
>
>
>
>  
>
>  

The above defines the frame of your template, but you don't have to
provide 2 defs for every page do you?  For example, for a "foobar"
page you only need the following (plus the intermediate JSP page),
correct?


   
   


Or have I missed something?

I've heard talk of nested definitions whereby maybe you could combine
default.pane and default.layout into one, but I'm not sure if it
works or if it would be a best practice.  It might depend on who you
ask :-)  The fact that you can extend definitions is a good thing,
IMO, but you can only take the inheritance paradigm so far before it
breaks down when dealing with XML-based definitions.

> And since our site is internationalized we have externalized text in
> resources as well as internationalized tiles_defs_fr.xml files.  It
> seems
> like Tiles is making flow and maintainability harder not easier.

To this point, in some cases, you're probably correct.  It would be
helpful if you would think for a minute about how you might "like" it
to work.  If you can post some example defs and pages that would
represent your ideal environment we might be able to modify Tiles to
suit.For example:

*  What would be your alternative to using the intermediate JSP?
*  What would be your alternative to using 2 extension defs to build
90% of your pages?  (I know the answer is "one" def, but what would
it look like?)

With Tiles 2, we're still in development so, pretty much anything goes.

> Is there a
> best practice document somewhere that defines how to use this
> technology to
> make life easier rather than just making more work?

Well, the doc is in progress.  This is the best we can provide right
now:

http://struts.apache.org/struts-sandbox/tiles/index.html

I think we have some best practices in mind, we just haven't had a
chance to get them into the official docs yet.

Thanks,
Greg



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




Re: Too many moving parts in Tiles

2006-10-25 Thread Chris Pratt

In fact the Apache Tiles Web site example (
http://struts.apache.org/1.x/struts-tiles/examples.html right above the
header "Specify Attribute Types") seems to be promoting the two line file as
the right way to do things?  I'm very confused...  Doesn't anyone use Tiles?
 (*Chris*)

On 10/25/06, Chris Pratt <[EMAIL PROTECTED]> wrote:


Hmmm, I can't get that working can anyone point me at a working example?
All the examples I can find are extremely simple and don't use nested tiles.
  (*Chris*)

On 10/25/06, Laurie Harper <[EMAIL PROTECTED]> wrote:
>
> Chris Pratt wrote:
> > Hmmm, I'm not using Tiles alone or Struts 2.  I'm using the Tiles
> > integrated
> > into Struts 1.2.9.  I've tried using the ForwardAction to forward
> something
> > like:
> >
> >
> >
> > But it doesn't work, it just returns 404's.
>
> You probably want something like
>
>
> where .tile.name is the name of a definition in your tiles-defs.xml. You
> definitely don't need the 2-line JSP when using Tiles with Struts like
> this.
>
> L.
>
>
> > As far as 2 definitions per page, I've been told by others on the list
> that
> > because you can only define variables at the first level (or something
> like
> > that) that you have to separate the layout from the definition into
> two
> > definitions.  It seems very kludgy to me, which is why I'm asking
> here.  I
> > agree that the ability to nest and extend Tiles is an excellent idea,
> > but if
> > this is the "best practice" approach, it leaves a lot to be desired.
> >
> > I've tried implementing it the way I'd like it to work, and with help
> from
> > people on the list, this was the only way I could get it to work, so
> my
> > wishes are a bit moot at this point.
> >
> > I'm just trying to get a handle on this "simplifying" technology and
> make
> > sure I'm not making things harder than they should be.  If anyone can
> point
> > to a simpler solution (using Tiles and Struts, please refrain from
> > suggesting "switch to a completely different package"), I'd be very
> > grateful.
> >  (*Chris*)
> >
> > On 10/24/06, Greg Reddin <[EMAIL PROTECTED] > wrote:
> >>
> >>
> >> On Oct 24, 2006, at 12:20 PM, Chris Pratt wrote:
> >>
> >> > First I have to create
> >> > an essentially empty file for each page that uses Tiles, something
> >> > like:
> >> >
> >> > <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles-
> >> > el"%>
> >> > 
> >>
> >> First off, I'm assuming you're using Tiles 2?  That may affect the
> >> way we answer the rest of your questions.
> >>
> >> This is a drawback to using Tiles in standalone mode.  Tiles is meant
> >> to be inserted into the view layer of an MVC application.  It is
> >> meant to interface with the controller component of an MVC
> >> framework.  So, if you're using Struts or JSF, you'd configure your
> >> controller layer to forward requests to Tiles.  Instead of a 2-line
> >> JSP page along with a Tile definition and associated pages for every
> >> "page" you'd have 2 lines of configuration in your controller layer
> >> along with the Tiles components for every page.  But in standalone
> >> mode you don't have a front controller so your intermediate JSP page
> >> becomes the front controller.  In my current project I'm using
> >> Facelets.  I'd like to see Tiles implement a feature of Facelets in
> >> which the "page" calls the template.  Tiles works the other way
> >> around.  In Tiles you have to define a definition that references
> >> both the template and the page content.  In Facelets you invoke a
> >> page that, in turn, pulls in a template.
> >>
> >> But Tiles is currently missing this feature.  Maybe you should
> >> consider including a controller in your app to avoid this problem.
> >> Currently, there is no Struts 1.x support for Tiles 2, but there is
> >> Struts 2 and JSF (by way of Shale) support.  Note that I haven't used
> >> either in an application yet.
> >>
> >> > Then since 90% of our files are separated into a blue section (with
>
> >> > breadcrumbs) at the top of the page and a white section at the
> >> > bottom, I
> >> > extended the main layout definition to add those tiles.  But to
> >> > extend a
> >> > tile it apparently takes two definitions (which doesn't make any
> >> > sense to
> >> > me):
> >> >
> >> >  
> >> >
> >> >  
> >> >
> >> >  
> >> >
> >> >
> >> >
> >> >  
> >> >
> >> >  
> >>
> >> The above defines the frame of your template, but you don't have to
> >> provide 2 defs for every page do you?  For example, for a "foobar"
> >> page you only need the following (plus the intermediate JSP page),
> >> correct?
> >>
> >> 
> >>
> >>
> >> 
> >>
> >> Or have I missed something?
> >>
> >> I've heard talk of nested definitions whereby maybe you could combine
>
> >> default.pane and default.layout into one, but I'm not sure if it
> >> works or if it would be a best practice.  It might depend on who you
> >> ask :-)  The fact that you can extend definitions is a good thing,
> >> IMO, bu

Re: Too many moving parts in Tiles

2006-10-25 Thread Chris Pratt

Hmmm, I can't get that working can anyone point me at a working example?
All the examples I can find are extremely simple and don't use nested tiles.
 (*Chris*)

On 10/25/06, Laurie Harper <[EMAIL PROTECTED]> wrote:


Chris Pratt wrote:
> Hmmm, I'm not using Tiles alone or Struts 2.  I'm using the Tiles
> integrated
> into Struts 1.2.9.  I've tried using the ForwardAction to forward
something
> like:
>
>
>
> But it doesn't work, it just returns 404's.

You probably want something like

As far as 2 definitions per page, I've been told by others on the list
that
> because you can only define variables at the first level (or something
like
> that) that you have to separate the layout from the definition into two
> definitions.  It seems very kludgy to me, which is why I'm asking
here.  I
> agree that the ability to nest and extend Tiles is an excellent idea,
> but if
> this is the "best practice" approach, it leaves a lot to be desired.
>
> I've tried implementing it the way I'd like it to work, and with help
from
> people on the list, this was the only way I could get it to work, so my
> wishes are a bit moot at this point.
>
> I'm just trying to get a handle on this "simplifying" technology and
make
> sure I'm not making things harder than they should be.  If anyone can
point
> to a simpler solution (using Tiles and Struts, please refrain from
> suggesting "switch to a completely different package"), I'd be very
> grateful.
>  (*Chris*)
>
> On 10/24/06, Greg Reddin <[EMAIL PROTECTED]> wrote:
>>
>>
>> On Oct 24, 2006, at 12:20 PM, Chris Pratt wrote:
>>
>> > First I have to create
>> > an essentially empty file for each page that uses Tiles, something
>> > like:
>> >
>> > <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles-
>> > el"%>
>> > 
>>
>> First off, I'm assuming you're using Tiles 2?  That may affect the
>> way we answer the rest of your questions.
>>
>> This is a drawback to using Tiles in standalone mode.  Tiles is meant
>> to be inserted into the view layer of an MVC application.  It is
>> meant to interface with the controller component of an MVC
>> framework.  So, if you're using Struts or JSF, you'd configure your
>> controller layer to forward requests to Tiles.  Instead of a 2-line
>> JSP page along with a Tile definition and associated pages for every
>> "page" you'd have 2 lines of configuration in your controller layer
>> along with the Tiles components for every page.  But in standalone
>> mode you don't have a front controller so your intermediate JSP page
>> becomes the front controller.  In my current project I'm using
>> Facelets.  I'd like to see Tiles implement a feature of Facelets in
>> which the "page" calls the template.  Tiles works the other way
>> around.  In Tiles you have to define a definition that references
>> both the template and the page content.  In Facelets you invoke a
>> page that, in turn, pulls in a template.
>>
>> But Tiles is currently missing this feature.  Maybe you should
>> consider including a controller in your app to avoid this problem.
>> Currently, there is no Struts 1.x support for Tiles 2, but there is
>> Struts 2 and JSF (by way of Shale) support.  Note that I haven't used
>> either in an application yet.
>>
>> > Then since 90% of our files are separated into a blue section (with
>> > breadcrumbs) at the top of the page and a white section at the
>> > bottom, I
>> > extended the main layout definition to add those tiles.  But to
>> > extend a
>> > tile it apparently takes two definitions (which doesn't make any
>> > sense to
>> > me):
>> >
>> >  
>> >
>> >  
>> >
>> >  
>> >
>> >
>> >
>> >  
>> >
>> >  
>>
>> The above defines the frame of your template, but you don't have to
>> provide 2 defs for every page do you?  For example, for a "foobar"
>> page you only need the following (plus the intermediate JSP page),
>> correct?
>>
>> 
>>
>>
>> 
>>
>> Or have I missed something?
>>
>> I've heard talk of nested definitions whereby maybe you could combine
>> default.pane and default.layout into one, but I'm not sure if it
>> works or if it would be a best practice.  It might depend on who you
>> ask :-)  The fact that you can extend definitions is a good thing,
>> IMO, but you can only take the inheritance paradigm so far before it
>> breaks down when dealing with XML-based definitions.
>>
>> > And since our site is internationalized we have externalized text in
>> > resources as well as internationalized tiles_defs_fr.xml files.  It
>> > seems
>> > like Tiles is making flow and maintainability harder not easier.
>>
>> To this point, in some cases, you're probably correct.  It would be
>> helpful if you would think for a minute about how you might "like" it
>> to work.  If you can post some example defs and pages that would
>> represent your ideal environment we might be able to modify Tiles to
>> suit.For example:
>>
>> *  What would be your alternative to using the intermediate JSP?
>> *  What 

Re: FormFile field value not getting retained

2006-10-25 Thread Laurie Harper

Puneet Lakhina wrote:

Hi,
This is the first time I am using a FormFile. I have a few other fields in
my form along with the  field. The problem is when some
validation fails, the value in the text field of the file control gets lost
i.e. the user has to select the file again. Is this normal behavior or does
it have to do something with the way im doing things.


This is the normal behaviour. A file input can't be pre-populated, hence 
there is no way to preserve it's value when the page is re-loaded. 
That's a security restriction that browsers impose, to prevent 
unscrupulous web sites from getting files from your computer without you 
knowing it.


L.


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



Re: how to use SET method of DynaValidatorForm?

2006-10-25 Thread Laurie Harper
In general, you should not be creating Dyna* form beans by hand like 
that. Properly setting up a dyna bean involves more steps than just 
calling new(). In this case you should probably be using a regular, POJO 
bean.


L.

Mallik wrote:

Hi friends
my problem is :
how to use set method of DynaValidatorForm like get("");
i am using like this but it is not working.let me know where i did
mistake...

this is my execute method of BlocksSetup action
(i want to show all the blocks existed,and give text boxes to enter new)
--
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception
{
DynaValidatorForm block = null;
try
{

ds = getDataSource(request);
conn = ds.getConnection();
stmt = conn.createStatement();
String query = "SELECT
BLOCKID,COLLEGEID,ADDRESS,SHORTDESCRIPTION,PHONE,CREATEDBY,CREATEDDATE FROM
BLOCKS ORDER BY BLOCKID";
rs = stmt.executeQuery(query);

while(rs.next())
{
block = new DynaValidatorForm();
block.set("blockNo",rs.getString("BLOCKID"));
block.set("location",rs.getString("ADDRESS"));

block.set("shortDesc",rs.getString("SHORTDESCRIPTION"));
block.set("phoneNo",rs.getString("PHONE"));
blocksDetails.add(block);
}

}catch(SQLException e)
{
e.printStackTrace();
}
request.setAttribute("BLOCKS",blocksDetails);
return mapping.findForward("continue");

}


this is my jsp



Block Details


*Block No
*Short Desc
Location
Phone No











		class="formtextmid"  maxlength="10" >
		class="formtext"  maxlength="10">
		class="formtext" >
		class="formtext" maxlength="15" >




this is struts-config.xml part
---







-
let me know the problem

ur's
Mallik




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



Re: Validation with actions

2006-10-25 Thread Laurie Harper

zeta wrote:

I want to associate the validation with the action definition. In this way, I
need to performed the client-side validation when an action is called and
not taken into account the form associated to this action. Can you give me
some example of how do this?


I'm not sure what you mean by 'not taken into account the form 
associated to this action.' The way to get client-side validation is to 
include the  tag somewhere inside your , and 
 add an onsubmit handler to the form to call the generated Javascript 
code. See the  documentation [1] and the Validator 
Guide [2] for more info.


L.

[1] http://struts.apache.org/1.3.5/struts-taglib/tlddoc/html/javascript.html

[2] http://struts.apache.org/1.3.5/faqs/validator.html


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



Re: Too many moving parts in Tiles

2006-10-25 Thread Laurie Harper

Chris Pratt wrote:
Hmmm, I'm not using Tiles alone or Struts 2.  I'm using the Tiles 
integrated

into Struts 1.2.9.  I've tried using the ForwardAction to forward something
like:

   

But it doesn't work, it just returns 404's.


You probably want something like

  where .tile.name is the name of a definition in your tiles-defs.xml. You 
definitely don't need the 2-line JSP when using Tiles with Struts like this.


L.



As far as 2 definitions per page, I've been told by others on the list that
because you can only define variables at the first level (or something like
that) that you have to separate the layout from the definition into two
definitions.  It seems very kludgy to me, which is why I'm asking here.  I
agree that the ability to nest and extend Tiles is an excellent idea, 
but if

this is the "best practice" approach, it leaves a lot to be desired.

I've tried implementing it the way I'd like it to work, and with help from
people on the list, this was the only way I could get it to work, so my
wishes are a bit moot at this point.

I'm just trying to get a handle on this "simplifying" technology and make
sure I'm not making things harder than they should be.  If anyone can point
to a simpler solution (using Tiles and Struts, please refrain from
suggesting "switch to a completely different package"), I'd be very
grateful.
 (*Chris*)

On 10/24/06, Greg Reddin <[EMAIL PROTECTED]> wrote:



On Oct 24, 2006, at 12:20 PM, Chris Pratt wrote:

> First I have to create
> an essentially empty file for each page that uses Tiles, something
> like:
>
> <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles-
> el"%>
> 

First off, I'm assuming you're using Tiles 2?  That may affect the
way we answer the rest of your questions.

This is a drawback to using Tiles in standalone mode.  Tiles is meant
to be inserted into the view layer of an MVC application.  It is
meant to interface with the controller component of an MVC
framework.  So, if you're using Struts or JSF, you'd configure your
controller layer to forward requests to Tiles.  Instead of a 2-line
JSP page along with a Tile definition and associated pages for every
"page" you'd have 2 lines of configuration in your controller layer
along with the Tiles components for every page.  But in standalone
mode you don't have a front controller so your intermediate JSP page
becomes the front controller.  In my current project I'm using
Facelets.  I'd like to see Tiles implement a feature of Facelets in
which the "page" calls the template.  Tiles works the other way
around.  In Tiles you have to define a definition that references
both the template and the page content.  In Facelets you invoke a
page that, in turn, pulls in a template.

But Tiles is currently missing this feature.  Maybe you should
consider including a controller in your app to avoid this problem.
Currently, there is no Struts 1.x support for Tiles 2, but there is
Struts 2 and JSF (by way of Shale) support.  Note that I haven't used
either in an application yet.

> Then since 90% of our files are separated into a blue section (with
> breadcrumbs) at the top of the page and a white section at the
> bottom, I
> extended the main layout definition to add those tiles.  But to
> extend a
> tile it apparently takes two definitions (which doesn't make any
> sense to
> me):
>
>  
>
>  
>
>  
>
>
>
>  
>
>  

The above defines the frame of your template, but you don't have to
provide 2 defs for every page do you?  For example, for a "foobar"
page you only need the following (plus the intermediate JSP page),
correct?


   
   


Or have I missed something?

I've heard talk of nested definitions whereby maybe you could combine
default.pane and default.layout into one, but I'm not sure if it
works or if it would be a best practice.  It might depend on who you
ask :-)  The fact that you can extend definitions is a good thing,
IMO, but you can only take the inheritance paradigm so far before it
breaks down when dealing with XML-based definitions.

> And since our site is internationalized we have externalized text in
> resources as well as internationalized tiles_defs_fr.xml files.  It
> seems
> like Tiles is making flow and maintainability harder not easier.

To this point, in some cases, you're probably correct.  It would be
helpful if you would think for a minute about how you might "like" it
to work.  If you can post some example defs and pages that would
represent your ideal environment we might be able to modify Tiles to
suit.For example:

*  What would be your alternative to using the intermediate JSP?
*  What would be your alternative to using 2 extension defs to build
90% of your pages?  (I know the answer is "one" def, but what would
it look like?)

With Tiles 2, we're still in development so, pretty much anything goes.

> Is there a
> best practice document somewhere that defines how to use this
> technology to
> make life easier rather than just making more w

Re: doubt with multibox

2006-10-25 Thread Laurie Harper

Yariel Ramos Moreno wrote:

hello...

I´m using html:multibox to generate a dynamic list of items... so far so
good, but I have a problem because at the same time I generate a dynamic
list too, but this list print always the same (example "working")... then,
what can I do if the second list always print the same and this is not
the way html:multibox work?...

example:

My items:

[] item 1 [] working
[] item 2 [] working
[] item 3 [] working
[] item 4 [] working
[] item n [] working


I'm not sure I understand the question, but it sounds like you're not 
iterating your second list. You're probably missing an index expression. 
Post your JSP code if you can't get it figured out.


L.


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



Re: several html forms

2006-10-25 Thread Laurie Harper

Jean-Marie Pitre wrote:

Hello,

What do you think about using several html forms with same name in the
same page ?

I explain me, my JSP displays (with iterate) content of a tab element
(object in my formbean).
I would like to update one of these elements, so my idea was to create a
html form block for each element of my tab in the JSP and post one html
form  to an action.


I'm not sure I understand. Do you mean you want to have a different form 
in each tab area? Why not have a single enclosing form? I think having 
multiple forms on one page can be made to work, though maybe not having 
multiple forms with the same name. Have you tried what you have in mind?


L.


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



Re: 2 different FormFile size restrictions

2006-10-25 Thread Laurie Harper

Marcolino wrote:

Hi,
a short question:

I have a /createShortEntry and a /createLargeEntry.
I want to limit filesize for /createShortEntry to 250kb and for 
/createLargeEntry to 350kb.


is this possible in a simple way?

Thanks, Markus


No, you can only set a max upload size for the application as a whole. 
For what you want to do, you'd have to add logic in your actions' 
validation code.


L.


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



Re: javabeans with Collection (Set)

2006-10-25 Thread Laurie Harper
I haven't tried it, but I'd assume you would have to register a 
converter for String[], rather than just String. What does your 
converter registration code look like?


L.

BISO wrote:
Thanks Laurie for your response. 
I used BeanUtils and It worked well with me  :) 


Unfortunately, convert(Class type, Object value) works only with single
Object not Object array. Do you know away to make it work with arrays. 
My goal to Convert String[] to a java.util.Set


Thanks again
BISO



Laurie Harper wrote:
That's because Struts doesn't know how to turn a set of HTML request 
parameters into a Set of Something. There are a couple of options: you 
could, perhaps, register a converter with BeanUtils what would do this 
for you, at which point your existing code would probably work as you 
were expecting; or you could change your form bean to expose the 
'values' field as an indexed property [1]. The latter is probably the 
one you want.


L.

[1] http://struts.apache.org/1.2.9/userGuide/building_view.html#indexed

BISO wrote:

Dears,
I have a "User" bean with java.util.Set property.
I create a struts form with a list to select multiple values from and
then
store them in the set. 
I am getting this exception:

java.lang.IllegalArgumentException: Cannot invoke
com.myapp.struts.User.setValues - argument type mismatch

---
public class User extends org.apache.struts.action.ActionForm {

private String name;

private Set values;

public String getName() {
return name;
}

public void setName( String name) {
this.name = name;
}

public Set getValues() {
return values;
}

public void setValues(Set values) {
this.values = values;
} 
}














  





--

Thanks in advance

BISO



-
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: Drag-and-drop struts-aware IDE?

2006-10-25 Thread Coelho.Joao
Leon,
It sounds like Java is a stronger language in Europe versus .net.  You
mentioned that not everything is struts, a question: in your estimation
what is java being mostly used for in europe ?  And what about C ?
Thanks.
Joao coelho

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 25, 2006 1:35 PM
To: Struts Users Mailing List
Subject: Re: Drag-and-drop struts-aware IDE?

the situation seems to be completely different whereever you are.
here in europe, especially in germany, .net has probably same market
shares as perl :-) And if you count open positions, there are maybe 1:10
for .net against java. Not everything is struts however.

regards
Leon

On 10/25/06, Ed Griebel <[EMAIL PROTECTED]> wrote:
> Yes, this is the "issue" with Struts, it's hard for an OSS product to 
> compete with the .Net marketing juggernaut. MS seems to be happy 
> trotting out their dog-and-pony show to anyone who will look at it.
> The source control, code checking, etc. components in Eclipse match 
> closely to what VisualStudio has, just not out of the box 
> unfortunately, and there's nobody going around giving demos of Struts
> + Eclipse, at least not for free.
>
> -ed
>
> On 10/25/06, Bruno Melloni <[EMAIL PROTECTED]> wrote:
> > Probably because managers are always looking for the famous "silver 
> > bullet" that will allow them to use untrained developers in half the

> > time... Yes, it is a dream, but it is the dream being sold by 
> > Micro$oft for .NET, and showing a tool that does it for Struts is 
> > the first step to avoid the miriad of problems caused by using .NET
and Visual Studio.
> > The "lesser of two evils" and all that.
> >
> > Anyway, the Exadel Studio mentioned by Juan looks promising.  It 
> > seems to allow drag-and-drop layout while preserving the basic
coding model.
> >
> > bruno
> >
> > -Original Message-
> > From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
> > Sent: Monday, October 23, 2006 6:43 AM
> > To: Struts Users Mailing List
> > Subject: Re: Drag-and-drop struts-aware IDE?
> >
> > 
> >
> > I'm. Drag and Drop may save you some time at the beginning and will 
> > cost you thrice the time later.
> > Why are people so hot for drag and drop and are ignoring the 
> > evidence that it never works?
> >
> > regards
> > Leon
> >
> > 
> > - To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > 
> > - To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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


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



Re: Drag-and-drop struts-aware IDE?

2006-10-25 Thread Leon Rosenberg

the situation seems to be completely different whereever you are.
here in europe, especially in germany, .net has probably same market
shares as perl :-)
And if you count open positions, there are maybe 1:10 for .net against
java. Not everything is struts however.

regards
Leon

On 10/25/06, Ed Griebel <[EMAIL PROTECTED]> wrote:

Yes, this is the "issue" with Struts, it's hard for an OSS product to
compete with the .Net marketing juggernaut. MS seems to be happy
trotting out their dog-and-pony show to anyone who will look at it.
The source control, code checking, etc. components in Eclipse match
closely to what VisualStudio has, just not out of the box
unfortunately, and there's nobody going around giving demos of Struts
+ Eclipse, at least not for free.

-ed

On 10/25/06, Bruno Melloni <[EMAIL PROTECTED]> wrote:
> Probably because managers are always looking for the famous "silver
> bullet" that will allow them to use untrained developers in half the
> time... Yes, it is a dream, but it is the dream being sold by Micro$oft
> for .NET, and showing a tool that does it for Struts is the first step
> to avoid the miriad of problems caused by using .NET and Visual Studio.
> The "lesser of two evils" and all that.
>
> Anyway, the Exadel Studio mentioned by Juan looks promising.  It seems
> to allow drag-and-drop layout while preserving the basic coding model.
>
> bruno
>
> -Original Message-
> From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 23, 2006 6:43 AM
> To: Struts Users Mailing List
> Subject: Re: Drag-and-drop struts-aware IDE?
>
> 
>
> I'm. Drag and Drop may save you some time at the beginning and will cost
> you thrice the time later.
> Why are people so hot for drag and drop and are ignoring the evidence
> that it never works?
>
> regards
> Leon
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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




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



Re: Drag-and-drop struts-aware IDE?

2006-10-25 Thread Ed Griebel

Yes, this is the "issue" with Struts, it's hard for an OSS product to
compete with the .Net marketing juggernaut. MS seems to be happy
trotting out their dog-and-pony show to anyone who will look at it.
The source control, code checking, etc. components in Eclipse match
closely to what VisualStudio has, just not out of the box
unfortunately, and there's nobody going around giving demos of Struts
+ Eclipse, at least not for free.

-ed

On 10/25/06, Bruno Melloni <[EMAIL PROTECTED]> wrote:

Probably because managers are always looking for the famous "silver
bullet" that will allow them to use untrained developers in half the
time... Yes, it is a dream, but it is the dream being sold by Micro$oft
for .NET, and showing a tool that does it for Struts is the first step
to avoid the miriad of problems caused by using .NET and Visual Studio.
The "lesser of two evils" and all that.

Anyway, the Exadel Studio mentioned by Juan looks promising.  It seems
to allow drag-and-drop layout while preserving the basic coding model.

bruno

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
Sent: Monday, October 23, 2006 6:43 AM
To: Struts Users Mailing List
Subject: Re: Drag-and-drop struts-aware IDE?



I'm. Drag and Drop may save you some time at the beginning and will cost
you thrice the time later.
Why are people so hot for drag and drop and are ignoring the evidence
that it never works?

regards
Leon

-
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: question about DWR integration

2006-10-25 Thread Ilya Liubovich


If I understand it correctly, you can use this in the context of the DWR 
Servlet (i.e. remote class), so it will have to be implemented for each 
remote bean.

I was sort of hoping for a generic solution.
Thanks for your reply, Lig




From: "Yujun Liang" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: "Struts Users Mailing List" 
Subject: Re: question about DWR integration
Date: Wed, 25 Oct 2006 22:46:43 +1000

You can use WebContextFactory
http://getahead.ltd.uk/dwr-demo/javadoc/uk/ltd/getahead/dwr/WebContextFactory.htmlto
get a
WebContext
http://getahead.ltd.uk/dwr-demo/javadoc/uk/ltd/getahead/dwr/WebContext.html,
then you can do whatever you want.
Regards

On 10/25/06, Ilya Liubovich <[EMAIL PROTECTED]> wrote:


Thanks Frank!
It's a great idea. I'll give it a try.
But to generalize a bit on my question.
Let's say you have a legacy servlet, which is mapped to a certain url
pattern.
Now, you'd to use only  a single controller ( the struts' controller), and
do some processing on all of the requests, before control gets to the
servlet.
Is it possible, without modifying the URL, and the servlet?

Thanks much, Lig

>From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" 
>To: Struts Users Mailing List 
>Subject: Re: question about DWR integration
>Date: Wed, 25 Oct 2006 00:01:05 -0400
>
>Hi Lig,
>
>I think you would want to do two things... first, abstract out your
>authorization code from the RP into a filter... you should be able to
slap
>this in front of vanilla Struts and get the same effect (perhaps with a
>little tweaking, since I'm not familiar with your implementation).
>
>Next, map this filter to ActionServlet, as well as DWRServlet... DWR and
>Struts are really two different things (existing integration aside), and
I
>don't think it would make much sense to run requests through Struts and
>then DWR... I can see why you'd think that with the auth code in the RP,
>but once its externalized, I think everything becomes quite a bit
cleaner.
>
>Frank
>
>Ilya Liubovich wrote:
>>Hi,
>>I've asked this on the DWR mailing list, but never got a response.
>>May you be you can help.
>>The issue is the following:
>>
>>I have an extension to requestProcessor which deals with authorizing
>>requests based on request parameteres. I'd like to do the same to the
>>requests directed to the DWR servlet.
>>My thinking was first, map url /dwr* to the ActionServlet, do the
required
>>checks in the
>>processMapping() of the extension of RequestProcessor, and then forward
>>the request to the
>>DWR servlet.
>>
>>Is this a right approach?
>>If so, could somebody advice how to do it?
>>Thanks, Lig
>>
>>_
>>Stay in touch with old friends and meet new ones with Windows Live
Spaces
>>
http://clk.atdmt.com/MSN/go/msnnkwsp007001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>
>--
>Frank W. Zammetti
>Founder and Chief Software Architect
>Omnytex Technologies
>http://www.omnytex.com
>AIM/Yahoo: fzammetti
>MSN: [EMAIL PROTECTED]
>Author of "Practical Ajax Projects With Java Technology"
>  (2006, Apress, ISBN 1-59059-695-1)
>Java Web Parts - http://javawebparts.sourceforge.net
>  Supplying the wheel, so you don't have to reinvent it!
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_
Find a local pizza place, music store, museum and more…then map the best
route!  http://local.live.com?FORM=MGA001


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





--
Yujun Liang
[EMAIL PROTECTED]


_
Get today's hot entertainment gossip  
http://movies.msn.com/movies/hotgossip?icid=T002MSN03A07001



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



ITERATOR

2006-10-25 Thread Juan Espinosa
hi anyone know how to iterato over a object that is in the application
object (not in the session)
im using s:iterate, im searching for a parameter like "scope" or something
like that
 
Regards
 
Juan


RE: Drag-and-drop struts-aware IDE?

2006-10-25 Thread Bruno Melloni
Probably because managers are always looking for the famous "silver
bullet" that will allow them to use untrained developers in half the
time... Yes, it is a dream, but it is the dream being sold by Micro$oft
for .NET, and showing a tool that does it for Struts is the first step
to avoid the miriad of problems caused by using .NET and Visual Studio.
The "lesser of two evils" and all that.

Anyway, the Exadel Studio mentioned by Juan looks promising.  It seems
to allow drag-and-drop layout while preserving the basic coding model.

bruno

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 23, 2006 6:43 AM
To: Struts Users Mailing List
Subject: Re: Drag-and-drop struts-aware IDE?



I'm. Drag and Drop may save you some time at the beginning and will cost
you thrice the time later.
Why are people so hot for drag and drop and are ignoring the evidence
that it never works?

regards
Leon

-
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: [SOLVED?]: Add request parameter in

2006-10-25 Thread Jim Reynolds

In Struts 1.x I used to use this type of mechanism to add parameters
to an action. I think that is what you are trying to do, if not
dismiss.

In JSP collect data and put into a Map.
[
java.util.HashMap params = new java.util.HashMap();
params.put("imageNum", imageNum);
params.put("assetId", assetId);
params.put("loadNum", loadNum);
// put into context
pageContext.setAttribute("paramsLink", params);

]

then later on call action like so.
action="EditImageException"  name="paramsLink"

If you look at the action docs, you will see it takes a name which is
a Map. This has saved me in past projects.

HTH






On 10/25/06, Antonis Lebesis <[EMAIL PROTECTED]> wrote:

After a lot of searching, I found that you there is no "struts way" of
adding a request parameter to . I used java code to
solve it:




Antonis.

On 10/25/06, Antonis Lebesis <[EMAIL PROTECTED]> wrote:
> Hello Martin,
>   thanks for the answer, but I 'm afraid I wasn't clear. I want to set
> a parameter to the call of login action not retrieve it in the login
> action.
>
> Thanks again,
> Antonis
>
> On 10/25/06, Martin Gainty <[EMAIL PROTECTED]> wrote:
> > The request parameter is available thru bean:parameter
> > be mindful that multiple="true" must be specified in the event you are 
sotring an array
> > For more info check out
> > 
http://struts.apache.org/1.x/struts-taglib/apidocs/org/apache/struts/taglib/bean/package-summary.html#package_description
> >
> > Anyone else?
> > M-
> >
> > This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the
> > designated recipients named above. If you are not the intended recipient, 
you are hereby notified that you have received
> > this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its
> > contents
> > - Original Message -
> > From: "Antonis Lebesis" <[EMAIL PROTECTED]>
> > To: "struts" 
> > Sent: Tuesday, October 24, 2006 7:08 PM
> > Subject: Add request parameter in 
> >
> >
> > > Hello,
> > >
> > >  I want to add a request parameter in  tag. I searched
> > > the user guide, but I didn't find anything relevant. Have you any idea
> > > on how to do this?
> > >
> > > The code I 'm using is:
> > >
> > > 
> > > 
> > >
> > > Thanks,
> > > Antonis.
> > >
> > > -
> > > 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]



FormFile field value not getting retained

2006-10-25 Thread Puneet Lakhina

Hi,
This is the first time I am using a FormFile. I have a few other fields in
my form along with the  field. The problem is when some
validation fails, the value in the text field of the file control gets lost
i.e. the user has to select the file again. Is this normal behavior or does
it have to do something with the way im doing things.

--
Puneet


help integrating struts and spring 2

2006-10-25 Thread Doug Tangren
Hi.  I have been using Struts 1.2.9 for a while and just started  
using Spring 2.0.  I am trying to integrate the two an am running  
into trouble.  I am following Springs docs @ http:// 
static.springframework.org/spring/docs/2.0.x/reference/ 
webintegration.html#struts-actionsupport  and I tried the easier of  
the two recommended approaches, making my actions subclass Spring's  
DispatchActionSupport class instead of Struts' Action class.  This  
example below is the example given in Spring's docs.


public class UserAction extends DispatchActionSupport {

public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)  
throws Exception {

if (log.isDebugEnabled()) {
log.debug("entering 'delete' method...");
}
WebApplicationContext ctx = getWebApplicationContext();
UserManager mgr = (UserManager) ctx.getBean("userManager");
// talk to manager for business logic
return mapping.findForward("success");
}
}


 I am deploying to Tomcat and am getting the following error.  What  
have been your approaches to integrate Struts and Spring?




java.lang.IllegalStateException: No WebApplicationContext found: no  
ContextLoaderListener registered?
	 
org.springframework.web.context.support.WebApplicationContextUtils.getRe 
quiredWebApplicationContext(WebApplicationContextUtils.java:86)
	 
org.springframework.web.struts.DelegatingActionUtils.findRequiredWebAppl 
icationContext(DelegatingActionUtils.java:148)
	 
org.springframework.web.struts.DispatchActionSupport.initWebApplicationC 
ontext(DispatchActionSupport.java:98)
	org.springframework.web.struts.DispatchActionSupport.setServlet 
(DispatchActionSupport.java:78)
	org.apache.struts.action.RequestProcessor.processActionCreate 
(RequestProcessor.java:295)
	org.apache.struts.action.RequestProcessor.process 
(RequestProcessor.java:218)

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


Doug Tangren
[EMAIL PROTECTED]





Re: How to show downloadable link using FormFile class .

2006-10-25 Thread Anuraag Shinde

Thanks will definately try it.

On 10/25/06, Ed Griebel <[EMAIL PROTECTED]> wrote:


For 1.1, you could try extending Servlet or a generic Action which
will redirect the InputStream to the servlet response writer. You will
have to do some of the busywork yourself like getting the writer and
setting up the InputStream yourself.

Can't help you with the blob stuff, but my guess is that there is a
way to transform resultsset.getBlobl(), maybe even
java.sql.Blob.getBinaryStream() would suit your purposes?

http://java.sun.com/j2se/1.3/docs/api/java/sql/Blob.html

-ed

On 10/25/06, Anuraag Shinde <[EMAIL PROTECTED]> wrote:
> Thanks a lot friend for ur detailed explanation,
> But the problem is DownloadAction came with struts 1.2 and i am using
1.1 :(
> And i am saving the file in databse as blob.
> I can get content using resultset.getblob("file") but what after that ?
> How can i transfer this to my formbean's file field ??
>
>
>
>
>
> On 10/25/06, Ed Griebel <[EMAIL PROTECTED]> wrote:
> >
> > What I have done in this situation is
> > - obtain a list of valid files and create an identifier or "token" for
> > each one (usually as simple as the name of the file) corresponding
> > with the identifier expected in the action described below
> > - throw the list of files into a List in the request/session/formbean
> > - iterate thru this list in the jsp, displaying a hyperlink for each
> > one with 
> > - each hyperlink points to the action below, with the file ID as a
> > param on the hyperlink, likely with an embedded "target='_blank'" in
> > the link so it is displayed in its own page
> > - Extend DownloadAction and implement getStreamInfo method. The
> > getStreamInfo method should instantiate and return a StreamInfo class
> > that will retrieve and stream a file to the browser, setting MIME type
> > in the header appropriately. This method will read an
> > application-specific identifier from the form bean to know what file
> > to serve up. In your situation, your method or StreamInfo class will
> > likely pull the blob from the database as a byte array and set up this
> > byte array as an InputStream. your DownloadAction superclass will
> > automatically hand this stream to the browser.
> > - Add an action-mapping to the action
> >
> > HTH,
> > -ed
> >
> > On 10/25/06, Anuraag Shinde <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >  In my application i need to allow user to upload files, View list
of
> > > uploaded files and download a specific file.
> > >  I have sucessfully configured my application to upload the file
using
> > > FormFile as type for my file field.
> > > Now the problem is how to Get data from database and show a
downloadable
> > > link.
> > >
> > > There are n number of examples for file upload but none of them
cover
> > the
> > > download part. i.e Getting file from database which is stored as
blob
> > and
> > > display
> > > a downloadable link on browser.
> > >
> > > Any suggetion will be a great help
> > >
> > > -
> > > Thanks and Regards
> > > Anurag Shinde.
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> -
> Thanks and Regards
> Anurag Shinde.
> Ph : 9823014942
>
>

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





--
-
Thanks and Regards
Anurag Shinde.
Ph : 9823014942


S:ITERATOR

2006-10-25 Thread Juan Espinosa
Im using the tag iterator to iterato over a list of objects in the user
session. Anyone knows hot to iterate over
a list in the application


  day is: 


sometingh like this



  day is: 


Regards
Juan.
 
 


Re: How to show downloadable link using FormFile class .

2006-10-25 Thread Ed Griebel

For 1.1, you could try extending Servlet or a generic Action which
will redirect the InputStream to the servlet response writer. You will
have to do some of the busywork yourself like getting the writer and
setting up the InputStream yourself.

Can't help you with the blob stuff, but my guess is that there is a
way to transform resultsset.getBlobl(), maybe even
java.sql.Blob.getBinaryStream() would suit your purposes?

http://java.sun.com/j2se/1.3/docs/api/java/sql/Blob.html

-ed

On 10/25/06, Anuraag Shinde <[EMAIL PROTECTED]> wrote:

Thanks a lot friend for ur detailed explanation,
But the problem is DownloadAction came with struts 1.2 and i am using 1.1 :(
And i am saving the file in databse as blob.
I can get content using resultset.getblob("file") but what after that ?
How can i transfer this to my formbean's file field ??





On 10/25/06, Ed Griebel <[EMAIL PROTECTED]> wrote:
>
> What I have done in this situation is
> - obtain a list of valid files and create an identifier or "token" for
> each one (usually as simple as the name of the file) corresponding
> with the identifier expected in the action described below
> - throw the list of files into a List in the request/session/formbean
> - iterate thru this list in the jsp, displaying a hyperlink for each
> one with 
> - each hyperlink points to the action below, with the file ID as a
> param on the hyperlink, likely with an embedded "target='_blank'" in
> the link so it is displayed in its own page
> - Extend DownloadAction and implement getStreamInfo method. The
> getStreamInfo method should instantiate and return a StreamInfo class
> that will retrieve and stream a file to the browser, setting MIME type
> in the header appropriately. This method will read an
> application-specific identifier from the form bean to know what file
> to serve up. In your situation, your method or StreamInfo class will
> likely pull the blob from the database as a byte array and set up this
> byte array as an InputStream. your DownloadAction superclass will
> automatically hand this stream to the browser.
> - Add an action-mapping to the action
>
> HTH,
> -ed
>
> On 10/25/06, Anuraag Shinde <[EMAIL PROTECTED]> wrote:
> > Hi,
> >  In my application i need to allow user to upload files, View list of
> > uploaded files and download a specific file.
> >  I have sucessfully configured my application to upload the file using
> > FormFile as type for my file field.
> > Now the problem is how to Get data from database and show a downloadable
> > link.
> >
> > There are n number of examples for file upload but none of them cover
> the
> > download part. i.e Getting file from database which is stored as blob
> and
> > display
> > a downloadable link on browser.
> >
> > Any suggetion will be a great help
> >
> > -
> > Thanks and Regards
> > Anurag Shinde.
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
-
Thanks and Regards
Anurag Shinde.
Ph : 9823014942




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



Re: How to show downloadable link using FormFile class .

2006-10-25 Thread Anuraag Shinde

Thanks a lot friend for ur detailed explanation,
But the problem is DownloadAction came with struts 1.2 and i am using 1.1 :(
And i am saving the file in databse as blob.
I can get content using resultset.getblob("file") but what after that ?
How can i transfer this to my formbean's file field ??





On 10/25/06, Ed Griebel <[EMAIL PROTECTED]> wrote:


What I have done in this situation is
- obtain a list of valid files and create an identifier or "token" for
each one (usually as simple as the name of the file) corresponding
with the identifier expected in the action described below
- throw the list of files into a List in the request/session/formbean
- iterate thru this list in the jsp, displaying a hyperlink for each
one with 
- each hyperlink points to the action below, with the file ID as a
param on the hyperlink, likely with an embedded "target='_blank'" in
the link so it is displayed in its own page
- Extend DownloadAction and implement getStreamInfo method. The
getStreamInfo method should instantiate and return a StreamInfo class
that will retrieve and stream a file to the browser, setting MIME type
in the header appropriately. This method will read an
application-specific identifier from the form bean to know what file
to serve up. In your situation, your method or StreamInfo class will
likely pull the blob from the database as a byte array and set up this
byte array as an InputStream. your DownloadAction superclass will
automatically hand this stream to the browser.
- Add an action-mapping to the action

HTH,
-ed

On 10/25/06, Anuraag Shinde <[EMAIL PROTECTED]> wrote:
> Hi,
>  In my application i need to allow user to upload files, View list of
> uploaded files and download a specific file.
>  I have sucessfully configured my application to upload the file using
> FormFile as type for my file field.
> Now the problem is how to Get data from database and show a downloadable
> link.
>
> There are n number of examples for file upload but none of them cover
the
> download part. i.e Getting file from database which is stored as blob
and
> display
> a downloadable link on browser.
>
> Any suggetion will be a great help
>
> -
> Thanks and Regards
> Anurag Shinde.
>
>

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





--
-
Thanks and Regards
Anurag Shinde.
Ph : 9823014942


Re: How to show downloadable link using FormFile class .

2006-10-25 Thread Ed Griebel

What I have done in this situation is
- obtain a list of valid files and create an identifier or "token" for
each one (usually as simple as the name of the file) corresponding
with the identifier expected in the action described below
- throw the list of files into a List in the request/session/formbean
- iterate thru this list in the jsp, displaying a hyperlink for each
one with 
- each hyperlink points to the action below, with the file ID as a
param on the hyperlink, likely with an embedded "target='_blank'" in
the link so it is displayed in its own page
- Extend DownloadAction and implement getStreamInfo method. The
getStreamInfo method should instantiate and return a StreamInfo class
that will retrieve and stream a file to the browser, setting MIME type
in the header appropriately. This method will read an
application-specific identifier from the form bean to know what file
to serve up. In your situation, your method or StreamInfo class will
likely pull the blob from the database as a byte array and set up this
byte array as an InputStream. your DownloadAction superclass will
automatically hand this stream to the browser.
- Add an action-mapping to the action

HTH,
-ed

On 10/25/06, Anuraag Shinde <[EMAIL PROTECTED]> wrote:

Hi,
 In my application i need to allow user to upload files, View list of
uploaded files and download a specific file.
 I have sucessfully configured my application to upload the file using
FormFile as type for my file field.
Now the problem is how to Get data from database and show a downloadable
link.

There are n number of examples for file upload but none of them cover the
download part. i.e Getting file from database which is stored as blob and
display
a downloadable link on browser.

Any suggetion will be a great help

-
Thanks and Regards
Anurag Shinde.




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



Re: Facing Problem using html:select with html:options

2006-10-25 Thread Chris Pratt

In HTML, only the selected values get sent to the server, so when no values
in the multi-select are selected, nothing gets sent to the server for that
property.  Make sure your reset() method clears out the values for that
property and you should be ok.
 (*Chris*)

On 10/25/06, Chetan Pandey <[EMAIL PROTECTED]> wrote:


Hi All:



I have a JSP Form in which one field is a multi-select drop-down box. An
array of String is used to represent it



I am facing this problem when trying to "Edit" stuff.



The Drop-down initially has many different values selected.



If I try to change selections everything is Fine. Irrespective of if I
increase the number of selections or decrease them as long as I select at
least one.



However, if I try to deselect all then the Original Selected Values remain
as it is and are passed to the Form.



The only Solution - which is a Workaround is that the User selects the
dummy
Item "Choose Hotel Name" which has a value of "0".



The following is my drop-dwon Code in the JSP Page.







Choose Hotel Name









Is this a known bug in IE.



Thanks.



Chetan













How to show downloadable link using FormFile class .

2006-10-25 Thread Anuraag Shinde

Hi,
In my application i need to allow user to upload files, View list of
uploaded files and download a specific file.
I have sucessfully configured my application to upload the file using
FormFile as type for my file field.
Now the problem is how to Get data from database and show a downloadable
link.

There are n number of examples for file upload but none of them cover the
download part. i.e Getting file from database which is stored as blob and
display
a downloadable link on browser.

Any suggetion will be a great help

-
Thanks and Regards
Anurag Shinde.


XSLT Result

2006-10-25 Thread Kimus Linuxus
Hi,

Is it possible to configure the XSLTResult to put a XML file to the
transformation instead of the serialization of the Action result?


thanx


XSLT result

2006-10-25 Thread Kimus Linuxus
Hi,

Is it possible to configure the XSLTResult to put a XML file to the
transformation instead of the serialization of the Action result?

thanx



Re: question about DWR integration

2006-10-25 Thread Frank W. Zammetti
Yes, I think its possible... you'd have to remap the URL for the legacy
servlet to ActionServlet, then, to keep things simple, have at minimum 1
Action mapping that uses ActionForward to the servlet (could have your own
Action in there if you wanted to do some processing in it).

This would introduce overhead to every request bound for that servlet,
(it's one servlet forwarding to another at the end of the day), and would
also throw Struts into the mix without really using anything it has to
offer.

So, while you could do it, I wouldn't :)  Getting the common code out into
a filter would likely work out better, certainly it would be cleaner. 
Alternatively, maybe you could take that legacy servlet and make it an
Action?  That probably wouldn't be a huge refactor either... Then you
could leave your custom RP in place if you wanted, continue using Struts
entirely... would also simplify your web.xml a bit.  6 of 1, half dozen of
another I suppose.

Frank


-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Wed, October 25, 2006 8:36 am, Ilya Liubovich wrote:
> Thanks Frank!
> It's a great idea. I'll give it a try.
> But to generalize a bit on my question.
> Let's say you have a legacy servlet, which is mapped to a certain url
> pattern.
> Now, you'd to use only  a single controller ( the struts' controller), and
> do some processing on all of the requests, before control gets to the
> servlet.
> Is it possible, without modifying the URL, and the servlet?
>
> Thanks much, Lig
>
>>From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
>>Reply-To: "Struts Users Mailing List" 
>>To: Struts Users Mailing List 
>>Subject: Re: question about DWR integration
>>Date: Wed, 25 Oct 2006 00:01:05 -0400
>>
>>Hi Lig,
>>
>>I think you would want to do two things... first, abstract out your
>>authorization code from the RP into a filter... you should be able to
>> slap
>>this in front of vanilla Struts and get the same effect (perhaps with a
>>little tweaking, since I'm not familiar with your implementation).
>>
>>Next, map this filter to ActionServlet, as well as DWRServlet... DWR and
>>Struts are really two different things (existing integration aside), and
>> I
>>don't think it would make much sense to run requests through Struts and
>>then DWR... I can see why you'd think that with the auth code in the RP,
>>but once its externalized, I think everything becomes quite a bit
>> cleaner.
>>
>>Frank
>>
>>Ilya Liubovich wrote:
>>>Hi,
>>>I've asked this on the DWR mailing list, but never got a response.
>>>May you be you can help.
>>>The issue is the following:
>>>
>>>I have an extension to requestProcessor which deals with authorizing
>>>requests based on request parameteres. I'd like to do the same to the
>>>requests directed to the DWR servlet.
>>>My thinking was first, map url /dwr* to the ActionServlet, do the
>>> required
>>>checks in the
>>>processMapping() of the extension of RequestProcessor, and then forward
>>>the request to the
>>>DWR servlet.
>>>
>>>Is this a right approach?
>>>If so, could somebody advice how to do it?
>>>Thanks, Lig
>>>
>>>_
>>>Stay in touch with old friends and meet new ones with Windows Live
>>> Spaces
>>>http://clk.atdmt.com/MSN/go/msnnkwsp007001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
>>>
>>>
>>>
>>>-
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>>
>>
>>--
>>Frank W. Zammetti
>>Founder and Chief Software Architect
>>Omnytex Technologies
>>http://www.omnytex.com
>>AIM/Yahoo: fzammetti
>>MSN: [EMAIL PROTECTED]
>>Author of "Practical Ajax Projects With Java Technology"
>>  (2006, Apress, ISBN 1-59059-695-1)
>>Java Web Parts - http://javawebparts.sourceforge.net
>>  Supplying the wheel, so you don't have to reinvent it!
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
> _
> Find a local pizza place, music store, museum and more…then map the best
> route!  http://local.live.com?FORM=MGA001
>
>
> -
> 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: jasper reports.jar problem..

2006-10-25 Thread B . Sridhar

HI,

thanks for your respose.  I have added the statements which you have
suggested. But  I am getting the same error.  Tthe class path has only
tools.jar and bootstrap.jar, which are getting assigned to
jasper.reports.compile.classpath. But I think we have to set the
jasperreports.jar to the classpath. Am I going in the right way...Please
suggest

On 10/25/06, Francisco Ronconi <[EMAIL PROTECTED]> wrote:


Hi,
Try to set the property...

System.setProperty("jasper.reports.compile.class.path",
System.getProperty("java.class.path"));

This has relation with appserver that these using, and the classloader
because jasperreports uses the classloader of another way.









Francisco Martin Ronconi
[EMAIL PROTECTED]
cel: (11) 15-4400-0676
www.fdvsolutions.com






Billinghurst 1712, 8vo D (CP1425) :: Buenos Aires, Argentina :: (54-11)
4826-9464


-Mensaje original-
De: B.Sridhar [mailto:[EMAIL PROTECTED]
Enviado el: Miércoles, 25 de Octubre de 2006 04:34 a.m.
Para: user@struts.apache.org
Asunto: jasper reports.jar problem..

Hi,

Iam writing  an application which generates reports using jasper reports
eclipse3.1  is the IDE. For generating ".jrxml" iam using ireport
tool.Ihave written a struts application which uses this .jrxml file to
generate
the report.  I have added the jasperreports1.2.7.jar file into the
webinf\lib folder and added it to the buildpaht.  But when I execute the
application, it is giving an exception saying that the
"*package* *net.sf.jasperreports.engine does not exist import
net.sf.jasperreports.engine.*;"*

But I have added the jasperreports.jar file which has this package.
Please solve my prob


--
B.Sridhar


__ NOD32 1.1826 (20061023) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com



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





--
B.Sridhar


Re: Unable to Download Struts2

2006-10-25 Thread Matthew J. Vincent

Is there someplace else where i can download this?

Thanks!

Matt

Wendy Smoak wrote:

On 10/24/06, Matthew J. Vincent <[EMAIL PROTECTED]> wrote:


I get a connection timeout everytime I try to download:

http://people.apache.org/builds/struts/2.0.1/struts-2.0.1-all.zip

Anyone else getting this?


Yes, that server was part of some infrastructure work that started on
Saturday.  The original estimate was Monday, but it's taking longer
than expected.

There is a monitoring page, though there is no further information
about people.apache.org on it:  http://monitoring.apache.org/status/



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



RE: Re: FormFile getPath() ?

2006-10-25 Thread Givler, Eric
Can you elaborate on this some more?

I followed through the example here: 
http://www.roseindia.net/struts/strutsfileupload.shtml.

My ActionForm has a property of FormFile called myFile.  Once I'm inside the 
Action class, the file upload has already taken place (part of 
processPopulate?).  That is, I can see the temp file in the tempDir folder (set 
in struts-config.xml controller element), and this code inside my action 
executes:

// Process the FormFile
FormFile myFile = myForm.getTheFile();
String contentType = myFile.getContentType();
String fileName= myFile.getFileName();
int fileSize   = myFile.getFileSize();
byte[] fileData= myFile.getFileData();
System.out.println("contentType: " + contentType);
System.out.println("File Name: " + fileName);
System.out.println("File Size: " + fileSize);

The problems at this point are:
1. The file already exists in the OS since the DeferredFileOutputStream wrote 
it once it reached the default size of 256*1024 (256K)
2. I'd like to get that file and run a virus scanner against it manually 
(McAfee excludes this folder so the file doesn't get removed)
3. I CAN write another piece of code to copy this inputStream to another file, 
but then that's going to add another 8-10 seconds when the files get larger (80 
MB).  And, the file is already there, it's just that the FormFile interface 
doesn't expose the FileItem from the CommonsFormFile (I think that's the name 
of the inner class inside the CommonsMultipartRequestHandler).
4. I'll assume that the byte[] is really not the way to process a large file 
because I've already run into problems with that.
5. Once the scan has taken place, I want to save the file to a BLOB in an 
Oracle database.


-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: Monday, October 23, 2006 3:23 PM
To: Struts Users Mailing List
Subject: Re: Re: FormFile getPath() ?


Eric

you'll need to implement FileItem e.g.

public final class UploadAction extends Action implements 
org.apache.commons.fileupload.FileItem

Martin --

This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents

- Original Message - 
From: "Givler, Eric" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Monday, October 23, 2006 2:19 PM
Subject: RE: Re: FormFile getPath() ?


Did you ever get a solution to this?  

The filename from FormFile.getFileName() is the client file name, right?

My requirement is that the uploads can be up to 100MB, and I can see the file 
created in a temp folder (rather quickly).  Before I can load it into the 
database, I have to run a virus scanner against it.  So creating another copy 
of the file is an extra step for me as well.

It appears that CommonsMultipartRequestHandler processes the request and adds 
FormFile elements for each file that is found to a Hash table, but these 
elements are of type CommonsFile, and don't give access to the fileItem, which 
might be able to give me the temporary filename.

-Original Message-
From: Laurent Duparchy [mailto:[EMAIL PROTECTED]
Sent: Monday, October 02, 2006 4:11 AM
To: Struts Users Mailing List
Subject: Re: FormFile getPath() ?


Hi,

thanks but the reply but I think it does exactly what I want to avoid 
(and what I'm currenlty doing) : Create a second temp file by reading 
the inputsream into a new FileOutputStream.

I'm looking into the possibility to get the filepath (when exist) of the 
FormFile, not the inpustream.


Mark Shifman wrote:

> An action like this should do it:
> public final class UploadAction extends Action {
>public ActionForward execute( ActionMapping mapping, ActionForm form,
>HttpServletRequest request, HttpServletResponse response)  
> throws Exception {
>
>UploadForm theForm = (UploadForm) form;
>FormFile file = theForm.getTheFile();
>String fileName = file.getFileName();
>
>try {
>String filePath =
>tempdir + "/" + fileName;
>//retrieve the file data
>
>InputStream stream = file.getInputStream();
>
>//write the file to the file specified
>OutputStream bos = new FileOutputStream(filePath);
>int bytesRead = 0;
>byte[] buffer = new byte[8192];
>while ((bytesRead = stream.read(buffer, 0, 8192)) != -1) {
>bos.write(buffer, 0, bytesRead);
>}
>bos.close();
>//close the stream
>stream.close();
>} catch (Exception ex) {
>  throw ex;
>}
>
>file.destroy();
>
>r

RE: jasper reports.jar problem..

2006-10-25 Thread Francisco Ronconi
Hi, 
Try to set the property...

System.setProperty("jasper.reports.compile.class.path",
System.getProperty("java.class.path"));

This has relation with appserver that these using, and the classloader
because jasperreports uses the classloader of another way.

 
 
 
 
 
 
 

Francisco Martin Ronconi
[EMAIL PROTECTED]
cel: (11) 15-4400-0676
www.fdvsolutions.com
 
 
 
 
 
 
Billinghurst 1712, 8vo D (CP1425) :: Buenos Aires, Argentina :: (54-11)
4826-9464
 

-Mensaje original-
De: B.Sridhar [mailto:[EMAIL PROTECTED] 
Enviado el: Miércoles, 25 de Octubre de 2006 04:34 a.m.
Para: user@struts.apache.org
Asunto: jasper reports.jar problem..

Hi,

Iam writing  an application which generates reports using jasper reports
eclipse3.1  is the IDE. For generating ".jrxml" iam using ireport
tool.Ihave written a struts application which uses this .jrxml file to
generate
the report.  I have added the jasperreports1.2.7.jar file into the
webinf\lib folder and added it to the buildpaht.  But when I execute the
application, it is giving an exception saying that the
"*package* *net.sf.jasperreports.engine does not exist import
net.sf.jasperreports.engine.*;"*

But I have added the jasperreports.jar file which has this package.
Please solve my prob


-- 
B.Sridhar


__ NOD32 1.1826 (20061023) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com



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



Re: form bean with composition, is it possible?

2006-10-25 Thread Yujun Liang

public class MyForm extends ValidatorForm {

CreditCard getCreditCard()

}

CreditCard has to be a bean,

jsp.



Regards

On 10/25/06, xianwinwin <[EMAIL PROTECTED]> wrote:



Hi guys,

I wonder if it's possible to create a form bean with a composition. I
mean,
assuming I have the following classes:
AccountInformation ( fname, lname...)
CreditCard (number, type...)

I would like to know if I can create a form (registration) that is
composed
from AccountInformation and CreditCard???

I don't want to retype all properties again (doesn't sound right)

my question is this:
1. is it possible to do that?
2. if yes, how would the registration.jsp page will look like?

If it was a regular form, it would have been:










thanks for any advise.

--
View this message in context:
http://www.nabble.com/form-bean-with-composition%2C-is-it-possible--tf2505462.html#a6985533
Sent from the Struts - User mailing list archive at Nabble.com.





--
Yujun Liang
[EMAIL PROTECTED]


Re: question about DWR integration

2006-10-25 Thread Yujun Liang

You can use WebContextFactory
http://getahead.ltd.uk/dwr-demo/javadoc/uk/ltd/getahead/dwr/WebContextFactory.htmlto
get a
WebContext
http://getahead.ltd.uk/dwr-demo/javadoc/uk/ltd/getahead/dwr/WebContext.html,
then you can do whatever you want.
Regards

On 10/25/06, Ilya Liubovich <[EMAIL PROTECTED]> wrote:


Thanks Frank!
It's a great idea. I'll give it a try.
But to generalize a bit on my question.
Let's say you have a legacy servlet, which is mapped to a certain url
pattern.
Now, you'd to use only  a single controller ( the struts' controller), and
do some processing on all of the requests, before control gets to the
servlet.
Is it possible, without modifying the URL, and the servlet?

Thanks much, Lig

>From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" 
>To: Struts Users Mailing List 
>Subject: Re: question about DWR integration
>Date: Wed, 25 Oct 2006 00:01:05 -0400
>
>Hi Lig,
>
>I think you would want to do two things... first, abstract out your
>authorization code from the RP into a filter... you should be able to
slap
>this in front of vanilla Struts and get the same effect (perhaps with a
>little tweaking, since I'm not familiar with your implementation).
>
>Next, map this filter to ActionServlet, as well as DWRServlet... DWR and
>Struts are really two different things (existing integration aside), and
I
>don't think it would make much sense to run requests through Struts and
>then DWR... I can see why you'd think that with the auth code in the RP,
>but once its externalized, I think everything becomes quite a bit
cleaner.
>
>Frank
>
>Ilya Liubovich wrote:
>>Hi,
>>I've asked this on the DWR mailing list, but never got a response.
>>May you be you can help.
>>The issue is the following:
>>
>>I have an extension to requestProcessor which deals with authorizing
>>requests based on request parameteres. I'd like to do the same to the
>>requests directed to the DWR servlet.
>>My thinking was first, map url /dwr* to the ActionServlet, do the
required
>>checks in the
>>processMapping() of the extension of RequestProcessor, and then forward
>>the request to the
>>DWR servlet.
>>
>>Is this a right approach?
>>If so, could somebody advice how to do it?
>>Thanks, Lig
>>
>>_
>>Stay in touch with old friends and meet new ones with Windows Live
Spaces
>>
http://clk.atdmt.com/MSN/go/msnnkwsp007001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>
>--
>Frank W. Zammetti
>Founder and Chief Software Architect
>Omnytex Technologies
>http://www.omnytex.com
>AIM/Yahoo: fzammetti
>MSN: [EMAIL PROTECTED]
>Author of "Practical Ajax Projects With Java Technology"
>  (2006, Apress, ISBN 1-59059-695-1)
>Java Web Parts - http://javawebparts.sourceforge.net
>  Supplying the wheel, so you don't have to reinvent it!
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_
Find a local pizza place, music store, museum and more…then map the best
route!  http://local.live.com?FORM=MGA001


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





--
Yujun Liang
[EMAIL PROTECTED]


Re: Debugging struts applications with eclipse

2006-10-25 Thread Yujun Liang

MyEclipse has a huge selection of plugins, it is easy to config any
application server and use the breakpoint to debug, you can even debug open
source code if you download the source code. You need pay $50+ per year. I
think it worths it.

Regards

On 10/25/06, Ulrich Elsner <[EMAIL PROTECTED]> wrote:


On 10/25/06, Joe Yuen <[EMAIL PROTECTED]> wrote:
>
> Can anyone tell me how to debug an application running under tomcat? Is
there any special setup I have to do in eclipse?

A popular method consists of using the sysdeo  plugin for Eclipse
(http://www.sysdeo.com/eclipse/tomcatplugin). If you then declare your
Struts project as a Tomcat project and start Tomcat using the plugin,
you can debug your code normally, i.e., by setting breakpoints,
evaluating variables etc.
A tutorial using that setup can be found at
http://javaboutique.internet.com/tutorials/three/

Regards,

Ulrich

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





--
Yujun Liang
[EMAIL PROTECTED]


Re: question about DWR integration

2006-10-25 Thread Ilya Liubovich

Thanks Frank!
It's a great idea. I'll give it a try.
But to generalize a bit on my question.
Let's say you have a legacy servlet, which is mapped to a certain url 
pattern.
Now, you'd to use only  a single controller ( the struts' controller), and 
do some processing on all of the requests, before control gets to the 
servlet.

Is it possible, without modifying the URL, and the servlet?

Thanks much, Lig


From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: Struts Users Mailing List 
Subject: Re: question about DWR integration
Date: Wed, 25 Oct 2006 00:01:05 -0400

Hi Lig,

I think you would want to do two things... first, abstract out your 
authorization code from the RP into a filter... you should be able to slap 
this in front of vanilla Struts and get the same effect (perhaps with a 
little tweaking, since I'm not familiar with your implementation).


Next, map this filter to ActionServlet, as well as DWRServlet... DWR and 
Struts are really two different things (existing integration aside), and I 
don't think it would make much sense to run requests through Struts and 
then DWR... I can see why you'd think that with the auth code in the RP, 
but once its externalized, I think everything becomes quite a bit cleaner.


Frank

Ilya Liubovich wrote:

Hi,
I've asked this on the DWR mailing list, but never got a response.
May you be you can help.
The issue is the following:

I have an extension to requestProcessor which deals with authorizing 
requests based on request parameteres. I'd like to do the same to the 
requests directed to the DWR servlet.
My thinking was first, map url /dwr* to the ActionServlet, do the required 
checks in the
processMapping() of the extension of RequestProcessor, and then forward 
the request to the

DWR servlet.

Is this a right approach?
If so, could somebody advice how to do it?
Thanks, Lig

_
Stay in touch with old friends and meet new ones with Windows Live Spaces 
http://clk.atdmt.com/MSN/go/msnnkwsp007001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us




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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

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



_
Find a local pizza place, music store, museum and more…then map the best 
route!  http://local.live.com?FORM=MGA001



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



Re: Debugging struts applications with eclipse

2006-10-25 Thread Ulrich Elsner

On 10/25/06, Joe Yuen <[EMAIL PROTECTED]> wrote:


Can anyone tell me how to debug an application running under tomcat? Is there 
any special setup I have to do in eclipse?


A popular method consists of using the sysdeo  plugin for Eclipse
(http://www.sysdeo.com/eclipse/tomcatplugin). If you then declare your
Struts project as a Tomcat project and start Tomcat using the plugin,
you can debug your code normally, i.e., by setting breakpoints,
evaluating variables etc.
A tutorial using that setup can be found at
http://javaboutique.internet.com/tutorials/three/

Regards,

Ulrich

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



[SOLVED?]: Add request parameter in

2006-10-25 Thread Antonis Lebesis

After a lot of searching, I found that you there is no "struts way" of
adding a request parameter to . I used java code to
solve it:




Antonis.

On 10/25/06, Antonis Lebesis <[EMAIL PROTECTED]> wrote:

Hello Martin,
  thanks for the answer, but I 'm afraid I wasn't clear. I want to set
a parameter to the call of login action not retrieve it in the login
action.

Thanks again,
Antonis

On 10/25/06, Martin Gainty <[EMAIL PROTECTED]> wrote:
> The request parameter is available thru bean:parameter
> be mindful that multiple="true" must be specified in the event you are 
sotring an array
> For more info check out
> 
http://struts.apache.org/1.x/struts-taglib/apidocs/org/apache/struts/taglib/bean/package-summary.html#package_description
>
> Anyone else?
> M-
>
> This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the
> designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
> this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its
> contents
> - Original Message -
> From: "Antonis Lebesis" <[EMAIL PROTECTED]>
> To: "struts" 
> Sent: Tuesday, October 24, 2006 7:08 PM
> Subject: Add request parameter in 
>
>
> > Hello,
> >
> >  I want to add a request parameter in  tag. I searched
> > the user guide, but I didn't find anything relevant. Have you any idea
> > on how to do this?
> >
> > The code I 'm using is:
> >
> > 
> > 
> >
> > Thanks,
> > Antonis.
> >
> > -
> > 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]



Validation with actions

2006-10-25 Thread zeta

I want to associate the validation with the action definition. In this way, I
need to performed the client-side validation when an action is called and
not taken into account the form associated to this action. Can you give me
some example of how do this?

Thanks!

Zeta

-- 
View this message in context: 
http://www.nabble.com/Validation-with-actions-tf2507074.html#a6990299
Sent from the Struts - User mailing list archive at Nabble.com.


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



how to use SET method of DynaValidatorForm?

2006-10-25 Thread Mallik

Hi friends
my problem is :
how to use set method of DynaValidatorForm like get("");
i am using like this but it is not working.let me know where i did
mistake...

this is my execute method of BlocksSetup action
(i want to show all the blocks existed,and give text boxes to enter new)
--
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception
{
DynaValidatorForm block = null;
try
{

ds = getDataSource(request);
conn = ds.getConnection();
stmt = conn.createStatement();
String query = "SELECT
BLOCKID,COLLEGEID,ADDRESS,SHORTDESCRIPTION,PHONE,CREATEDBY,CREATEDDATE FROM
BLOCKS ORDER BY BLOCKID";
rs = stmt.executeQuery(query);

while(rs.next())
{
block = new DynaValidatorForm();
block.set("blockNo",rs.getString("BLOCKID"));
block.set("location",rs.getString("ADDRESS"));

block.set("shortDesc",rs.getString("SHORTDESCRIPTION"));
block.set("phoneNo",rs.getString("PHONE"));
blocksDetails.add(block);
}

}catch(SQLException e)
{
e.printStackTrace();
}
request.setAttribute("BLOCKS",blocksDetails);
return mapping.findForward("continue");

}


this is my jsp




Block Details



*Block No

*Short Desc

Location

Phone No



























this is struts-config.xml part
---







-
let me know the problem

ur's
Mallik

-- 
View this message in context: 
http://www.nabble.com/how-to-use-SET-method-of-DynaValidatorForm--tf2506863.html#a6989684
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Add request parameter in

2006-10-25 Thread Antonis Lebesis

Hello Martin,
 thanks for the answer, but I 'm afraid I wasn't clear. I want to set
a parameter to the call of login action not retrieve it in the login
action.

Thanks again,
Antonis

On 10/25/06, Martin Gainty <[EMAIL PROTECTED]> wrote:

The request parameter is available thru bean:parameter
be mindful that multiple="true" must be specified in the event you are sotring 
an array
For more info check out
http://struts.apache.org/1.x/struts-taglib/apidocs/org/apache/struts/taglib/bean/package-summary.html#package_description

Anyone else?
M-

This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its
contents
- Original Message -
From: "Antonis Lebesis" <[EMAIL PROTECTED]>
To: "struts" 
Sent: Tuesday, October 24, 2006 7:08 PM
Subject: Add request parameter in 


> Hello,
>
>  I want to add a request parameter in  tag. I searched
> the user guide, but I didn't find anything relevant. Have you any idea
> on how to do this?
>
> The code I 'm using is:
>
> 
> 
>
> Thanks,
> Antonis.
>
> -
> 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]



Facing Problem using html:select with html:options

2006-10-25 Thread Chetan Pandey
Hi All:

 

I have a JSP Form in which one field is a multi-select drop-down box. An
array of String is used to represent it

 

I am facing this problem when trying to "Edit" stuff.

 

The Drop-down initially has many different values selected. 

 

If I try to change selections everything is Fine. Irrespective of if I
increase the number of selections or decrease them as long as I select at
least one.

 

However, if I try to deselect all then the Original Selected Values remain
as it is and are passed to the Form.

 

The only Solution - which is a Workaround is that the User selects the dummy
Item "Choose Hotel Name" which has a value of "0".

 

The following is my drop-dwon Code in the JSP Page.

 





Choose Hotel Name

 

 



 

Is this a known bug in IE.

 

Thanks.

 

Chetan

 

 

 

 



RE: Unable to Download Struts2

2006-10-25 Thread Wesslan
Same here. 

-Original Message-
From: Matthew J. Vincent [mailto:[EMAIL PROTECTED] 
Sent: den 24 oktober 2006 20:45
To: user@struts.apache.org
Subject: Unable to Download Struts2

Hi all,

I get a connection timeout everytime I try to download:

http://people.apache.org/builds/struts/2.0.1/struts-2.0.1-all.zip

Anyone else getting this?

Thanks!

Matt



-
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: Select row from a Table

2006-10-25 Thread Vijay Venkataraman
I believe you will specify action/href or forward attribute - which will 
identify the action. So in the appropriate action class you should be 
able to pull the value from the HttpServletRequest (request ) object. 
request.getParameter("orderNum"), plain servlet code.


Thanks,
Vijay Venkataraman

grifoxx wrote:

Thank you man.it worked but now I have another question, how can i get
the parameter and pass it to an action class.

Thank you again...


Laurie Harper wrote:
  

grifoxx wrote:


Hi, I created a table using the iterate tag from struts. What I want to
do is
to select a row from that table so I have an extra column that has a link
called Detail. If the user click on that link I want to display in other
page the detail of that row.

To do that I need to get the Order number which is one of the columns, so
How can I get that parameter when the user click on the link.
  

You don't, you encode it in the link when you render it. For example,

   

See the documentation for the html:link tag [1] for the various way of 
specifying request parameters.


L.

[1] http://struts.apache.org/1.2.9/userGuide/struts-html.html#link


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



Antwort: Problem addressing hashtable keys in jsp-file

2006-10-25 Thread Andreas . Hartmann
Hello!

The problem is fixed meanwhile. I forgot to set the Hashtable in the ActionForm
after it has been defined in Action. And the line 2 in the jsp must be correctly
written as 


Kind regards,
Andreas Hartmann

[EMAIL PROTECTED] schrieb am 25.10.2006 08:42:03:

>
> Hello!
>
> I' ve got the bean jobs, which is defined in Action and provided by
> setAttribute(). The bean itself is a Hashtable  >.
>
> In the corresponding ActionForm-class, the getter-method jlist is defined as
> follows:
>
> Hashtable > ht = new Hashtable  ArrayList>();
> public ArrayList  getJlist(String key) {return ht.get(key)};
>
>
> In the jsp, I want to iterate over the bean jobs like this:
>
> 
> 
> 
> 
>
> When the jsp is run, I get the error: javax.servlet.jsp.JspException: No
> collection found. Problem is the line 2 of the jsp-file :-).
>
> Does anybody have a hint for me, how to write line 2 correctly?
>
>
> Kind regards,
> Andreas Hartmann
>
>
> -
> 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]



jasper reports.jar problem..

2006-10-25 Thread B . Sridhar

Hi,

Iam writing  an application which generates reports using jasper reports
eclipse3.1  is the IDE. For generating ".jrxml" iam using ireport
tool.Ihave written a struts application which uses this .jrxml file to
generate
the report.  I have added the jasperreports1.2.7.jar file into the
webinf\lib folder and added it to the buildpaht.  But when I execute the
application, it is giving an exception saying that the
"*package* *net.sf.jasperreports.engine does not exist import
net.sf.jasperreports.engine.*;"*

But I have added the jasperreports.jar file which has this package.
Please solve my prob


--
B.Sridhar


Problem addressing hashtable keys in jsp-file

2006-10-25 Thread Andreas . Hartmann

Hello!

I' ve got the bean jobs, which is defined in Action and provided by
setAttribute(). The bean itself is a Hashtable >.

In the corresponding ActionForm-class, the getter-method jlist is defined as
follows:

Hashtable > ht = new Hashtable >();
public ArrayList  getJlist(String key) {return ht.get(key)};


In the jsp, I want to iterate over the bean jobs like this:






When the jsp is run, I get the error: javax.servlet.jsp.JspException: No
collection found. Problem is the line 2 of the jsp-file :-).

Does anybody have a hint for me, how to write line 2 correctly?


Kind regards,
Andreas Hartmann


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