Re: Please help....Struts 1.0.2b and JDK 1.4.2

2004-03-23 Thread Martin Cooper
You asked exactly the same question only 24 hours ago. Patience is a virtue.
;-)

Do you mean 1.0.2 beta? Wow, that's old! There is no reason that it
shouldn't, but I haven't run anything that old for some time now. I would
recommend upgrading to 1.1 anyway. :-)

--
Martin Cooper


"Kramer, Brad" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Can anyone either confirm or deny if Struts 1.0.2b is compatible with
JDK 1.4.2?


Thanks a lot!


  _

Brad Kramer
Pager -  [EMAIL PROTECTED]
  _








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



Re: [OT] Is it possible to use commons-el in a standalone application?

2004-03-23 Thread Martin Cooper
You're much more likely to get a good answer to this if you post to
commons-user, where it would be ON topic. Asking on struts-user if you can
use a non-Struts library in a non-Struts app isn't the best approach. ;-)

--
Martin Cooper


"Daniel H. F. e Silva" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>  I know this is an off-topic message, but as many people here works with
Jakarta Commons
> components, i decided to start my search in this list.
>  I was thinking about writing a Swing app where its config file would be a
XML file. And i'd like
> to put EL expressions in that file. So, my question is: is it possible to
embed EL into a
> standalone app?
>  I was reading commons-el API docs and they make a lot of references to
JSP implementation classes
> (PageContext, VariableResolver, etc). So, in first glance, looks it is not
possible. Is my
> conclusion right?
>
>  Thanks in advance for any hint.
>
> Regards,
>  Daniel Silva.
>
> __
> Do you Yahoo!?
> Yahoo! Finance Tax Center - File online. File on time.
> http://taxes.yahoo.com/filing.html




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



Re: Changing the FileUpload-Processing

2004-03-22 Thread Martin Cooper
You shouldn't have to worry about the request processor. The multipart
handler is pluggable, so you can simply replace the one Struts uses with
your own by specifying the class name in the 'multipartClass' attribute of
the  element in your Struts config file.

The multipart handler is invoked at the point at which the form bean is
being populated from the request. There's some slightly hairy magic that
goes on to make this work in a Servlets 2.2 environment, and I'm looking
forward to removing that for Struts 2. For now, I'd recommend staying away
from there and doing what you need inside the multipart handler itself.

--
Martin Cooper


<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hello everybody!

I wrote to the Mailing-List some days ago. That was about the displaying of
progress-bars during fileupload. I made progress on this in that manner that
I have a patched version of the commons-fileupload-library which can do the
thing.

But now I have to change the way Struts handles the FileUpload. I know that
I can overwrite the RequestProcessor and implement my own one. I hope that
it is possible to achieve my goal by doing this. What I basically need, is
the sport where Struts reads the files from the multipart-request into the
DiskFileUpload, since at this spot the progress bar tugs in.

Can somebody tell me a good way to do this? I know that there is a
CommonsMultipartRequestHandler which starts on doing this. But where exactly
does Struts utilize this thing?

Thx for any help! Hope this is not too specific.

___
Tim Adler, Abt. SDA1
Adress Management Solutions
AZ | Direct
Carl-Bertelsmann Straße 161s
D-33311 Gütersloh

Tel.: 05241/ 80 - 89574
[EMAIL PROTECTED]






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



Re: File-Upload: Progress-Bar

2004-03-19 Thread Martin Cooper

"Joe Germuska" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At 10:31 AM +0100 3/19/04, [EMAIL PROTECTED] wrote:
> >I'm up to the task to implement a progress bar for File-Uploads
> >...
> >My question: Has anybody done something like this with Struts before and
can
> >give me some little advise?
>
> I think someone is working on this, or at least has posted a bugzilla
> enhancement to commons-fileupload requesting it.  You might want to
> search the commons-dev mailing list archives or do a bugzilla search.

Yes, there is an enhancement request open against Commons FileUpload for
this, complete with code:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25830

Expect something along these lines in a forthcoming release of FileUpload,
with subsequent support in Struts.

--
Martin Cooper


>
> Joe
>
> -- 
> Joe Germuska
> [EMAIL PROTECTED]
> http://blog.germuska.com
>"Imagine if every Thursday your shoes exploded if you tied them
> the usual way.  This happens to us all the time with computers, and
> nobody thinks of complaining."
>  -- Jef Raskin




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



Re: [OT] JSTL Quick Reference

2004-03-18 Thread Martin Cooper
Not in the quick-ref format, but not much longer (20 pages vs 13 pages:

http://www.manning-source.com/books/bayern/bayern_apxA.pdf

I've been using that as a quick-ref since the book it's from (JSTL In
Action) was published.

--
Martin Cooper


"Bill Siggelkow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> It seems that there is demand for a JSTL Quick Reference.  When I was
> learning JSTL a couple of months ago I put together such a document and
> I thought others might find it of use.  It can be downloaded from
> http://www.jadecove.com/jstl-quick-reference.pdf.  The only downside
> about the document is that you have to make a book out of it yourself.
> I call this "self-binding"   All feedback is most appreciated and if
> anyone would like to assist in publishing this document I will be glad
> to talk about it.
>
> Bill Siggelkow
> Jade Cove Solutions
> www.jadecove.com
> [EMAIL PROTECTED]




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



Re: Struts cookbook

2004-03-18 Thread Martin Cooper

"Hubert Rabago" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> --- Nick Heudecker <[EMAIL PROTECTED]> wrote:
> > Wouldn't this be a great use of the (already existing) Struts Wiki?
>
> That's right.  I don't think it supports attachments, though.

The current one does not, but we (meaning Struts) will be moving to a new
wiki pretty soon, and that one does support attached files.

--
Martin Cooper


> I really got
> started thinking this way because I was thinking of a personal repository
of
> struts extensions I use in all my projects.  It started from that to a
more
> generic cookbook, and that's why the "attachments" remained in my mind
> whenever I thought about it.
>
> Of course from there it (in my mind) it grew to a cookbook containing
helpful
> code samples not just for Struts, but for other frameworks and libraries
as
> well, such as JSTL.
>
> Hubert
>
> > On 2004-Mar-18 13:03, Hubert Rabago wrote:
> > > I've had this idea for months now and actually had some entries
already
> > > written (with full web apps to illustrate) and I've also started
> > collecting
> > > cookbook entries from responses to this mailing list.  I was in the
> > process
> > > of writing the app to hold them late last year but got sidetracked.
> > >
> > > So yes, I'm interested and would certainly participate.  What did you
> > have in
> > > mind?  Where do you plan to host this?  What would the interface be?
> > Would
> > > it contain just code samples or would there be some way to also attach
> > actual
> > > files/classes?
> > >
> > > Hubert
> > >
>
>
> __
> Do you Yahoo!?
> Yahoo! Mail - More reliable, more storage, less spam
> http://mail.yahoo.com




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



Re: What is the best way to pass a parameter to a forward?

2004-03-16 Thread Martin Cooper

"Jay Glanville" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> It's funny that you say that it will not work, because it does for me,
> and without throwing any exceptions.

What version of Struts are you using? It's not supposed to work, at least
with the latest code, so I'd like to find out whether we have a bug, or
you're using a version prior to the forwards being frozen.

--
Martin Cooper


>
> That being said, your point about modifying an action mappings forwards
> is a good one.  It is unfortunate that the ActionForward class doesn't
> have a copy constructor 
>
> --
> Jay Glanville
>
>
> > -Original Message-
> > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Martin Cooper
> > Sent: Monday, March 15, 2004 8:30 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: What is the best way to pass a parameter to a forward?
> >
> >
> > What you are doing will not work - at least, not the way you
> > are doing it.
> > You are trying to modify the ActionForward instance that is
> > owned by Struts,
> > and calling setPath() on that instance will result in an
> > IllegalStateException.
> >
> > You need to create your own ActionForward instance, instead
> > of trying to
> > modify Struts' one. You can do that with something like this:
> >
> > ActionForward goto = mapping.findForward( "success" );
> > String path = ...; // Put together your new path
> > ActionForward myGoto = new ActionForward(path,
> > goto.getRedirect());
> > return myGoto;
> >
> > --
> > Martin Cooper
> >
> >
> > "Glanville, Jay" <[EMAIL PROTECTED]> wrote
> > in message
> > news:[EMAIL PROTECTED]
> > I'm trying to solve a problem, but I'm not sure my solution
> > is the best
> > way.  Basically, I want to set a parameter on a forward within the
> > action's execute.
> >
> > I'm in my action's execute method.  I've just successfully performed
> > some work, and I now want to forward/redirect to the next page.  So,
> > I've got some code that looks like this:
> >
> >public ActionForward execute(ActionMapping.) {
> >   // do some work
> >   ActionForward goto = mapping.findForward( "success" );
> >   return goto;
> >}
> >
> > With an action mapping that looks like this:
> >
> > >   path="/EntrySave"
> >   type="com.package.EntrySaveAction"
> >   name="EntryForm"
> >   validate="true"
> >   input="/Entry.do">
> >   
> >   
> >
> >
> > Basically, if I left the EntrySaveAction.execute do what's doing right
> > now, then upon successful completion, it would redirect to
> > "/Container.do".  However, what I want it to do is redirect to
> > "/Container.do?id=45", where 45 is the id of the container that I want
> > to go to.  The value of "45" is dynamic, and is know at the
> > time of the
> > EntrySaveAction.execute command.
> >
> > The way I'm currently doing it is something like this:
> >
> >public ActionForward execute(ActionMapping.) {
> >   // do some work
> >   ActionForward goto = mapping.findForward( "success" );
> >   String path = goto.getPath();
> >   path += "?id=" + container.getId();
> >   goto.setPath( path );
> >   return goto;
> >}
> >
> > Is this the correct way to do this?  Is there a better way?
> >
> > Thanks in advance
> >
> > JDG
> >
> >
> > --
> > Jay Glanville
> >
> >
> >
> >
> > -
> > 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: What is the best way to pass a parameter to a forward?

2004-03-15 Thread Martin Cooper
What you are doing will not work - at least, not the way you are doing it.
You are trying to modify the ActionForward instance that is owned by Struts,
and calling setPath() on that instance will result in an
IllegalStateException.

You need to create your own ActionForward instance, instead of trying to
modify Struts' one. You can do that with something like this:

ActionForward goto = mapping.findForward( "success" );
String path = ...; // Put together your new path
ActionForward myGoto = new ActionForward(path, goto.getRedirect());
return myGoto;

--
Martin Cooper


"Glanville, Jay" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I'm trying to solve a problem, but I'm not sure my solution is the best
way.  Basically, I want to set a parameter on a forward within the
action's execute.

I'm in my action's execute method.  I've just successfully performed
some work, and I now want to forward/redirect to the next page.  So,
I've got some code that looks like this:

   public ActionForward execute(ActionMapping.) {
  // do some work
  ActionForward goto = mapping.findForward( "success" );
  return goto;
   }

With an action mapping that looks like this:

   
  
  
   

Basically, if I left the EntrySaveAction.execute do what's doing right
now, then upon successful completion, it would redirect to
"/Container.do".  However, what I want it to do is redirect to
"/Container.do?id=45", where 45 is the id of the container that I want
to go to.  The value of "45" is dynamic, and is know at the time of the
EntrySaveAction.execute command.

The way I'm currently doing it is something like this:

   public ActionForward execute(ActionMapping.) {
  // do some work
  ActionForward goto = mapping.findForward( "success" );
  String path = goto.getPath();
  path += "?id=" + container.getId();
  goto.setPath( path );
  return goto;
   }

Is this the correct way to do this?  Is there a better way?

Thanks in advance

JDG


--
Jay Glanville




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



Re: multipart-request / file upload problem

2004-03-01 Thread Martin Cooper

"Adam Hardy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm going to put this another way: what's the secret with file upload
> requests? I can't see my file parameter in the request parameters when I
> submit the form with the multipart-request.

Ah, if I told you that, it wouldn't be a secret any more, now would it? ;-)

The biggest difference with multipart requests is that the request is
wrapped by Struts, so when you invoke a method on the request object, you
are actually invoking a method on the MultipartRequestWrapper class. This is
necessary so that calls to, for example, getParameter() go to Struts, which
parsed your request, rather than the container, which didn't.

In the code fragment below, I see you are invoking getParameterMap(). Note
that this is a Servlet 2.3 method. Since Struts 1.x is built for Servlet
2.2, that method is not implemented, and simply returns null.

Actually, there isn't a way to get the file items from the request itself,
since it doesn't have them. They're stored in the multipart request handler
itself. So, you would get the set of uploaded file items like this:

Hashtable fileItems =
formBean.getMultipartRequestHandler().getFileElements();

I'll be the first to admit that the current multipart implementation is a
little, um, arcane (not that I invented it ;). The plan is to completely
rewrite it for Struts 2.x, when we get there.

Hope this helps.

--
Martin Cooper


>
> Adam
>
> On 02/29/2004 07:05 PM Adam Hardy wrote:
> > I use the Commons multipart request handler stuff to set up a
> > DynaActionForm properly for my file upload so:
> >
> >  >   type="org.apache.struts.validator.DynaValidatorActionForm">
> >>
type="org.apache.struts.upload.CommonsMultipartRequestHandler$CommonsFormFil
e"/>
> >
> > 
> >
> > which works fine, but in some circumstances I want to manually create
> > this form, grab the file and save the DynaActionForm (in a filter). Like
> > so:
> >
> > ActionForm form =
> >   RequestUtils.createActionForm(request, actionMapping,
> >   moduleConfig, actionServlet);
> > form.reset(actionMapping, request);
> > BeanUtils.populate(form, request.getParameterMap());
> >
> > But it isn't working. My file comes back as null. Anyone know why or
> > have a solution?
> >
>
>
> -- 
> struts 1.1 + tomcat 5.0.16 + java 1.4.2
> Linux 2.4.20 Debian




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



[OT] Maven (was Re: [ANNOUNCE] Struts 1.2.0 Test Build available)

2004-02-27 Thread Martin Cooper

"Joe Germuska" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> >Given that Maven still hasn't reached an official 1.0 release in almost 3
> >years of development.
>
> hey, now...  Struts 1.1 took a darn long time!  I bet they're in the
> same boat.  Plenty of people who don't really track version numbers
> are using it happily, so the urge to actually cut a release is not
> too strong.

I'm not claiming we're angels, but we're doing a lot better than Maven is.
;-) From Struts 1.0.2 Final to Struts 1.1 Final took 1 year, 4 months.
During that time, people still had a Final release to work with. Maven has
been in development for almost *3* years, with *no* Final release to work
with...

>
> >That said, there are some intrepid Maven fans who are working on getting
the
> >Maven build for Struts to the same point as the Ant build system
>
> My enthusiasm for Maven is all about lowering the barrier to entry.

I used to share that enthusiasm. It has faded over time, however, as it
became apparent to me that, once you get past the easy part, writing preGoal
and postGoal scripts isn't much different from writing Ant scripts. Oh, and
Maven changing the way it does things didn't help either. ;-)

> I think long-time Ant/Struts builders forget how tedious it is to set
> up the build.properties file.  And that's just to compile; if you use
> an IDE you have another headache getting a Struts project set up.

That is certainly true. One of the things Maven does for you, to ease the
build process, is decide where the dependencies are going to come from. If
we did that in the Ant build files, it would make it almost as simple as
Mave, but then, because they're Ant build files, people would complain that
they were not sufficiently flexible. That makes it hard to win. ;-)

(When it comes to IDEs, though, most of them know about Ant, but don't yet
know about Maven at all, so there's not so much of a case for Maven there,
IMHO.)

--
Martin Cooper


>
> Anyway, no need to proselytize...
>
> Joe
> -- 
> Joe Germuska
> [EMAIL PROTECTED]
> http://blog.germuska.com
>"Imagine if every Thursday your shoes exploded if you tied them
> the usual way.  This happens to us all the time with computers, and
> nobody thinks of complaining."
>  -- Jef Raskin




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



Re: [OT] JSP or Velocity

2004-02-27 Thread Martin Cooper
There is one *huge* gripe I have about JSP that many people probably don't
care about. But if you do care about it, it can be pretty much of a
showstopper, and drive you to use Velocity instead.

The problem is that JSP *must* be invoked in a servlet request / response
environment. Why is this a problem? Here are a couple of examples:

1) You decide to use JSP to build an application in which customers may want
to modify (some of) your pages to develop their own look and feel. JSP is a
great choice, because it's standard and well known. Everybody is happy. Now
you add HTML mail notifications to your application. Customers may also want
to customise these, just as they did the web pages. But since these
notifications are not created during processing of a web request, there's no
request / response environment in which to invoke a JSP page. You have a
couple of choices - use a different templating language for mail
notifications, or make a URL request to a separate servlet that's there just
to invoke the JSP page. In the latter case, you'll likely want to add
security constraints so that external requests for that servlet can't be
made. Yuk.

2) You have a reporting web application that displays awesome reports and
charts to interactive users. Now you need to add the capability to generate
these reports in the background, because they may take a long time to
generate, and you want to be pro-active and cache them for the user.
Effectively, you're now back in the same scenario as (1), where you either
have to jump through hoops to be able to invoke a JSP page outside a request
/ response, or you need to choose a different templating language.

3) You have an application that is sufficiently dynamic that you need to be
able to generate page templates on the fly, and then invoke them. In a JSP
environment, you are now going to have to deploy the JDK, rather than just
the JRE, in a production environment, which will make a lot of IT people
very uncomfortable (if they allow it at all). In addition, you're going to
have to solve the "interesting" problem of where you can write the JSP files
to the disk such that the container will actually invoke them for you as JSP
pages. This is especially interesting if you need to do it in a portable
manner.

Don't get me wrong - I think JSP is great, especially in its 2.0 flavour, or
with JSTL. However, it has some serious limitations in certain application
scenarios. Most of its competitors, Velocity included, do not suffer from
these same kinds of issues.

--
Martin Cooper


"A.White" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Howdy

I am starting to develop an application using struts and have been
looking round the rest of the Jakarta project and came across the
Velocity project.

I was interested to see which which people recommended for a relative
newbie

Cheers

Andrew




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



Re: [ANNOUNCE] Struts 1.2.0 Test Build available

2004-02-27 Thread Martin Cooper

"Oswald Campesato" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
>
> Martin Cooper <[EMAIL PROTECTED]> wrote:
> >The Struts 1.2.0 Test Build is now available here:
> Excellent:)
> >http://www.apache.org/~martinc/struts/v1.2.0/
>
> >This is the first Struts build being made available following the same
> >test-and-release process that has been used successfully by the Tomcat
> >team for some time. It is *not* an official Apache release.
>
> >Once feedback has been collected on the stability and general quality of
> >this build, a determination will be made as to whether it should be
> >promoted to Alpha status.
>
>
> Is there a web page that describes the process by which feedback
> is collected?

Just the usual mechanisms:

* Bug reports: http://jakarta.apache.org/struts/using.html#Bugs
* Feedback on the mailing lists.

The former is preferred if you are sure there is a bug; the latter is where
to speculate and ask questions.

--
Martin Cooper


>
> Thanks,
>
> Oswald
>
>
> --
> Martin Cooper
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> -
> Do you Yahoo!?
> Get better spam protection with Yahoo! Mail




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



Re: [ANNOUNCE] Struts 1.2.0 Test Build available

2004-02-27 Thread Martin Cooper

"nicolas De Loof" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I've built Struts 1.2.0 from the sources package uising maven 1.0RC1
> without trouble.
>
> When I run "maven site", the generated m-target/docs has no "index.html"
> and "faqs", "proposals", "tiles" and "userGuide" are empty directory. Is
> this a known build problem (waiting for update for an *official* release)
?

As Joe has already mentioned, the use of Maven to build various parts of
Struts is an ongoing activity. All of the builds you see distributed from
Jakarta (nightly, release, and this test build) are still built using Ant.

Given that Maven still hasn't reached an official 1.0 release in almost 3
years of development, and given how stable and well-developed the Struts Ant
build system is (it's just as capable as Maven of building the entire
release, including docs, by issuing one command to a shell), I'm personally
in no great rush to switch. ;-)

That said, there are some intrepid Maven fans who are working on getting the
Maven build for Struts to the same point as the Ant build system, so don't
be surprised to see the issues you mention taken to heart and addressed
before an official release of Maven!

--
Martin Cooper


>
> Nico.
>
> Martin Cooper a écrit :
>
> >The Struts 1.2.0 Test Build is now available here:
> >
> >http://www.apache.org/~martinc/struts/v1.2.0/
> >
> >This is the first Struts build being made available following the same
> >test-and-release process that has been used successfully by the Tomcat
> >team for some time. It is *not* an official Apache release.
> >
> >Once feedback has been collected on the stability and general quality of
> >this build, a determination will be made as to whether it should be
> >promoted to Alpha status.
> >
> >--
> >Martin Cooper
> >
> >-
> >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: [ANNOUNCE] Struts 1.2.0 Test Build available

2004-02-27 Thread Martin Cooper

"Andrew Hill" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Ah I see.
> Its just the jars, tlds, dtds necessary for a struts app, sans docs.

Yup, that's it exactly. We've actually been releasing a 'lib' version for a
while now, for people who don't want to have to download the entire binary
version, since the latter is getting a bit big. The description of that does
seem to have fallen off the "Acquiring" page in the docs, though. ;-(

Also, it's worth noting that, due to some great work from Ted, the 1.2.0
binary download is about 25% smaller than the 1.1 equivalent, since several
of the sample web apps have been merged into one, thus demonstrating modules
as well.

--
Martin Cooper


>
> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]
> Sent: Friday, 27 February 2004 13:52
> To: Struts Users Mailing List
> Subject: RE: [ANNOUNCE] Struts 1.2.0 Test Build available
>
>
> Cool bananas!
>
> Many thanks to the struts team for all the work they have put into this
> build. :-)
>
> Whats the lib archive for?
>
> -Original Message-
> From: Martin Cooper [mailto:[EMAIL PROTECTED]
> Sent: Friday, 27 February 2004 13:48
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [ANNOUNCE] Struts 1.2.0 Test Build available
>
>
> The Struts 1.2.0 Test Build is now available here:
>
> http://www.apache.org/~martinc/struts/v1.2.0/
>
> This is the first Struts build being made available following the same
> test-and-release process that has been used successfully by the Tomcat
> team for some time. It is *not* an official Apache release.
>
> Once feedback has been collected on the stability and general quality of
> this build, a determination will be made as to whether it should be
> promoted to Alpha status.
>
> --
> Martin Cooper
>
> -
> 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: Problem with tags and overloaded methods

2004-02-27 Thread Martin Cooper

"Slattery, Tim - BLS" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > > I reiterate, I believe it's a bad idea to use the same
> > method name for
> > > two different property mappings.  If you can find some
> > documentation
> > > that recommends you do that, I'd like to see it.
> >
> > I believe Tim is referring to what is defined in section
> > 8.3.3 of the JavaBeans spec, "Indexed properties", which states:
> >
> > -
> > Thus an indexed property "foo" might be represented by four accessor
> > methods:
> >
> > public Bah[] getFoo();
> > public void setFoo(Bah a[]);
> > public Bah getFoo(int a);
> > public void setFoo(int a, Bah b);
>
> That's exactly what I'm thinking about. The functions that failed didn't
> look *exactly* like that though, their signatures looked like this:
>
> public ArrayList getFoo();
> public void setFoo(ArrayList a);
> public Bah getFoo(int a);
> public void setFoo(int a, Bah b);
>
> The unindexed getter and setter used an ArrayList instead of an array of
the
> base objects. On the page that worked, the unindexed getters and setters
did
> use an array of base objects. I can only guess that the property inspector
> in 1.3.1_10 is so extraordinarily picky that it won't accept the ArrayList
> but will accept an array of base objects.

Well, it's not supposed to work with anything other than an array, so if it
ever worked with an ArrayList, then I guess you were lucky - or is that
unlucky? ;-)

>
> I guess I could use the toArray method of ArrayList. I seem to remember
> having trouble with that method in the past, though.

Shouldn't be a problem - I've used it for exactly this purpose (although I'm
using JDK 1.4.2, not 1.3.1).

--
Martin Cooper


>
>
> --
> Tim Slattery
> [EMAIL PROTECTED]




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



Re: Problem with tags and overloaded methods

2004-02-26 Thread Martin Cooper

"Karr, David" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I reiterate, I believe it's a bad idea to use the same method name for
> two different property mappings.  If you can find some documentation
> that recommends you do that, I'd like to see it.

I believe Tim is referring to what is defined in section 8.3.3 of the
JavaBeans spec, "Indexed properties", which states:

-
Thus an indexed property "foo" might be represented by four accessor
methods:

public Bah[] getFoo();
public void setFoo(Bah a[]);
public Bah getFoo(int a);
public void setFoo(int a, Bah b);
-

IMO, what Tim is trying should work. I'd put the failure down to a buggy
introspection implementation, although it's possible that dropping in a
later version of Commons BeanUtils might work around it.

--
Martin Cooper


>
> WLS = "WebLogic Server".
>
> -Original Message-
> From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 26, 2004 12:35 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Problem with tags and overloaded methods
>
>
> > Just so it's clear, I'm assuming that you have the "get"
> > method overloaded, with the same method name being used for
> > two different properties (even if you consider them the same
> > conceptual property).
>
> > I would guess that's always a bad idea.
>
> Huh? I thought that's what we were supposed to do for indexed
> properties.
>
> > I'm somewhat
> > surprised that it works on one platform with the same
> > appserver, and doesn't on the other. Are they using the same
> > WLS version and JDK version?
>
> Hmm..the local server is using JDK  1.3.1_06, and the dev server is
> using 1.3.1_10. I don't know what WLS is.
>
> Hmm...we were warned that 1.3.1_10 was more picky that what we had been
> using on the dev server in parsing properties. I'll have to look closely
> at the page that works in both environments with no changes, I thought
> it was doing the same thing in a couple of places.
>
> --
> Tim Slattery
> [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: html:text works, bean:write fails

2004-02-26 Thread Martin Cooper

<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have a situation where I have not found a solution in the archives (I'm
> sure it is there, just don't know the right search), the documents (I have
> half dozen Struts books, plus the tomcat docs), and Google has not been my
> friend:
>
> I have a simple struts application where if I put the following in the JSP
> page, it works just fine (other than I don't want a text input field):
>
> 

This means "Go find the form bean associated with the enclosing HTML form,
then look up the property named 'totalInventory' on that form bean, and
render the value".

>
> but if I put the following:
>
> 

This means "Go find the bean (form bean or otherwise) named 'total', then
look up the property named 'totalInventory' on that form bean, and render
the value".

The difference is in the bean that is being referenced. Unless your form
bean happens to be named 'total', these two statements are referencing
completely different beans. If there is no bean named 'total' in scope, then
you would see exactly what you are seeing.

--
Martin Cooper


>
> it won't render the JSP page (just blank), unless I put ignore='true', in
> which case the page renders, but I also don't get the output.
>
> The taglibs are all referenced for both the struts-html and struts-bean
> taglibs. I have tried putting different scope references in the bean tag.
I
> have looked at the generated java code and they both appear to show up
> similarly.
>
> I am running Tomcat 5.0.19 with a jk2 connector to Apache2 2.0.48, Sun sdk
> 1.4.2_03, running on a PIII 866 Mhz, 256MB. Struts 1.1 (downloaded today,
> release binary).
>
> I look in my logs and I can see the bean being properly set (and it does
> properly display when using the html taglib). I am sure this is
> outrageously simple, but I spent over a solid day (and night) fighting
this
> and am getting nowhere.
>
> Any suggestions/questions welcome (yes, I already considered taking up
truck
> driving instead).




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



[ANNOUNCE] Struts 1.2.0 Test Build available

2004-02-26 Thread Martin Cooper
The Struts 1.2.0 Test Build is now available here:

http://www.apache.org/~martinc/struts/v1.2.0/

This is the first Struts build being made available following the same
test-and-release process that has been used successfully by the Tomcat
team for some time. It is *not* an official Apache release.

Once feedback has been collected on the stability and general quality of
this build, a determination will be made as to whether it should be
promoted to Alpha status.

--
Martin Cooper

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



Re: How to deploy a war file in Apache?

2004-02-03 Thread Martin Cooper

<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Can anyone guide me in how to deploy a .war file in Apache?

If you're referring to the Apache HTTPD web server, the answer is that you
can't do that, because it's not a Java servlet container. You need to
configure HTTPD to forward the relevant requests to something that knows
what to do with war files, such as Tomcat, Resin, Jetty, etc.

--
Martin Cooper


>
> Thanks,
> S.Srikanth




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



Re: Why doesn't ActionForm's constructor have access to HttpServletRequest?

2004-02-02 Thread Martin Cooper
I can't read Craig's mind ;-) , but I would say that the main reason an
ActionForm's constructor doesn't get passed the request (or anything else)
is because it is (intended to be) a form *bean*. One of the primary
characteristics of a JavaBean is that is that it must have a no-args
constructor. That allows it to be instantiated from anywhere. Passing a
request instance to the constructor presupposes that an ActionForm is
constructed only in the context of a request.

A secondary reason, in my mind, is that passing a request to the constructor
would encourage people to stash it away as member data, which would not be
too cool if the bean was created in session scope...

--
Martin Cooper


"Jeff Skubick" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Is the absence of a reference to the HttpServletRequest object that
triggered the creation of a new ActionForm object in its constructor a
historical artifact or oversight, or was it an intentional decision whose
motivation and rationale remains 100% valid and relevant today?

At the moment, I'm in a quandry. I see no way to usefully use nested form
beans to encapsulate administrable users in my web app without somehow
getting a hold of a list of objects representing those administrable users
from the session context of the user who's administering them (the list's
composition depends partially upon the user doing the administration) so I
can prepopulate the list for its initial display.

On the other hand, I'm worried that ActionForm's original creator was
absolutely determined to keep ActionForm's constructor from ever knowing
anything about the user or request that triggered its creation in the first
place for some reason, like Struts casually re-using old ActionForm
instances to satisfy new requests. On the other hand, I know it might just
be a historical artifact that seemed like a good idea at the time, but
doesn't really have any major implications either way.

So... if I implement my own RequestProcessor class that overrides the
default processActionForm method to call my own ActionForm-extending bean's
constructor an explicitly pass it a reference to the HttpServletRequest
object so it can fetch the HttpSession object and find the object that tells
it everything else it needs to know to pre-populate the form bean prior to
display, am I violating any sacred assumption made by other parts of Struts?
Or am I OK?




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



[FRIDAY] Re: What does "do" stand for in .do files

2004-01-30 Thread Martin Cooper

"Slattery, Tim - BLS" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > I am old enough to remember when Mark Zibykowski used to
> > stamp every DOS executable with MZ
>
> Umm..look again. Every *.exe file *still* begins with the letters MZ.

Yep. Mr. Zibykowski has now been reduced to "This program cannot be run in
DOS mode.". ;-)

--
Martin Cooper


>
>
> --
> Tim Slattery
> [EMAIL PROTECTED]




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



Re: does not work with IOException?

2004-01-30 Thread Martin Cooper
Um, you might want to try java.io.IOException instread of
java.lang.IOException... ;-)

--
Martin Cooper


"Song Qiu" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I use  to do global error handling. It works perfectly for
> ServletException. I can see the eror page displayed properly. But for
> IOException, It does not work, I can only see a blank page.
>
> Here is part of my web.xml:
> 
> 
> javax.servlet.ServletException
> /GenericErrorForward.jsp
> 
>
> 
> 
> java.lang.IOException
> /GenericErrorForward.jsp
> 
>
> Thanks.
>
> Song
>




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



PLEASE READ: Spam block

2004-01-29 Thread Martin Cooper
Folks,

I've requested a block on all those  messages, so it should quiet down
soon. Please, no more follow-ups on that thread - it only makes the noise
worse, and doesn't help anyone. We can all see there's a problem!

--
Martin Cooper




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



Re: Struts upload

2004-01-27 Thread Martin Cooper

"hhlow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> there is struts upload example in the struts download package
> u also can use the commons package.

You should avoid using Commons FileUpload yourself in a Struts application.
You'll only run into problems. File upload functionality is built into
Struts, and Struts itself uses Commons FileUpload. If you try to add another
layer of file upload functionality, you'll find yourself running into
problems with streams that have already been consumed by Struts.

--
Martin Cooper


>
> Clement
> - Original Message - 
> From: "Edgar Silva" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, January 27, 2004 7:52 AM
> Subject: Struts upload
>
>
> > Hi Folks...
> >
> >
> > Anybody can send to me any address of docs or articles, talking about
> Struts
> > uploads.
> >
> > since now...
> >
> > TIA
> >
> > Edgar
> >
> > _
> > MSN Hotmail, o maior webmail do Brasil.  http://www.hotmail.com
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >




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



Re: "multipart/form-data" causes request lost after forward

2004-01-19 Thread Martin Cooper

"Cadariu, Mihai" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi guys,
>
> I have 2 actions that are chained.

That's your first mistake. Chaining actions is generally a very bad idea.
The scenario you are seeing is just one reason. There are many, many threads
on this in the archives.

>
> In the first action I handle an upload, then I forward to the second
action.
> Here (in the second action), my request is gone (i.e. it's all empty).

Yes, it is indeed gone. The input stream was parsed, and consumed, when the
first request was processed, so it is no longer available for use by the
second action. This is just the way servlets work - it's not a Struts thing.

>
> I noticed this happens only when I have "multipart/form-data" encoding
type.

Yep.

> Now, I need this encoding for uploading, but yet I can't execute my second
> action.
>
> Can anyone please advise on how to proceed? Any workarounds? Thoughts...

The "workaround" is to not chain actions in the first place. You'll only
give yourself grief (as you have discovered).

--
Martin Cooper


>
> Many thanks,
> Mihai
>
>
> -- 
> The contents of this e-mail are intended for the named addressee only. It
> contains information that may be confidential. Unless you are the named
> addressee or an authorized designee, you may not copy or use it, or
disclose
> it to anyone else. If you received it in error please notify us
immediately
> and then destroy it.




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



Re: [General TagLib question] Custom TagLib storing value in PageContext/session and reference by Standard JSTL?

2004-01-16 Thread Martin Cooper

"Konrad" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thank you Martin!  :)
>
> Also, do you happen to know if this is possible:
>
>
>  end="">

This is not legal JSP (or XML) syntax. You cannot use a tag in the value of
an attribute of another tag.

You could, however, do something like this instead:




--
Martin Cooper


>
> 
>
> 
>
>
> When I use  outside of the 
> tag, it correctly displays the value.  However, when I
> try using  in the "end" attribute of
> , it keeps saying:
>
> "An exception occurred when trying to convert String
> '' into 'java.lang.Integer'." (null)
>
>  is trying to output an Integer value
> using the JspWriter, but it appears that it is always
> converted into text/String.
>
> Is there any way to accomplish the syntax/logic listed
> in the JSP code above?
>
> Thank you, and have a nice weekend!  :)
>
>
>
> --- Martin Cooper <[EMAIL PROTECTED]> wrote:
> >
> > "Konrad" <[EMAIL PROTECTED]> wrote in message
> >
> news:[EMAIL PROTECTED]
> > > Hello.
> > >
> > > In my custom taglib's doStartTag() method, I
> > stored a
> > > value in the session, as follows:
> > >
> > > CustomTag
> > > =====
> > > public void doStartTag() {
> > >
> > >
> > >
> >
> this.pageContext.getSession().setAttribute("endIdx",new
> > > Integer(9));
> >
> > Try this instead:
> >
> > pageContext.setAttribute("endIdx", new
> > Integer(9),
> > PageContext.SESSION_SCOPE);
> >
> > --
> > Martin Cooper
> >
> >
> > > }
> > >
> > >
> > > I am trying to reference that value in JSTL's
> > >  tag, as in the following .jsp snippet:
> > >
> > >
> > > test.jsp
> > > 
> > >
> > >   
> > >
> > >  > > end="${endIdx}">
> > >
> > > 
> > >
> > >
> > > Basically, above, I am trying to dynamically set
> > the
> > > ending index of the forEach tag, based on the
> > value
> > > calculated in CustomTag.
> > >
> > > However, forEach's "end" attribute is resolving to
> > 0
> > > instead of 9, which was set in the CustomTag's
> > > doStartTag() method.
> > >
> > > Is there a way to ensure that CustomTag executes
> > "in
> > > advance" such that forEach's "end" tag can
> > correctly
> > > reference the value set in the session?
> > >
> > > Thank you.
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
>
>
> __
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing.
> http://photos.yahoo.com/




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



Re: [General TagLib question] Custom TagLib storing value in PageContext/session and reference by Standard JSTL?

2004-01-16 Thread Martin Cooper

"Konrad" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello.
>
> In my custom taglib's doStartTag() method, I stored a
> value in the session, as follows:
>
> CustomTag
> =
> public void doStartTag() {
>
>
> this.pageContext.getSession().setAttribute("endIdx",new
> Integer(9));

Try this instead:

pageContext.setAttribute("endIdx", new Integer(9),
PageContext.SESSION_SCOPE);

--
Martin Cooper


> }
>
>
> I am trying to reference that value in JSTL's
>  tag, as in the following .jsp snippet:
>
>
> test.jsp
> 
>
>   
>
>  end="${endIdx}">
>
> 
>
>
> Basically, above, I am trying to dynamically set the
> ending index of the forEach tag, based on the value
> calculated in CustomTag.
>
> However, forEach's "end" attribute is resolving to 0
> instead of 9, which was set in the CustomTag's
> doStartTag() method.
>
> Is there a way to ensure that CustomTag executes "in
> advance" such that forEach's "end" tag can correctly
> reference the value set in the session?
>
> Thank you.
>
>
> __
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing.
> http://photos.yahoo.com/




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



Re: Still having problems with File upload (multipart-formdata)

2003-12-29 Thread Martin Cooper

"Brice Ruth" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm refactoring (so to speak) my currently working form, which accepts
> an image to be uploaded, to use a DynaValidator(Action?)Form and I'm
> again running into an exception being thrown:
>
> java.lang.NoClassDefFoundError:
> org/apache/commons/fileupload/FileUploadBase$SizeLimitExceededException

This usually happens when your container has another copy of (a different
version of) the Commons FileUpload jar file, and you are not putting all of
your application's jar files in your WEB-INF/lib directory, so that the
wrong jar file is being loaded. Just make sure that your web app is
self-contained and you should be fine.

>
> What's going on here?! Also, to get more mileage out of this post, what
> exactly is the difference between a DynaValidatorForm and a
> DynaValidatorActionForm?!

I believe the only difference is in the key passed to the Validator. The
former uses the value of the 'name' attribute from struts-config.xml, while
the latter uses the value of the 'path' attribute. (But no, I don't know
when you would choose one over the other. ;)

--
Martin Cooper


>
> -- 
> Brice D. Ruth
> Sr. IT Analyst
> Fiskars Brands, Inc.




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



Re: [OT] Who owns Eclipse

2003-12-26 Thread Martin Cooper
Neither. IBM originally created Eclipse, but then donated it to the open
source community. See:

http://www.ibm.com/news/us/2001/11/05.html

My understanding is that Eclipse grew out of IBM's VisualAge for Java
project.

--
Martin Cooper


"Ramadoss Chinnakuzhandai" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi,
   Is Eclipse owned by IBM or bought by IBM?

Any idea?

-Ram




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



Re: File Upload

2003-12-26 Thread Martin Cooper
What is it that you are trying to do? Is there a reason you can't just use a
FormFile object in your form bean? That would make your life a whole lot
easier - you wouldn't have to know or care about the request wrapper, and
you wouldn't have to iterate over the uploaded fields.

Also, I'm not sure where you're getting what you're trying to use in the
code you posted. Are you trying to write a Struts app or a WebWork app?
ServletActionContext is a WebWork class, not a Struts class, and
getFileNames() and getFilesystemName() are WebWork methods as well, and not
available on the Struts MultipartRequestWrapper class.

Something is very wrong...

--
Martin Cooper


"Jacob Ginu" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> This is the sample code I am using in the action.java file.I have the
necessary struts file.But it says Unable to find ServletActionContext in
MultipartRequestWrapper when compiled.
>
> MultipartRequestWrapper multiWrapper =
> (MultipartRequestWrapper)
> ServletActionContext.getRequest();
>
> Enumeration e = multiWrapper.getFileNames();
> while(e.hasMoreElements()) {
>// get the value of thisinput tag
>StringinputValue = (String) e.nextElement();
> // get the content type
>StringcontentType = multiWrapper.getContentType(inputValue);
> // get the name of the file from the input tag
>StringfileName = multiWrapper.getFilesystemName(inputValue);
> // Get a File object forthe uploaded File
>File file = multiWrapper.getFile(inputValue);
> // If it's nullthe upload failed
>if(file == null) {
>   addActionError("Error uploading: "+
> multiWrapper.getFilesystemName(inputValue));
>}
>
>
> David Friedman <[EMAIL PROTECTED]> wrote:
> Why won't you use the struts-upload.war from the Struts distributions?
>
> Regards,
> David
>
> -Original Message-
> From: Jacob Ginu [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 23, 2003 9:48 PM
> To: [EMAIL PROTECTED]
> Subject: reg:File Upload
>
> Hi,
>
> Can anyone send me a sample file Upload program.
>
> Regards,
> Ginu
>
> -
> Do you Yahoo!?
> Yahoo! Photos - Get your photo on the big screen in Times Square
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> Do you Yahoo!?
> Yahoo! Photos - Get your photo on the big screen in Times Square




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



Re: Tags between custom tags not evaluating

2003-12-15 Thread Martin Cooper
What value are you using in the  element for your 'checkLogon'
tag (in the TLD)? It should be 'JSP' to have the content evaluated as JSP.

--
Martin Cooper


"Andy Engle" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Hookom, Jacob" <[EMAIL PROTECTED]> wrote:
>
> > I don't see the:
> >
> > <%@ taglib uri="/tags/struts-html" prefix="html" %>
>
> Below is the entire JSP file.
>
>
> Andy
>
> ---
>
> <%@ page contentType="text/html" %>
> <%@ taglib uri="/WEB-INF/app.tld"   prefix="app"   %>
> <%@ taglib uri="/WEB-INF/struts-html.tld"   prefix="html"  %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld"   prefix="bean"  %>
> <%@ taglib uri="/WEB-INF/struts-tiles.tld"  prefix="tiles" %>
> <%@ taglib uri="/WEB-INF/struts-logic.tld"  prefix="logic" %>
>
>
> 
>   
>   
>   
>
>   
>
> 
>
> 
>
>
> 
>
>   
> Username: 
> 
> Password:  maxlength="10" redisplay="false"/>
> 
>
> 
> 
>   
>
> 
>
>
>
> 
> How about looking at our list of /userList.do">users?
>
> 
>
> 
>   It appears that you are logged in already.
> 
>
> 
>
> 
> 
>   
> Username:
> 
>   
>   
> 
>   
>
>   
> Password:
> 
>  redisplay="false"/>
> 
>   
>
>   
> 
>   
>
>   
> 
>   
> 
> 
>   
> 
>   
> 
> 
> 
>
> 
>
>   
>   
>
> 




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



Re: [OT] I didn't know Struts was an "antipattern"

2003-12-15 Thread Martin Cooper
It would be nice if the author could at least spell Craig's name
correctly...


"Robert Taylor" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> A coworker sent me this link and said it was an interesting read.
>
> http://today.java.net/pub/a/today/2003/12/11/mvc.html?page=1
>
> Personally I don't think the author put much research into Struts or
> Java Server Faces (which he doesn't mention at all) before writing
> this article which has some interesting points and history about MVC, but
> basically
> is written to support his new ground breaking Shocks Servlet Framework.
>
>
> robert




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



Re: Can large upload cause tomcat hanging?

2003-12-10 Thread Martin Cooper

"Lukas Bradley" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > > Understood, but this is a Jakarta rule, not a standard Internet rule.
> > You cross-posted to at least two Jakarta mailing lists. The rule
applies.
>
> I cross posted nothing.  Zsolt did.

Sorry - I wasn't paying proper attention to senders. ;-)

--
Martin Cooper


>   I was just wondering why people are
> extremely sensitive about what I consider to be valid cross posts.
>
> Lukas




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



Re: Can large upload cause tomcat hanging?

2003-12-10 Thread Martin Cooper

"Lukas Bradley" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> > http://jakarta.apache.org/site/mail.html
> > http://www.catb.org/~esr/faqs/smart-questions.html#forum
>
> > The first lists the rules you agreed to abide by when you subscribed to
> the
> > list. This includes the rule "Do not cross post messages".
>
> Understood, but this is a Jakarta rule, not a standard Internet rule.

You cross-posted to at least two Jakarta mailing lists. The rule applies.

--
Martin Cooper


>
> The second URL you posted about smart questions states to not "cross-post
to
> too many different newsgroups."   "Too many" is very different than an
> absolute "never."
>
> Lastly, you must admit that I have a point to the previous statement about
> how an answer could only be answered across multiple forums.  I've had
very
> advanced questions in the past where the only solution was to cross-post.
> If not abused, it can be very helpful.
>
> Lukas




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



Re: Can large upload cause tomcat hanging?

2003-12-10 Thread Martin Cooper

"Lukas Bradley" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > First of all, do *not* cross-post your questions to multiple lists. I'm
> > going to reply here and ignore your cross-post to commons-user.
>
> Why not?  I've really never understood why people get upset about this.
If
> the answer may be produced by an investigation or knowledge by Struts
users,
> Tomcat users, or commons users, why not?  The Struts users may be wholely
> ignorant of the underlying Tomcat file/IO restrictions, but the
> Struts/Commons upload mechanism is directly to bear on the problem.
>
> Please clear this up, if you would.

Read these:

http://jakarta.apache.org/site/mail.html
http://www.catb.org/~esr/faqs/smart-questions.html#forum

The first lists the rules you agreed to abide by when you subscribed to the
list. This includes the rule "Do not cross post messages".

--
Martin Cooper


>
> Lukas




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



Re: Can large upload cause tomcat hanging?

2003-12-10 Thread Martin Cooper
First of all, do *not* cross-post your questions to multiple lists. I'm
going to reply here and ignore your cross-post to commons-user.

I have uploaded files much, much larger than 70MB without any problems. Try
using the struts-upload example, and see if you still have problems. If you
do, you have a system issue; otherwise you must be doing something
differently from the example that's causing the problem. Also, are you
really using a version 1.2 JRE? Can you try something a bit more, um,
modern?

--
Martin Cooper


"Zsolt Koppany" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I uploaded a 70Mb file using struts-1.1. The JVM process (jre-1.2.4_02,
> Linux, SuSe-8.1) got much larger and a couple of hours later tomcat didn't
> react to the most of the events. What can be the reason?
> Additionally I found strange the tomcat didn't create the localhost_log...
> files since the last startup.
>
> Here I are the data provided by "top":
>
> SIZE: 175M RSS: 165M SHARE: 38980 STAT: S N %CPU: 0.0% %MEM: 33.3 TIME
0:05
>
> The machine has 512Mb.
>
> Zsolt




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



Re: Stupid Bean tricks

2003-12-05 Thread Martin Cooper
Assuming your User object is stored in the request under the key "user", the
language you want is "en" (English), and the UserData property you want is
"message", you would do:

  

--
Martin Cooper


"Joe Hertz" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I considered that, but (and I'm an utter newbie so I apologize here)
>
> How would I refer to an element of UserData in a  tag?
>
> > -Original Message-
> > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Martin Cooper
> > Sent: Friday, December 05, 2003 12:32 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Stupid Bean tricks
> >
> >
> > Why not convert your Set into a Map keyed by language / locale? Then
> > get(locale) is effectively provided for you.
> >
> > --
> > Martin Cooper
> >
> >
> > "Joe Hertz" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> oss.local...
> > Probably a very basic question, and infinitely dealableI hope.
> >
> > I have a User object, which itself contains a Set of UserData objects
> > (the UserData is stuff that needs to be multilingual. Each instance
> > has the part of the user's data that would vary when presented in each
>
> > language).
> >
> > So, in my JSP, how do I get to a specific instance of UserData? I can
> > write a getter than could take a locale or even just a language code,
> > but since it's not a numeric, the taglib chokes on it, or at least it
> > appears to
>
>
>
>
> -
> 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: Stupid Bean tricks

2003-12-05 Thread Martin Cooper
Why not convert your Set into a Map keyed by language / locale? Then
get(locale) is effectively provided for you.

--
Martin Cooper


"Joe Hertz" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Probably a very basic question, and infinitely dealableI hope.
>
> I have a User object, which itself contains a Set of UserData objects
> (the UserData is stuff that needs to be multilingual. Each instance has
> the part of the user's data that would vary when presented in each
> language).
>
> So, in my JSP, how do I get to a specific instance of UserData? I can
> write a getter than could take a locale or even just a language code,
> but since it's not a numeric, the taglib chokes on it, or at least it
> appears to




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



Re: White Space

2003-12-05 Thread Martin Cooper
The catch with this is that you have to take account of things like 
tags and JavaScript string literals. A naive whitespace collapsing filter is
likely to be a buggy one. ;-)

--
Martin Cooper


"Wendy Smoak" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Derek Clarkson wrote:
> Is there anyway to automatically remove white space blank
> lines and tabs, but
> still leave normal lines in place so i can read the html if
> necessary. I.e.
> remove any occurances of the following:
> 1. Empty lines including those just filled with tabs.
> 2. All other tabs.
> 3. Trailing white space.

Sounds like a job for a Filter!  You'd modify the HTML after it leaves
the Struts webapp, before it leaves the container on its way to the
browser.  I suspect someone has written this already...

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management




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



Re: Disadvantages of Struts?

2003-12-04 Thread Martin Cooper

"Robert H. Tran" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I think an action's mapping is a decision by the action itself. Like I
said
> earlier, when an application development finishes, that decision will
become
> static. At that point, when an Action's mapping changes, its code will
have
> to change too (unless the new mapping is kind of a synonym to the old
> mapping, which doesn't bear any shift in the semantics). As such, there is
> almost no point in keeping the decision and the code separate (i.e. making
> the decision's configuration a loose end of the code). Or at least,
> configuration shouldn't be the only way to add or modify an Action.

I disagree with this almost completely. If actions are written properly, you
should be able to reconfigure the application, to some extent at least, by
changing the config alone and not touching the Java code. This is immensely
useful when an app needs to be customised after the fact, and when the
source code is not available (e.g. by a customer, in their own environment).

--
Martin Cooper


>
> Even though each Action's configuration may be small, the configurations
for
> all the Actions need to be kept track of and maintained (for integrity).
> That may be a significant but unnecessary side work. To view the mappings,
> there can be a tool to traverse the structure by api calls and display it.
> That can be done after the fact and doesn't have to be before it. In
> addition to that, when the decision (or configuration if any) goes where
the
> code lives, modularity increases.
>
> IMHO,
>
> - Robert.
>
>
> - Original Message - 
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, December 04, 2003 6:55 AM
> Subject: RE: Disadvantages of Struts?
>
>
> I have to disagree with you on the first point. I find that there is
> just a small amount of necessary configuration required to build an
> Action class (most of my Action configurations have about a half dozen
> lines, even less if there is no associated ActionForm). I'm not really
> sure what you mean by "paddle back and forth between the code and the
> configuration", could you explain?
>
> Thanks.
>
> Robert H. Tran wrote:
> > I am not sure that is true. Struts seems to lack of an API. IMO, there
> are
> > more required configurations than necessary. Take Action for example,
> to
> > write an Action, one has to paddle back and forth between the code and
> the
> > configuration. It is like an executable having to configure each of
> its
> > dlls. The visibility of the mappings is nice to have but the mappings
> can
> > be generated after the fact as in a debugging view. When the
> application is
> > finished, configurations become static. But since configurations are
> > required, they will be like loose ends of the application. Another
> issue:
> > how can one componentize his code and deploy it in a self-contained
> plug-in,
> > as with Eclipse? Please forgive my novice.
> >
> > - Robert.
> >
> > - Original Message - 
> > From: "Rick Hightower" <[EMAIL PROTECTED]>
> > To: "'Struts Developers List'" <[EMAIL PROTECTED]>
> > Sent: Wednesday, December 03, 2003 6:24 PM
> > Subject: RE: Disadvantages of Struts?
> >
> >
> >
> >>Don't be silly. Struts is perfect.
> >>
> >>-Original Message-
> >>From: Robert H. Tran [mailto:[EMAIL PROTECTED]
> >>Sent: Wednesday, December 03, 2003 2:10 PM
> >>To: Struts Developers List
> >>Subject: Disadvantages of Struts?
> >>
> >>I just wonder if Struts comes with any significant drawback. I mean
> not in
> >>terms of when to use Struts and when not to use it necessarily, but
> more
> >
> > in
> >
> >>the line of anyone's wishes that it had been better. Any advice is
> very
> >>appreciated.
> >>
>
>
>
>
>
>
> --
--
> 
>
>
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]




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



Re: [OT] RE: File Download?

2003-12-04 Thread Martin Cooper

"Jerry Jalenak" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Jacob,
>
> Thanks for the help.  I need to review the business requirements (again!)
> and make sure that we are going down the right path.  I'm not sure a .zip
> file will meet the clients needs; I'm also not sure that requiring them to
> download each file individually will work for them either.

One thing you could do, if you don't like either of those options, is to
write either an applet or an ActiveX control (or both) that retrieves a zip
file from the server and upzips it to a user-specified location on the
client's machine. I believe that's probably as good as it can get, since
there's no standard mechanism for multi-file downloads from a single
request.

--
Martin Cooper


>
> Thanks again.
>
> Jerry Jalenak
> Development Manager, Web Publishing
> LabOne, Inc.
> 10101 Renner Blvd.
> Lenexa, KS  66219
> (913) 577-1496
>
> [EMAIL PROTECTED]
>
>
> > -Original Message-
> > From: Hookom, Jacob [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, December 04, 2003 9:32 AM
> > To: Struts Users Mailing List
> > Subject: [OT] RE: File Download?
> >
> >
> > That won't work (I don't believe so anyways).
> >
> > You are better off displaying a page with a list of links to
> > these files and
> > generate each one separately on a per request basis.  The
> > other thing to
> > maybe look at is generating the file data as separate files, then use
> > common's compress:
> >
> > http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/compress/
> >
> > To stream back a single zip.  I think onjava or google might
> > have an article
> > on creating zip files.
> >
> > The other thing to do is if you are using servlet 2.3 spec
> > with filters,
> > look at using a gzip filter to speed up downloads from your
> > application.
> > Javaworld has an article on this with sample code from Jason Hunter.
> >
> > Jacob Hookom
> > Senior Analyst/Programmer
> > McKesson Medical-Surgical
> > Golden Valley, Minnesota
> > http://www.mckesson.com
> >
> > -Original Message-
> > From: Jerry Jalenak [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, December 04, 2003 9:29 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: [OT] RE: File Download?
> >
> > Jacob -
> >
> > Knew it had to be something easy  8-)
> >
> > Second question - One of my requirements is that my users
> > need to ability to
> > select multiple files from a list of available files.  I need
> > to be able to
> > store each selected file individually on their hard drive.  Using your
> > approach, can I flush the response buffer between each file
> > in order to do
> > this?  Something along these lines:
> >
> > 
> >
> > get the requested filename(s)
> > while (more filenames)
> > {
> > retrieve the file
> > set the content type
> > set the header
> > flush the response buffer (leaving the connection open)
> > }
> >
> > 
> >
> > Thanks!
> >
> > Jerry Jalenak
> > Development Manager, Web Publishing
> > LabOne, Inc.
> > 10101 Renner Blvd.
> > Lenexa, KS  66219
> > (913) 577-1496
> >
> > [EMAIL PROTECTED]
> >
> >
> > > -Original Message-
> > > From: Hookom, Jacob [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, December 04, 2003 9:04 AM
> > > To: Struts Users Mailing List
> > > Subject: [OT] RE: File Download?
> > >
> > >
> > > This is what we use for file downloads (Excel/PDF files).
> > >
> > > String contentType = this.beanWriter.getContentType();
> > > response.setContentType(contentType);
> > > response.setHeader("Content-Disposition","attachment;filename=\""
> > > + this.beanWriter.getFileName(request) + "\"");
> > >
> > > And have your struts action return null.
> > >
> > > -Jacob
> > >
> > > -Original Message-
> > > From: Jerry Jalenak [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, December 04, 2003 9:05 AM
> > > To: '[EMAIL PROTECTED]'
> > > Subject: File Download?
> > >
> > > I have a need to send generated image files from my web
> > > server to a file
> > > stored on a users local hard drive - ie file download.  I've
> > > been googling
> > > now for awhile and hav

Re: Database

2003-12-03 Thread Martin Cooper

"Dynamic Systems" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Another problem. I've setup a database connection in the
struts-config.xml.
> Is the  position correct?

No.

http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd

--
Martin Cooper


> I'm getting the following error:
>
> Cannot find ActionMappings or ActionFormBeans collection
>
> Take a look at the file:
>
> 
>  "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
> "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
>
> 
>
> 
> 
>type="org.struts.example.StrutsInputForm" />
>type="org.struts.example.StrutsDisplayForm" />
> 
>
> 
>   
> 
>
> 
>
> 
>   type="org.struts.example.StrutsInputAction"
>  name="StrutsInputFormBean"
>  scope="request" input="/PgInput.jsp">
>   
> 
>
>   type="org.struts.example.StrutsDisplayAction"
>  name="StrutsDisplayFormBean"
>  scope="request" input="/PgDisplay.jsp" >
> 
>
> 
>
> 
> 
> 
>  />
>property="key"
>   value="databasename" />
>property="url"
>   value="jdbc:mysql://localhost/databasename" />
>property="username"
>   value="userxxx" />
>property="password"
>   value="passxxx" />
>property="maxActive"
>   value="10" />
>property="maxWait"
>   value="5000" />
>property="defaultAutoCommit"
>   value="false" />
>property="defaultReadOnly"
>   value="false" />
>property="validationQuery"
>   value="SELECT COUNT(*) FROM TEST" />
> 
> 
>
> 




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



Re: getParameter() returns null on multipart requests

2003-11-24 Thread Martin Cooper

"David Friedman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Martin,
>
> I don't know if Terry got it working, but I don't see why he (or anyone)
> couldn't keep it simple by using a CommonsMultiPartRequestWrapper's
> getTextElements() or getAllElements() methods, liks so:

Why is duplicating the work "keep[ing] it simple"? Struts does all of the
parsing behind the scenes for you, and makes all of the parameters available
to you. The example code you posted does pretty much the same things that
the Struts code does behind the scenes, but by the time your action is
invoked, Struts has done it already, without you having to implement any
file upload functionality in your actions. (In fact, I'm not sure I
understand how your code can work, given that Struts will already have
parsed the input stream, making it unavailable to a second parse.)

--
Martin Cooper


>
> // Assuming wrapper is the initialized CommonsMultiPartRequestWrapper
> Hashtable textElements = wrapper.getTextElements();
> String paramOne[] = (String)textElements.get("One");
>
> // OR  (Note the String array in both examples)
>
> Hashtable allElements = wrapper.getAllElements();
> String paramOne[] = (String)allElements.get("One");
>
> Both code works if you add it to the example code I uploaded Saturday:
> www.mail-archive.com/[EMAIL PROTECTED]/msg87269.html
>
> Regards,
> David
>
> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Martin Cooper
> Sent: Monday, November 24, 2003 6:03 PM
> To: [EMAIL PROTECTED]
> Subject: Re: getParameter() returns null on multipart requests
>
>
>
> "Terry Brick" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hello,
> > When I submit a multipart form to my action I am
> > unable to get use getParameter() on the request object
> > to get my form field values.  As I understand it
> > struts is supposed to automatically create a
> > MultipartRequestWrapper which allows you to do this
> > for multipart requests...
> > I've seen some postings regarding this, but I still
> > don't understand what I need to do.  I think there was
> > some mention that MultipartRequestWrapper doesn't work
> > right if you're not utilizing the ActionForm?
>
> It still works, but it won't do as much for you behind the scenes. ;-)
>
> From within an Action, using getParameter() should still work for regular
> (i.e. non-file) items, because the request object passed to the Action is
> the wrapped request. If you're calling that method from somewhere else, it
> may or may not work, depending on whether or not you have a wrapped
request.
> (In many places, you will not have a wrapped request, because the Servlet
> 2.2 spec does not permit such a thing, and Struts 1.x is Servlet 2.2
> compatible.)
>
> --
> Martin Cooper
>
>
> >
> > I also tried instantiating my own
> > MultipartRequestWrapper by doing "new
> > MultipartRequestWrapper(request)".  That doesn't solve
> > the problem either.
> >
> > Any ideas? I'm using the latest nightly build (Struts
> > 1.2).
> >
> > Thanks!
> >
> >
> > __
> > Do you Yahoo!?
> > Free Pop-Up Blocker - Get it now
> > http://companion.yahoo.com/
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




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



Re: getParameter() returns null on multipart requests

2003-11-24 Thread Martin Cooper

"Terry Brick" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
> When I submit a multipart form to my action I am
> unable to get use getParameter() on the request object
> to get my form field values.  As I understand it
> struts is supposed to automatically create a
> MultipartRequestWrapper which allows you to do this
> for multipart requests...
> I've seen some postings regarding this, but I still
> don't understand what I need to do.  I think there was
> some mention that MultipartRequestWrapper doesn't work
> right if you're not utilizing the ActionForm?

It still works, but it won't do as much for you behind the scenes. ;-)

>From within an Action, using getParameter() should still work for regular
(i.e. non-file) items, because the request object passed to the Action is
the wrapped request. If you're calling that method from somewhere else, it
may or may not work, depending on whether or not you have a wrapped request.
(In many places, you will not have a wrapped request, because the Servlet
2.2 spec does not permit such a thing, and Struts 1.x is Servlet 2.2
compatible.)

--
Martin Cooper


>
> I also tried instantiating my own
> MultipartRequestWrapper by doing "new
> MultipartRequestWrapper(request)".  That doesn't solve
> the problem either.
>
> Any ideas? I'm using the latest nightly build (Struts
> 1.2).
>
> Thanks!
>
>
> __
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/




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



Re: Which framework to choose?

2003-11-18 Thread Martin Cooper

"Ted Husted" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Personally, I consider MVC frameworks to be commodities. It doesn't
> really matter which you use use. The real point of the exercise is to
> treat web applications like applications, rather than some throwaway hack.
>
> Which framework is best for a particular project is going to depend on
> the project, and more importantly, the people working on the project.
> Most any tool can do the job, so long as the people using the tool
> *want* to make it so.
>
> Right now, I'm using Struts on some projects and Maverick on others.

Could you say a little about how you would choose one of these over the
other? (I do mean "you" and not "one" - I'm interested in your personal
experience-based opinion. ;)

--
Martin Cooper


> It's all the same to me. I push as much of the work back to the business
> layer as possible, so the frameworks boil down to adapters. The question
> to ask is not "am I using the 'right' framework now", but "how easy
> would it be to switch to another framework later".
>
> No one can make tomorrow's decision today. All you can do is try and
> design applications that can adapt to tomorrow when it comes.
>
> Right now, wafer is tracking over twenty different Java frameworks.
>
> http://www.waferproject.org/index.html
>
> Each of which have their own special talents. JPublish, for example, is
> great for content management. Sofia has dynamite Dreamweaver support.
> And so forth.
>
> Of course, the best part is that these frameworks are not mutually
> exclusive. It all comes down to HTTP. You can have as many of these
> frameworks working in a web application as you like.
>
> It's not an election of remedies, it's an embarrassment of riches.
>
> -Ted.
>
> [EMAIL PROTECTED] wrote:
> > Hi all,
> >
> > Altough this might not be the right place to ask, but I'm just curious.
> >
> > Recently I see a lot of different frameworks which pretty much promise
the
> > same functionality as the Struts framework.
> >
> > For instance I found:
> >
> > struts
> > webwork
> > Spring
> > etc...
> >
> > Which one is the best? I have been using Struts for some time now... But
> > maybe some other framework has more future then Struts.
> > I would like to hear your opionions...
> >
> > Thanks,
> >
> > Regards,
> >
> > Harm de Laat
> > Informatiefabriek
> > The Netherlands
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -- 
> Ted Husted,
>Junit in Action  - <http://www.manning.com/massol/>,
>Struts in Action - <http://husted.com/struts/book.html>,
>JSP Site Design  - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.




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



Re: Upload File question

2003-11-17 Thread Martin Cooper

"Indra Gunawan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> I am using a multipart form that contains form data and one input type
file
> to upload data  I also write a servlet to capture those values , but
> strange ... not all form data captured and the stream from input type file
> is available ...

You don't need to write a servlet for that. Struts includes file upload
functionality "out of the box". All you need to do is define the appropriate
fields in your ActionForm.

--
Martin Cooper


>
> Can I use that combination ? Or should I separate the form data part and
> input type file part in another form ... for example popup ...
>
> But if there is a way , I prefer to combine them :)
>
> Thanks
>
> Indra




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



Re: File upload problem with Struts 1.1

2003-11-12 Thread Martin Cooper
This usually happens when you have your jars in the wrong place and your
container also includes (a different version of) FileUpload. Make sure that
the Commons FileUpload jar file, as well as the Struts jar file and other
Commons jar files, are in your WEB-INF/lib directory, and not in a
container-specific lib directory.

--
Martin Cooper


"Raman Garg" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi,

 We are getting error while file uploading using struts 1.1. We have a demo
code for file uploading which demostrates the file uploading using struts.
When we run there application code works fine but  when we submit the form
by setting enctype for the form it throws the following error. (Remember we
are not doing anything in the action or in the form just getteer and
setters) so issue is with enctype settings. It may use some internal class
while sending data using enctype. Please advise us what to do.

We downloaded the sample file uploading code from :
http://forum.exadel.com/viewtopic.php?t=120

But according to me the problem can be with setting of enctype.

follwoing is the  code for our form











java.lang.NoSuchMethodError:
org.apache.commons.fileupload.FileUpload.setSizeMax
(I)V
at
org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest
(CommonsMultipartRequestHandler.java:219)
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1055)
at org.apache.struts.action.RequestProcessor.processPopulate
(RequestProcessor.java:798)
at org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:254)
at org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1422)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
com.tavant.lg.controller.servlet.LoanGeniusFrontControllerServlet.service
(LoanGeniusFrontControllerServlet.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1053)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:387)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:305)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run
(WebAppServletContext.java:6291)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs
(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs
(SecurityManager.java:97)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet
(WebAppServletContext.java:3575)
at weblogic.servlet.internal.ServletRequestImpl.execute
(ServletRequestImpl.java:2573)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)

==


Any Suggestion or help will be highly appreciated.


Best Regards
Raman Garg




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



Re: Basic JSTL Question...

2003-11-06 Thread Martin Cooper

"Jacob Wilson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi...
> I would appreciate if someone out there helps me with these basic JSTL
questions...

JSTL questions should be addressed to taglibs-user, not struts-user. Please
respect the focus of this list, and any others you subscribe to.

--
Martin Cooper


>
> 1. In c:foreach how do I check whether the collection contains values???
When it has values, it iterates a loop fine... Now, if I want to specify 'No
records' how do I do that???
>
> 2. How do I check condition.s.. for eg.
>
> I wanna alternate row colors... when I do  this, it doesn't work...
> 
>   
> 
> 
>   
> 
> Wat's the right way to do this???
>
> Thanx.
> -Jacob
>
>
>
> -
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard




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



Re: OT - what is a blonk

2003-11-06 Thread Martin Cooper

<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> This is off topic but I couldn't wait til casual friday...

Please respect the custom of the list and keep this type of post OFF the
list until it IS Friday. That way, people are more likely to respect you in
return.

--
Martin Cooper


>
> I have the following problem in my web-app.
>
> When I try and get a blonk off of the bloon-arg processor my ding-dong
> crashes and I get a knack-trace that says
>
> "unable to agnagle blonk in any rope - what is a blonk?"
>
> I have the following line in my struts-config:
>
> 
>
> My question is: "Who won the FA cup in 1959?"
>
> Thanks for all your help.
>
>
> Heya Gosper
> CSC Australia
> 212 Northbourne Ave, Braddon ACT 2612
> Ph: +61 (0) 2 6246 8155  Fax: +61 (0) 2 62468100
> MOB: 0401 611779
> --
--
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery. NOTE: Regardless of content, this e-mail shall not operate to
> bind CSC to any order or other contract unless pursuant to explicit
> written agreement or government initiative expressly permitting the use of
> e-mail for such purpose.
> --
--
>




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



Re: declaring action mappings at runtime

2003-10-29 Thread Martin Cooper

"Ahmet ISIK" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> thanks Martin,
> I have found a solution. I have acquired module config by
> Globals.MODULE_KEY key from app context. Then I added programmatically
> configured ActionMappings to module config object. after that it is
> possible to use those action mappings. Is this a bad practice?

Where are you doing this? (And why?)

If you're doing it in a plug-in, then I believe it will work, but I don't
see how that would be any more "dynamic" than adding them to your Struts
config file. (Also in that case, you are already passed the module config,
so you wouldn't need to look it up, as you mentioned you are doing.)

If you're doing it outside of a plug-in, then I'm puzzled. Once Struts loads
the config, it freezes it and throws IllegalStateException if you attempt to
modify it.

--
Martin Cooper


>
> Martin Cooper wrote:
> > "Ahmet ISIK" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >
> >>Hi,
> >>Is it possible to declare struts action mappings at runtime, and how?
> >
> >
> > No, it's not possible. The config is read in at application startup and
is
> > then frozen. (The reason it's done this way is so that access to the
config
> > does not need to be synchronised once the app is up and running, thus
> > leading to much improved overall performance.)
> >
> > --
> > Martin Cooper
> >
> >
> >
> >>Thanks in advance
> >>
> >>-- 
> >>Ahmet ISIK
> >>Ideal Teknoloji Bilisim Çözümleri A.S.- Iliskisel Is Kanali
> >>Yazilim Muhendisi
> >>http://www.idealteknoloji.com
> >
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> -- 
> Ahmet ISIK
> Ideal Teknoloji Bilisim Çözümleri A.S.- Iliskisel Is Kanali
> Yazilim Muhendisi
> [EMAIL PROTECTED]
> http://www.idealteknoloji.com




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



Re: declaring action mappings at runtime

2003-10-29 Thread Martin Cooper

"Ahmet ISIK" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> Is it possible to declare struts action mappings at runtime, and how?

No, it's not possible. The config is read in at application startup and is
then frozen. (The reason it's done this way is so that access to the config
does not need to be synchronised once the app is up and running, thus
leading to much improved overall performance.)

--
Martin Cooper


> Thanks in advance
>
> -- 
> Ahmet ISIK
> Ideal Teknoloji Bilisim Çözümleri A.S.- Iliskisel Is Kanali
> Yazilim Muhendisi
> http://www.idealteknoloji.com




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



Re: Problem with UTF-8 characters in a mutlipart/form-data encoded form

2003-10-29 Thread Martin Cooper
In Struts 1.1, the default file upload mechanism *is* Commons FileUpload.
;-)

It seems that you may have omitted to tell the browser explicitly that your
pages are in UTF-8. For some reason that I've never fully understood, that
causes the browser to use UTF-8 when it submits subsequent requests from
that page. Make sure that you use a  element in your  to specify
UTF-8.

--
Martin Cooper


"Paul Barry" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I think you are correct.  When I was looking at the packets and seeing two
characters, it is actually the characters
> that are equal to the 2 bytes that make up the single UTF-8 character.  I
thought the browser was somehow not correctly
> encoding my data, because it was turning 1 character into 2 characters,
but actually it is UTF-8 encoding my character
> correctly.  So I think if I use something to read the data and convert it
from UTF-8 to Unicode, I will get the correct
> data on the server.
>
> So from reading the documentation about FileUpload, that seems to be the
way to go, but now my question is how to
> integrate FileUpload with struts?  My thought would be to call a method to
populate an ActionForm in the beginning of my
> action, and then use that ActionForm instead of the one I get from the
requestProcessor.  So like this:
>
>   public ActionForward execute(
>   ActionMapping mapping,
>   ActionForm pform,
>   HttpServletRequest request,
>   HttpServletResponse response)
>   throws Exception {
>   TestActionForm form = getFormUsingFileUpload(request);
>   log.info("The value is: "+form.getTest());
>   return null;
>  }
>
> Is this how others have used Jakarta Commons FileUpload with Struts, or is
there a better way?
>
>
> Jason Lea wrote:
>
> >  From what I can see there Resin is expecting UTF-8 for any paramters
> > passed to it, and decoding it correctly.  However multipart/form-data is
> > treated differently as the data is not passed as normal parameters so
> > the request.getParameter() cannot be used here (and servlet filters that
> > set the request encoding won't help either).
> >
> > You normally have to use something like the FileUpload component to
> > extract form fields and files from the request.  This component is not
> > going to know about the character encoding you have given to resin, so
> > it will use the default which is probably US-ASCII.  With UTF-8 a single
> > character can be rendered as 1, 2 or 3 bytes.  When decoding a UTF-8
> > string the decoder will combine the 1,2 or 3 byte combinations into 1
> > Unicode character.  When UTF-8 is not used to decode the string you will
> > see the individual bytes.
> >
> > Looking here (the jakarta apache FileUpload component):
> >
http://jakarta.apache.org/commons/fileupload/apidocs/org/apache/commons/fileupload/FileUploadBase.html
> >
> >
> > They have a setHeaderEncoding() method which I assume will deal with
> > this problem (I haven't tested this so I don't know).  Are you using a
> > file upload component?
> >
> >
> > Paul Barry wrote:
> >
> >> I am using Struts 1.1 in an application that needs to support the
> >> UTF-8 character set.  I am using Resin 2.1.10 with
> >> character-encoding="UTF-8", and on most of my forms this seems to work
> >> just fine.  I am having problems with forms that have to use the
> >> multipart/form-data enctype for handling uploading files.  If I print
> >> out the value of a text element in an html:form where the enctype is
> >> not set at all (which ends up using
> >> application/x-www-form-urlencoded), using UTF-8 characters works
> >> fine.  This is what I get:
> >>
> >> INFO - test.TestAction - The value is: ä
> >>
> >> Here is what the actual HTTP request that gets sent to the server
> >> looks like:
> >>
> >> --- Start HTTP Request
> >> -
> >> POST /testForm.do HTTP/1.1
> >> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
> >> application/x-shockwave-flash, */*
> >> Referer: http://pbdesktop/test.do
> >> Accept-Language: en-us
> >> Content-Type: application/x-www-form-urlencoded
> >> Accept-Encoding: gzip, deflate
> >> User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
> >> Host: pbdesktop
> >> Content-Length: 11
> >> Connection: Keep-Alive
> >> Cache-Control: no-cache
> >> Cookie: SERVER=op; loca

Re: Good list for JSTL questions?

2003-10-23 Thread Martin Cooper
The Jakarta taglibs-user list is probably the best one, since the JSTL RI
implementors are on that list, along with a good number of JSTL users.

--
Martin Cooper


"Ruth, Brice" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What's a good list to address JSTL questions to?
>
> Thanks.
>
> -- 
> Brice D. Ruth
> Sr. IT Analyst
> Fiskars Brands, Inc.




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



Re: Struts & php & file upload

2003-10-23 Thread Martin Cooper

"Craig R. McClanahan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Rajat Pandit wrote:
>
> >Hello,
> >I had this thought this morning, please excuse me if it seems rather
> >silly. But I was wondering if there is a possibility for accessing the
> >information put in the session or request scope by the servlet via php.
> >I came up with this idea when I had to learn how the http upload thing
> >works.
> >
> >
> Interesting timing that you should mention that.
>
> There is a relatively new JSR (JSR-223) that is focused on defining
> standard interfaces between the J2EE paltform and scripting languages,
> including (but not limited to) PHP.  Among other things, they are
> looking at making it possible to share session-scoped information
> between the two languages.  I can by no means guarantee that such
> functionality will be included in whatever JSR-223 results in, but at
> least it's being looked at.
>
> >Second part: cant someone give me  a quick example (descriptive) of how
> >to upload a file and move it to a particular place on the server.
> >
> >
> >
> The simplest way to approach this is to consider it as two separate
> problems:
>
> * How do I get the file uploaded to the server?  The standard
> commons-fileupload
>   funcationality takes care of that, and should be sufficient as long as
> the uploaded
>   file fits in memory.  If it doesn't, you'll want to look at the
> Javadocs for commons-fileupload
>   to determine how to write the uploaded data to a disk file on the
> server instead.

Actually, the the file will only be kept in memory if its size falls below a
configurable threshold. If it's larger than that, it will be written to a
temporary file on disk. The threshold is configured using the 'memFileSize'
attribute on the 'controller' element in your Struts config file; the
default is 256KB.

--
Martin Cooper


>
> * How do I "move" the data to a particular place on the server?  If
> you've got the uploaded
>   data in memory, this seems like a pretty simple task ... open an
> output file and write the
>   uploaded bytes to it.  If you stored the uploaded data into a disk
> file instead, then it's
>   probably either using the rename() method of the java.io.File class,
> or a 20-line method to
>   copy the data from one file to another -- and any basic Java tutorial
> on file I/O should be
>   able to help you there.
>
> Craig




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



Re: JSTL - use class constants

2003-10-22 Thread Martin Cooper
You could use the 'bind' tag from the "Unstandard" tag library in Jakarta
Taglibs, like this:

  
  

--
Martin Cooper


"Joseph Toth" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm sure this has probably been asked a couple of times...
>
> I would like to have some type of expression like the following, to use a
> class's constant inside a tag.
> I can just put 1 instead of QuestionType.SINGLE_PUNCH here, but that not
> very readable.  Is there anyway to
> reference a class's constants inside an expression?
>
> 
>
> Thanks




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



Re: Does multiple modules work?

2003-07-11 Thread Martin Cooper

"ben" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi there,
>
> Question: Has anyone successfully worked with multiple modules? I
experience
> quite some problems, see below.

Yes, modules work. I use them extensively.

You do need to make sure that you *always* go through the controller, and
don't go directly to JSP pages, and you need to use extension mapping (which
it looks like you're doing).

There is one pretty serious bug (#11932) that somehow got marked as LATER
instead of being fixed for Struts 1.1. It applies if you are using *both*
multiple modules and multiple message resource bundles. (I'll be checking in
the fix for it this weekend.) Other than that, modules work just fine.

By the way, you should really upgrade from 1.1rc2 to 1.1 Final. :-)

--
Martin Cooper


>
> Cheers Ben
>
> > -Original Message-
> > From: ben [mailto:[EMAIL PROTECTED]
> > Sent: Dienstag, 8. Juli 2003 02:54
> > To: 'Struts Users Mailing List'; 'Jing Zhou'
> > Subject: Linking between non-default module. WAS: RE: jsp
> > links to stay
> > within module
> >
> >
> > I'm still struggling in with this.
> >
> > To recap: Using Struts 1.1rc2. Basically I want to do just a
> > simple link
> > between 2 jsp's that reside in moduleA, which is not the
> > default module.
> > This worked when using the org.apache.struts.actions.SwitchAction even
> > though its a bit cumbersome since I do not really need to
> > switch but access
> > just a jsp within the same module.
> >
> > 2nd I also have link that passes parameters and needs to resolve to an
> > action to do the processing of those.
> >
> >
> > The action mapping can however never be resolved. I have the following
> > setup:
> >
> > 1. JSP: (inside module osscatalog)
> >  >  paramName="prod_list_el" paramProperty="name">
> > View
> > 
> >
> > 2. struts-config-osscatalog.xml
> >
> >  > name="prodSubmitForm"
> > path="/prodView"
> > type="com.ctp.cosi.osscatalog.web.ProductSubmitAction"
> > unknown="false"
> > scope="session"
> > input="/productList.jsp"
> > parameter="view"
> > validate="false">
> >  > name="success"
> > path="/productView.jsp"
> > redirect="false" />
> > 
> >
> >
> > 3. Exception:
> >
> > org.apache.jasper.JasperException: Cannot retrieve mapping for action
> > /osscatalog/prodView
> >
> >
> > Can anyone help or has anybody just worked with modules at
> > all and knows if
> > there are any issues? Is Struts 1.1 rc2 stable?Thanks a lot. Ben
> >
> > BTW:
> > I use not the href but the page attribute which is correct
> > according to the
> > docs. The href can only be used when setting the hrefbase which i do.
> >
> > The module-relative path (beginning with a "/" character) to
> > which this
> > hyperlink will transfer control if activated.
> >
> > > -Original Message-
> > > From: Stephen Brown [mailto:[EMAIL PROTECTED]
> > > Sent: Montag, 7. Juli 2003 22:05
> > > To: 'Struts Users Mailing List'; 'Jing Zhou'
> > > Subject: RE: jsp links to stay within module
> > >
> > >
> > > Use
> > >  or  > > href='/prodSubmit.do' >
> > >
> > > steve
> > > > -Original Message-
> > > > From: ben [mailto:[EMAIL PROTECTED]
> > > > Sent: July 7, 2003 3:45 PM
> > > > To: 'Struts Users Mailing List'; 'Jing Zhou'
> > > > Subject: RE: jsp links to stay within module
> > > >
> > > >
> > > > Unfortunately this is then a absolute link to the webserver
> > > > root and not
> > > > relatively to the deployed application root. This does not
> > > > work, at least
> > > > with my setup. ;(
> > > >
> > > > > -Original Message-
> > > > > From: Jing Zhou [mailto:[EMAIL PROTECTED]
> > > > > Sent: Montag, 7. Juli 2003 21:28
> > > > > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > > > > Subject: Re: jsp links to stay within module
> > > > >
> &

Re: JSTL Book

2003-07-10 Thread Martin Cooper
I enjoyed Shawn's book a great deal. The writing style makes the book fun to
read, and it really is very well written, too. I learned a lot reading it.

Disclaimers:
1) I did the tech proof of this book, so I had to read it in great detail,
but it was still fun. ;-)
2) I haven't actually read any other JSTL books. (I haven't felt a need to.)

--
Martin Cooper


"Mike Duffy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Does anyone have a recommendation for a good JSTL book?
>
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com




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



Re: Struts - j2ee compliant

2003-07-02 Thread Martin Cooper

"objectworlds" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> So if I have a requirement  to use the Mail API with a web app then I
> should perhaps consider
> downloading  EJBOSS and stateless session beans to compliment tomcat &
> the struts framework , etc.

If, by "the Mail API", you mean JavaMail, then you just need to download
JavaMail if your container doesn't already include it.

--
Martin Cooper


>
> [EMAIL PROTECTED] wrote:
>
> >On Wed, 2 Jul 2003, objectworlds wrote:
> >
> >
> >
> >>What is incomplete in tomcat  ?
> >>
> >>
> >
> >There is no support for EJB, JMS, Connector Architecture, and a whole ton
> >of other APIs above and beyond Servlet and JSP.  See the J2EE
> >Specification for a complete list of everything that a J2EE server has to
> >provide:
> >
> >  http://java.sun.com/j2ee/download.html#platformspec
> >
> >Craig
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> -- 
> Your favorite stores, helpful shopping tools and great gift ideas.
> Experience the convenience of buying online with [EMAIL PROTECTED]
> http://shopnow.netscape.com/




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



Re: [ANNOUNCEMENT] Struts 1.1 Final released

2003-07-02 Thread Martin Cooper

"Arnaud HERITIER" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I believe that it is the 2.0.7 release.

Actually, ORO 2.0.6 is bundled with Struts 1.1.

--
Martin Cooper


>
> Arnaud.
>
> > -Message d'origine-
> > De : Mark McBride [mailto:[EMAIL PROTECTED]
> > Envoyé : lundi 30 juin 2003 18:26
> > À : Struts Users Mailing List
> > Objet : Re: [ANNOUNCEMENT] Struts 1.1 Final released
> >
> >
> > I've noticed that all the library versions are noted here
> > http://jakarta.apache.org/struts/userGuide/release-notes-1.1.h
> > tml except
> > for jakarta oro.
> >
> > What version of oro is being released with 1.1?
> >
> > -Mark
> > At 01:33 PM 6/30/2003 -0300, you wrote:
> > >Congratulations,
> > >
> > >You´ve done a terrific job.
> > >
> > >Thank you very for providing us with such an incredible framework.
> > >
> > >Gustavo Faerman
> > >Faerman Solari Consultants,
> > >Buenos Aires, Argentina.
> >
> > Mark T. McBride
> > Computer Scientist
> > Lawrence Livermore National Laboratory
> > http://www.llnl.gov
> >
> > Office: (925) 423-1627
> > Fax: (925) 423-3140
> >




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



[ANNOUNCEMENT] Struts 1.1 Final released

2003-06-30 Thread Martin Cooper
The Struts team is proud, and extremely pleased, to announce the Final
release of Struts 1.1. This release includes significant new
functionality, as well as numerous fixes for bugs which were reported
against the previous release, and supersedes the earlier 1.0.2 version as
the latest official release of Struts from the Apache Software Foundation.

The binary distribution is available at:

http://www.apache.org/dist/jakarta/struts/binaries/

and the source distribution is available at:

http://www.apache.org/dist/jakarta/struts/source/

In addition, the library distribution, which contains updated binaries
without the sample applications, is available at:

http://www.apache.org/dist/jakarta/struts/library/

Details of the changes in this release are available in the Release Notes,
which can be found here:

http://jakarta.apache.org/struts/userGuide/release-notes-1.1.html

--
Martin Cooper

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



Re: getting multipart requests

2003-06-13 Thread Martin Cooper

"Daniel B" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I've been scratching my head over how to get multipart data across the
wire,
> and I was wondering if I could get a little help.  Given the following in
my
> .jsp:
>
>  method="POST">
>   
>   
> 
>
> (the "FileUploadSubmit" Action has an ActionForm called "FileUploadForm")
>
> How should I set up my Action and ActionForm?  For instance:
> - What data type should the member "file" be in the ActionForm?
> - Where / when / should I call setMultipartRequestHandler() in the
> ActionForm?
> - How do I make sure the handler gets called correctly?
> - I'm assuming I should be using CommonsMultipartRequestHandler (is this
> true?)
> - How do I customize what happens to the file once it comes in? (i.e.,
> filename, destination directory, etc.)
>
> I haven't been able to find any sample code

You might want to look at the struts-upload sample that is part of the
Struts distribution...

--
Martin Cooper


>, and both of my Struts books
> have been a bit unhelpful (although in general I've been very happy with
> "Struts in Action").  Any help would be tremendously appreciated!
>
> Daniel




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



Re: commons-fileupload.jar problem with rc2

2003-06-10 Thread Martin Cooper
It's possible that your container has its own copy of FileUpload, and that
it uses an older version than the one bundles with Struts 1.1-rc2. That
version may be being picked up instead of the later one. Check your webapp
classpath, and make sure your own webapp is picking up the Struts one, and
not the container one.

--
Martin Cooper


"Ben Sion" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is anyone else having this problem? I have just updgraded to rc2 and
> got this problem. When I replaced the commons-fileupload.jar with the
> version from rc1, everything works like magic.
>
> cheers
> Ben
>
> output from servlet log
> ===
> Jun 10 19:09:02 2003: Servlet action: unable to service request:
> Servlet action threw the exception: java.lang.NoSuchMethodError:
> org.apache.commons.fileupload.FileUpload.setSizeMax(I)V
> Jun 10 19:09:02 2003: javax.servlet.ServletException: Servlet action
> threw the exception: java.lang.NoSuchMethodError:
> org.apache.commons.fileupload.FileUpload.setSizeMax(I)V
>
> at com.sybase.jaguar.servlet.JagServlet.service
> (JagServlet.java:671)
>
> at com.sybase.jaguar.servlet.JagRequestDispatcher.service
> (JagRequestDispatcher.java:922)
>
> at com.sybase.jaguar.servlet.JagWebResource.service
> (JagWebResource.java:90)
>
> at com.sybase.jaguar.servlet.JagFilterChain.doFilter
> (JagFilterChain.java:131)
>
> at com.sybase.jaguar.servlet.ServletEngine._service
> (ServletEngine.java:804)
>
> at com.sybase.jaguar.servlet.ServletEngine.service
> (ServletEngine.java:338)
>
> at com.sybase.jaguar.servlet.ServletServiceImpl.doService
> (ServletServiceImpl.java:52)
>
> at
> com.sybase.jaguar.servlet._sk_JaguarServlet_ServletService.invoke
> (_sk_JaguarServlet_ServletService.java:151)
>
>
> Jun 10 19:09:02 2003: The ServletException contained the following root
> cause exception:
> Jun 10 19:09:02 2003: java.lang.NoSuchMethodError:
> org.apache.commons.fileupload.FileUpload.setSizeMax(I)V
>
> at
> org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest
> (CommonsMultipartRequestHandler.java:219)
>
> at org.apache.struts.util.RequestUtils.populate
> (RequestUtils.java:1055)
>
> at org.apache.struts.action.RequestProcessor.processPopulate
> (RequestProcessor.java:816)
>
> at org.apache.struts.action.RequestProcessor.process
> (RequestProcessor.java:254)
>
> at org.apache.struts.action.ActionServlet.process
> (ActionServlet.java:1420)
>
> at org.apache.struts.action.ActionServlet.doPost
> (ActionServlet.java:520)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>
> at com.sybase.jaguar.servlet.JagServlet.service
> (JagServlet.java:656)
>
> at com.sybase.jaguar.servlet.JagRequestDispatcher.service
> (JagRequestDispatcher.java:922)
>
> at com.sybase.jaguar.servlet.JagWebResource.service
> (JagWebResource.java:90)
>
> at com.sybase.jaguar.servlet.JagFilterChain.doFilter
> (JagFilterChain.java:131)
>
> at com.sybase.jaguar.servlet.ServletEngine._service
> (ServletEngine.java:804)
>
> at com.sybase.jaguar.servlet.ServletEngine.service
> (ServletEngine.java:338)
>
> at com.sybase.jaguar.servlet.ServletServiceImpl.doService
> (ServletServiceImpl.java:52)
>
> at
> com.sybase.jaguar.servlet._sk_JaguarServlet_ServletService.invoke
> (_sk_JaguarServlet_ServletService.java:151)




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



Re: commons-logging problem in 1.1 RC2

2003-06-09 Thread Martin Cooper
My apologies. Commons Logging now comes as two separate jars, and I
bundled the wrong one.

I've fixed the problem on the main Apache site. It'll take a little while
to propagate to the mirrors, so if you want to download it right away, you
probably want to go to the main site.

--
Martin Cooper


On Mon, 9 Jun 2003, Raible, Matt wrote:

> I found that this release candidate has a (seemingly) bad
> commons-logging.jar.
>
> I have a nightly build of Struts (20030326) and it's commons-logging.jar is
> 31K.  The one shipped with 1.1 RC2 is only 22K and none of my JUnit tests
> emit any log messages.  If I replace 1.1 RC2's commons-logging.jar with the
> one that's 31K, everything works as expected.
>
> Looks like the following files are missing:
>
> Log4jCategoryLog.class
> Log4jFactory.class
> Log4JLogger.class
> LogKitLogger.class
>
> package.html
>
> Here's a screenshot of the diff between the two: http://tinyurl.com/dvtw
>
> Is this "as designed?"
>
> Thanks,
>
> Matt
>
>
> -Original Message-
> From: Martin Cooper [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 09, 2003 1:29 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: [ANNOUNCEMENT] Struts 1.1 Release Candidate 2 released
>
>
> The Struts team is proud to announce the release of Struts 1.1 Release
> Candidate 2. This release includes some new functionality, but mostly just
> fixes for a number of bugs which were reported against earlier versions.
> The Struts Team believes that this release is ready for prime time, hence
> its designation as a release candidate.
>
> The binary distribution is available at:
>
> http://www.apache.org/dist/jakarta/struts/binaries/
>
> and the source distribution is available at:
>
> http://www.apache.org/dist/jakarta/struts/source/
>
> In addition, the library distribution, which contains updated binaries
> without the sample applications, is available at:
>
> http://www.apache.org/dist/jakarta/struts/library/
>
> Details of the changes in this release are available in the Release Notes,
> which can be found here:
>
> http://jakarta.apache.org/struts/userGuide/release-notes-1.1-rc2.html
>
> Special thanks to Ted Husted for his help in preparing this release.
>
> --
> Martin Cooper
>
> -
> 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]



[ANNOUNCEMENT] Struts 1.1 Release Candidate 2 released

2003-06-09 Thread Martin Cooper
The Struts team is proud to announce the release of Struts 1.1 Release
Candidate 2. This release includes some new functionality, but mostly just
fixes for a number of bugs which were reported against earlier versions.
The Struts Team believes that this release is ready for prime time, hence
its designation as a release candidate.

The binary distribution is available at:

http://www.apache.org/dist/jakarta/struts/binaries/

and the source distribution is available at:

http://www.apache.org/dist/jakarta/struts/source/

In addition, the library distribution, which contains updated binaries
without the sample applications, is available at:

http://www.apache.org/dist/jakarta/struts/library/

Details of the changes in this release are available in the Release Notes,
which can be found here:

http://jakarta.apache.org/struts/userGuide/release-notes-1.1-rc2.html

Special thanks to Ted Husted for his help in preparing this release.

--
Martin Cooper

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



[ANNOUNCEMENT] Struts 1.1 Release Candidate 1 released

2003-02-23 Thread Martin Cooper
The Struts team is proud to announce the release of Struts 1.1 Release
Candidate 1. This release includes some new functionality, as well as
fixes for a number of bugs which were reported against earlier versions.
The Struts Team believes that this release is ready for prime time, hence
its designation as a release candidate.

The binary distribution is available at:

http://www.apache.org/dist/jakarta/struts/binaries/

and the source distribution is available at:

http://www.apache.org/dist/jakarta/struts/source/

In addition, the library distribution, which contains updated binaries
without the sample applications, is available at:

http://www.apache.org/dist/jakarta/struts/library/

Details of the changes in this release are available in the Release Notes,
which can be found here:

http://jakarta.apache.org/struts/userGuide/release-notes-1.1-rc1.html

--
Martin Cooper


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



Re: Struts Upload File Question

2003-02-05 Thread Martin Cooper

"VEDRE, RANAPRATAP REDDY" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am trying to implement a feature that allows users to upload multiple
> files at the same time(Similar to Yahoo Mail attachments).
>
> user should be able to select upto a maximun of 5 files on a single page
and
> all the files are saved to the database on submitting the form.
>
> I am using FormFile in struts upload package for the purpose and storing
the
> FormFile objects in a vector.  what would be the best way to handle this?

Well, I'd use a List instead of a Vector, but otherwise you're on the right
track.

>
> Also,how can i show image and text(html markup) on the same page.
> if i set the content type for the response to image/gif and  return null
for
> ActionForward, them image shows up but i cannot display text on the page
if
> i write it to the output stream.

This is not a Struts-related question.

--
Martin Cooper


>
> dint find the solution to this in the mailing list archive.
>
> any comments/ideas are welcome.
>
> -Rana.




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




Re: struts-layout taglibraries

2003-01-04 Thread Martin Cooper
Assuming you're talking about the Struts Layout tag library, which is an
extension to Struts and not part of it, you should contact the Struts
Layout team, or post a message to the Struts Layout mailing list. The
contact information is available on their web site:

http://struts.application-servers.com/

--
Martin Cooper


On Mon, 30 Dec 2002, usha wrote:

> Hi
>
> Thnaks a lot for replying. yes i defenetly need the help from u in using
> the struts-layout . i was just struggling to implement the struts-layout
> from past 1 week. right now i have 1 problem i am using the text tag
> where i am specifying the isRequired="false" but still it displays the
> pixel icon besides the text box. how to disable this.
> i have an invoice page where there are 2 section one is header and
> details section. i wanted to display the header portion depends on the
> mode if its in create then i wanted to display the text box else a plain
> text depending on the button onclick on the header portion like
> add,delete,update. can u tell me what i need to do to achieve this. and
> if u have time can u explain me how this modes works.
>
> Thanks
> usha
> Xavier Escuderosabadell wrote:
>
> >Hi Usha. We are using struts-layout, and I have to say that is very useful!!
> >We've used it mainly for developing only 1 jsp for a one maintenance use case
> >(create, update, delete), because it allows to specify with tags and code the 
>enabling and
> >disabling of components (if you are in an update, some textfields or combos appear 
>like labels, etc.)
> >
> >Don't hesitate if you want more information.
> >
> >
> >>anybody is using the struts-layout taglibraries. i wanted to know how to
> >>use this with strutsv1.0.2.
> >>
> >>thanks
> >>usha
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> >>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> >>
> >>
> >>
> >
> >
> >--
> >To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> >
> >
>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Struts 1.1 Beta 3 now available from mirror sites

2003-01-02 Thread Martin Cooper
The Struts 1.1 Beta 3 release is now available for download from more than
20 mirror sites worldwide. To download, follow this link:

http://jakarta.apache.org/site/binindex.cgi

Under "Release Builds", select the mirror site you desire, click Change,
and then click on "Struts 1.1 Beta 3".

Happy Strutting!

--
Martin Cooper



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




Re: Struts v1.1b3 download?

2003-01-02 Thread Martin Cooper
The links have been fixed.

--
Martin Cooper


On Thu, 2 Jan 2003, Martin Cooper wrote:

>
>
> On 2 Jan 2003, David M. Karr wrote:
>
> > >>>>> "ajTreece" == ajTreece  <[EMAIL PROTECTED]> writes:
> >
> > ajTreece> I went to the apache site - milestone build for the subject 
>mentioned release,
> > ajTreece> but get a requested url not found error...
> >
> > ajTreece> Where is the milestone build?
> >
> > I don't know why the link is broken, but you can get to the release here:
>
> My fault. The previous link from there for Beta 2 was also broken. That
> didn't occur to me when I updated it for Beta 3 (I just changed '2' to
> '3'), so it's still broken. ;-(
>
> I'll fix it as soon as I can. In the meantime, you can use the link below,
> or get it here:
>
> http://www.apache.org/dist/jakarta/struts/
>
> --
> Martin Cooper
>
>
> >
> > http://jakarta.apache.org/builds/jakarta-struts/release/v1.1-b3/
> >
> > --
> > ===
> > David M. Karr  ; Java/J2EE/XML/Unix/C++
> > [EMAIL PROTECTED]   ; SCJP
> >
> >
> >
> > --
> > To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> >
> >
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re: Struts v1.1b3 download?

2003-01-02 Thread Martin Cooper


On 2 Jan 2003, David M. Karr wrote:

> >>>>> "ajTreece" == ajTreece  <[EMAIL PROTECTED]> writes:
>
> ajTreece> I went to the apache site - milestone build for the subject mentioned 
>release,
> ajTreece> but get a requested url not found error...
>
> ajTreece> Where is the milestone build?
>
> I don't know why the link is broken, but you can get to the release here:

My fault. The previous link from there for Beta 2 was also broken. That
didn't occur to me when I updated it for Beta 3 (I just changed '2' to
'3'), so it's still broken. ;-(

I'll fix it as soon as I can. In the meantime, you can use the link below,
or get it here:

http://www.apache.org/dist/jakarta/struts/

--
Martin Cooper


>
> http://jakarta.apache.org/builds/jakarta-struts/release/v1.1-b3/
>
> --
> ===
> David M. Karr  ; Java/J2EE/XML/Unix/C++
> [EMAIL PROTECTED]   ; SCJP
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




[ANNOUNCEMENT] Struts 1.1 Beta 3 Released

2002-12-31 Thread Martin Cooper
The Struts team is proud to announce the release of Struts 1.1 Beta 3.
This release includes significant new functionality, while retaining full
backwards compatibility with earlier versions of Struts. It also
incorporates fixes for a number of bugs which were reported against
earlier versions.

The binary distribution is available at:

  http://jakarta.apache.org/builds/jakarta-struts/release/v1.1-b3/

and the source distribution is available at:

  http://jakarta.apache.org/builds/jakarta-struts/release/v1.1-b3/src/

In addition, the library distibution, which contains updated binaries
without the sample applications, is available at:

  http://jakarta.apache.org/builds/jakarta-struts/release/v1.1-b3/lib/

Details of the changes in this release are available in the Release Notes,
which can be found here:

  http://jakarta.apache.org/struts/userGuide/release-notes-1.1-b3.html

--
Martin Cooper


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




Re: How to get a reference to an Action instance

2002-12-30 Thread Martin Cooper


On Sun, 29 Dec 2002, Lirian Ostrovica wrote:

> Hi,
>
> I need to access an Action instance (I have its class name) while
> writting a Tag.
>
> I have seen that ActionServlet stores Action instances in a 'protected'
> variable (FastHashMap), and so far the only way I can see, is to extend
> ActionServlet and write my own 'public' method to do the job.
> But of course I do not prefer to extend ActionServlet just for that...

Even if you know the class name, there is no guarantee that an instance of
that Action exists, since Action instances are created as needed. And even
if an instance does exist, what would be the purpose of accessing it? An
Action instance should not maintain state, since that will cause threading
problems, and if you need to access class data, then you do not need an
instance.

Perhaps if you tell us what you are trying to achieve, we can help you
find the right way to do that.

--
Martin Cooper


>
> If there is any other way, can someone please let me know
>
> thanks a lot
>
> lirian
>
>
> >
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




RE: [ANNOUNCEMENT] Commons Validator 1.0.1 Released

2002-12-19 Thread Martin Cooper


On Mon, 16 Dec 2002, Heligon Sandra wrote:

> To update the Struts-validator, do we just have to replace the
> commons-validator.jar
> file delivered with Struts by the new file available in the
> validator-1.0.1.zip ?

Yes, that's correct.

--
Martin Cooper


>
> -Original Message-
> From: Martin Cooper [mailto:[EMAIL PROTECTED]]
> Sent: 16 December 2002 05:15
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: [ANNOUNCEMENT] Commons Validator 1.0.1 Released
>
>
> The Commons Validator team is pleased to announce the release of Validator
> 1.0.1. This release contains only bug fixes - there are no new features in
> this release.
>
> The binary and source distributions are available at:
>
> http://jakarta.apache.org/builds/jakarta-commons/release/commons-validator/v
> 1.0.1/
>
> The Validator web site is located at:
>
> http://jakarta.apache.org/commons/validator/
>
> --
> Martin Cooper
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




[ANNOUNCEMENT] Commons Validator 1.0.1 Released

2002-12-15 Thread Martin Cooper
The Commons Validator team is pleased to announce the release of Validator
1.0.1. This release contains only bug fixes - there are no new features in
this release.

The binary and source distributions are available at:

http://jakarta.apache.org/builds/jakarta-commons/release/commons-validator/v1.0.1/

The Validator web site is located at:

http://jakarta.apache.org/commons/validator/

--
Martin Cooper



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




Re: Loosing form data when chaining actions

2002-12-09 Thread Martin Cooper


On Tue, 3 Dec 2002, [utf-8] Etienne Labonté wrote:

> Hi,
>
> I defined 2 actions in session scope referring the same form. The first
> action sets some properties in the form and then forwards the request to the
> second action. The second action sets some more properties and then forwards
> to a JSP page which contains the html form. The problem is only the data set
> by the last action remains... This makes me think the form-bean is not
> shared between actions. I understand this can be desired behaviour. Any
> insight would be appreciated. thanks!

This is exactly why action chaining is not recommended. When you forward
from one action to another, the effect is as if a new request has been
made. As a result, Struts will call the form bean's reset() method, and
then the form bean will be repopulated from the request parameters. Any
changes made to the form bean will be lost.

Please note that this is not a Struts-related issue. This behaviour is
well defined by the Java Servlets spec.

--
Martin Cooper


>
>
>
> Etienne
>


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




Re: struts 1.1-b2 struts-blank bug????

2002-12-07 Thread Martin Cooper


On Sun, 1 Dec 2002, Hanasaki JiJi wrote:

> anyone getting the below error from the blank file?

There was a bug in the Struts 1.1-b2 version of struts-blank.war that
caused this. It was fixed shortly after 1.1-b2 was released.

--
Martin Cooper


>
> struts-blank/index.jsp
>
>
> type Exception report
>
> message
>
> description The server encountered an internal error () that prevented
> it from fulfilling this request.
>
> exception
>
> org.apache.jasper.JasperException: Missing message for key welcome.title
>   at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
>   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
>   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
>   at
> 
>org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
>   at
> 
>org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
>   at org.apache.struts.actions.ForwardAction.execute(ForwardAction.java:158)
>   at
> 
>org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
>   at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
>   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:129
> --
> =
> = Management is doing things right; leadership is doing the =
> =   right things.- Peter Drucker=
> =___=
> = http://www.sun.com/service/sunps/jdc/javacenter.pdf   =
> =  www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone  =
> =
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re: Action Name

2002-11-25 Thread Martin Cooper


On Mon, 25 Nov 2002, edgar wrote:

> Does anyone know how to easily get the current action name (other than
> decomposing it from the URI)?
>
> The idea is I am writing a class of generic reporting servlets and I
> would like to stick in a simple form or link to return to the prior
> action.

You mean something like mapping.getPath()?

--
Martin Cooper


>
> Any ideas would be appreciated.
>
> Edgar.
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




RE: name of zip file???chuck cavaness book

2002-11-21 Thread Martin Cooper
I'd just like to point out that the reason the chapters of Chuck's book
were made available on TheServerSide was for public *review*, not as a
public give-away. Given that the book is now in production, the review
period is clearly over, so I'm not at all surprised that these chapters
are no longer available for download.

--
Martin Cooper


On Thu, 21 Nov 2002, James Mitchell wrote:

> > -Original Message-
> > From: Shalu Goel [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, November 21, 2002 7:12 AM
> > To: Struts Users Mailing List
> > Subject: Re: name of zip file???chuck cavaness book
> >
> >
> > Thanks James to bring it to my notice!!!
> >  I truly appreciate ur sentiments
> >  I promise!! i will surely buy it as soon as it is available in the book
> > stores...
>
> That's great.  I'm sure Chuck would appreciate it.
>
> > But wait a minute i think u should always think of the possibility
> > wherein a newbie honestly looking all out to get some packaged material
> > on the technology to use and  promote in one's own place of working...
>
> True.
>
> > The reason why i am screaming BOOK!!! BOOK!!!  is, i honestly thought it
> > is not the issue with the chuck books getting printed rather... some s/w
> > devolper has overwritten a jsp page(download.jsp) at theserverside.com
>
> Yes, and that's perfectly understandable.
>
> > Had it not been the case they would have also removed the link
> > http://www2.theserverside.com/resources/strutsreview.jsp which talks
> > about downloading the book chapters and then takes to a
> > different page altogether
>
> I understand where you are coming from.  Unless I'm way off and this
> whole this was (as you say) an overwritten jsp, it's not fair for the reader
> or the author that there are pages with bad information and/or links on
> them.
>
> I mean, what's the author supposed to say."the preview is no longer
> free"
> That's only going to piss off people.  And that's the last thing you want to
> do is
> piss off your audienceespecially with a book on such a specific topic.
>
> > there would surely have just been a list... no hyperlinks ..no
> > instructions to download it ...
>
> >
> > Also i have enquired at bookstore in my local area ...Chuck's book has not
> > reached the book stores yet!!!
> >
> > I gather... u have been a very sincere, honest and dedicated s/w
> > professional ...but does ur innate humanity not gives you all the more
> > reasons to trust others too???
>
> My message was not intended to be personal.  I'm sorry if it came off that
> way.  In fact, I had put "don't take this personally" before sending, but
> decided to delete it because it is such an over-used phrase to hide
> vindictive comments.
>
> > Thanks and Regards
> > Shalu
>
>
>
>
> James "I can't believe he didn't pick Brook!!!" Mitchell
> Software Engineer/Struts Evangelist
> http://www.open-tools.org
>
> "If you were plowing a field, which would you rather use? Two strong oxen or
> 1024 chickens?"
> - Seymour Cray (1925-1996), father of supercomputing
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re: muliple select lists and DynaActionForms

2002-11-21 Thread Martin Cooper


On Thu, 21 Nov 2002, Watkins, Herb wrote:

> Hello,
>
> I am having trouble with the submitted results of the  where
> multiple="true.  I have the form defined as a DynaActionForm with the
> property in question defined as an ArrayList of the ids to pre-select.  The
> pre selection works fine but when I submit the form, the exception below is
> thrown.  Please let me know if you have a solution.

Per the documentation for , you need to use an array, not an
ArrayList.

--
Martin Cooper


>
> Thanks,
> Herb Watkins
>
>
> Root cause of ServletException
> org.apache.commons.beanutils.ConversionException: Cannot assign value of
> type 'j
> ava.lang.String' to property 'winLossReasonIds' of type
> 'java.util.ArrayList'
> at
> org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:376)
> at
> org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(Property
> Utils.java:1592)
> at
> org.apache.commons.beanutils.PropertyUtils.setNestedProperty(Property
> Utils.java:1506)
> at
> org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.
> java:1536)
> at
> org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:674
> )
> at
> org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:504)
> at
> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:978)
> at
> org.apache.struts.action.RequestProcessor.processPopulate(RequestProc
> essor.java:779)
> at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
> va:246)
> at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:129
> 2)
> at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> >
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




RE: Enabling debug levels - which way?

2002-11-20 Thread Martin Cooper
With Struts 1.1, you configure your logger its own way. Neither the entry
in web.xml nor the entry in struts-config.xml is used.

Since you're using JDK 1.4, it's probably easiest to forget about
SimpleLog and just let Commons Logging pick up the JDK 1.4 logger. Just
make sure that logging.properties has what you need, and it should "just
work" (TM).

That said, I had a heck of a time getting logging to kick in the first
time I tried to use it on Windows. What finally seemed to get it to work
was a reboot (surprise!), but since then it's worked flawlessly.

--
Martin Cooper


On Wed, 20 Nov 2002, Richard Mixon wrote:

> Forgot to add - I'm using the SimpleLog implementation for now, and I am
> running J2SDK 1.4.1.
>
> -Original Message-
> From: Richard Mixon [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 20, 2002 12:54 PM
> To: [EMAIL PROTECTED]
> Subject: Enabling debug levels - which way?
>
>
> In trying to track down why my action is not being called in a previous post
> (Enabling server-side (only) validation with Struts 1.1), I am having  a
> heck of a time getting the debug parameters to change.
>
> I've tried changing the value in the web.xml file:
>
>   
>   
> action
> org.apache.struts.action.ActionServlet
> 
>   config
>   /WEB-INF/struts-config.xml
> 
> 
>   debug
>   6
> 
> 
>   detail
>   6
> 
> 1
>   
>
>
> I've tried in the struts-config.xml file (it seems that this is now the
> preferred method?):
>
>   
> 
>
> 
>   
>
> In each case, whether I set it to 1,2,3,4,5 or 6, My application issues the
> following displays with either a level 5 or 6 set:
>  ContactForm.validate: Logging level=3
>  ContactForm.validate: Error enabled
>  ContactForm.validate: Fatal enabled
>  ContactForm.validate: Info enabled
>  ContactForm.validate: Warn enabled
>  ContactForm.validate: Info mode is on
>  [INFO] class - - Info mode is on
> I print the log level and then check for Debug, Error, Fatal, Info, Warn and
> Trace respectively. As you can see I get no display that Debug and Trace are
> enabled.
>
> Any suggestions are appreciated.
>
> Richard Mixon
> Promoting Value in Information Technology and Software
> cell: (480) 577-6834 home: (480) 614-3442
> email: [EMAIL PROTECTED]
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re: Illegal target of jump or branch w/Tomcat

2002-11-20 Thread Martin Cooper


On Wed, 20 Nov 2002, Martin Cooper wrote:

>
>
> On Wed, 20 Nov 2002, Emmanuel Bridonneau wrote:
>
> > Some double talk,
> > so I ran into this JVM exeption after switching from the "oh you're too expensive 
>for me" Weblogic to "you're great for a free software" JBoss.
> > Turns out that Tomcat (used in conjunction w/JBoss) has a 64kb limitation whilst 
>generating the servlet code from a JSP.
> > I intend to follow some suggestion I read and reduce the size of the .class files 
>by:
> >  - reducing the number of tags used by merging some functionalities at the expense 
>of a clean code
> >  - putting some code outside of the jsp and including these snippets at run time
> >
> > It's a rather nasty and long undertaking.
> > If anyone has encountered this type of exeption can you confirm this assumption 
>and what were the steps you took to overcome this limitation?
> > Heard of a future Tomcat release that'll increase the 64kb limit?
>
> The latest versions of Tomcat use Jasper2 to compile JSP pages. Jasper2
> apparently breaks up the generated code to avoid hitting the limit you are
> encountering. If you can move to a later Tomcat, that would probably be
> the best way to go.
>
> If you can't switch container, one other point to bear in mind is that
> non-body tags generate less code than body tags. If you have your own tag
> library, you might consider changing some of the body tags to non-body
> tags. If you're really desperate, you could created modified versions of
> some of the Struts tags so that they are non-body tags, or create
> composite tags. (This is something I ended up having to do some time ago
> because some of my pages were blowing the limit on a daily basis!)

One other thing I forgot to mention - you can also use  to
break your pages into smaller chunks for the JSP compiler, and put them
back together at run time.

--
Martin Cooper


>
> --
> Martin Cooper
>
>
> > Thanks
> >
> > Configuration details:
> > JBoss 2.4.4 bundle w/Tomcat 4.0.1
> > Struts 1.0.2
> >
> >
> > --
> > To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> >
> >
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re: Illegal target of jump or branch w/Tomcat

2002-11-20 Thread Martin Cooper


On Wed, 20 Nov 2002, Emmanuel Bridonneau wrote:

> Some double talk,
> so I ran into this JVM exeption after switching from the "oh you're too expensive 
>for me" Weblogic to "you're great for a free software" JBoss.
> Turns out that Tomcat (used in conjunction w/JBoss) has a 64kb limitation whilst 
>generating the servlet code from a JSP.
> I intend to follow some suggestion I read and reduce the size of the .class files by:
>  - reducing the number of tags used by merging some functionalities at the expense 
>of a clean code
>  - putting some code outside of the jsp and including these snippets at run time
>
> It's a rather nasty and long undertaking.
> If anyone has encountered this type of exeption can you confirm this assumption and 
>what were the steps you took to overcome this limitation?
> Heard of a future Tomcat release that'll increase the 64kb limit?

The latest versions of Tomcat use Jasper2 to compile JSP pages. Jasper2
apparently breaks up the generated code to avoid hitting the limit you are
encountering. If you can move to a later Tomcat, that would probably be
the best way to go.

If you can't switch container, one other point to bear in mind is that
non-body tags generate less code than body tags. If you have your own tag
library, you might consider changing some of the body tags to non-body
tags. If you're really desperate, you could created modified versions of
some of the Struts tags so that they are non-body tags, or create
composite tags. (This is something I ended up having to do some time ago
because some of my pages were blowing the limit on a daily basis!)

--
Martin Cooper


> Thanks
>
> Configuration details:
> JBoss 2.4.4 bundle w/Tomcat 4.0.1
> Struts 1.0.2
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re: Struts file upload validation problem

2002-11-20 Thread Martin Cooper


On Wed, 20 Nov 2002, Eddie Bush wrote:

> Brian Hickey wrote:
>
> >Martin is correct :o)
> >
> >Also be aware that very very large files can exceed the setting of Java temp
> >space (memory) allocation is some containers and crash them.
> >
> >One approach that works is to write a simple file upload script in Perl.
> >This allows you to check content-type, size, etc. and reject the upload
> >before trouble happens. It is also platform independent to a "reasonable"
> >degree.
> >
> Unless I'm mistaken, the commons file-upload component can do this too.
>  Am I mistaken?

Commons FileUpload has a size threshold below which a part is retained in
memory, and above which it is streamed to disk, to prevent memory issues.
It also has another size threshold that determines the maximum total size
of a request that it will accept, beyond which it will throw up its hands
and refuse to process the request at all.

--
Martin Cooper


>
> >Just another $.02 worth...
> >
> >Brian
> >
> --
> Eddie Bush
>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re: Struts file upload validation problem

2002-11-20 Thread Martin Cooper


On Wed, 20 Nov 2002, Poynter, Stephen wrote:

> I have just written a document upload tool for a customer using the struts
> upload functionality.  My upload jsp consists of one form that is of course
> a multipart/form-data form.  The form consists of the file field along with
> other text fields where the user enters various information( owner, title,
> etc.) about the file to be uploaded.  The problem I'm having is that once
> you submit the form struts immediately starts uploading the file before any
> of the other data in the form is validated.  So, in my case, the user tries
> to upload a large file but enters invalid information for the other text
> fields.  Struts then uploads the file before validating the form data.  So
> when the user corrects their mistake they have to re-upload the file yet
> again.  Is it possible to have the form data validated before the file is
> uploaded?  I would rather not use javascript for error checking.  Any help
> is appreciated.  Thanks...

Just to clarify the process, Struts does not upload the file, the browser
does. The file is part of the same request as the other fields in your
form - it's one of the -parts- in the -multipart- request, as is each of
the remaining fields. Struts can't start working on the request until it
is complete, including the file upload.

If you need to do validation before the file is uploaded, you either need
to use JavaScript in the browser, or use a separate page for the other
fields, so that you can validate them server-side before the file is
uploaded from its own page.

--
Martin Cooper


>
> Steve
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re: How to build Multi-Lingual Web Site?

2002-11-20 Thread Martin Cooper


On Wed, 20 Nov 2002, Jana Navaneethan wrote:

> Thanks to every one for your valuable suggestions!
>
> I have decided to go with converting .html to .jsp and use properties for
> serving these messages. Now my properties file has 600 lines of code is it
> large? or is it OK?  I believe this file is loaded only once by the Action
> Servlet and kept in memory right? Will there be any memory issues? or
> Performance down grades because of this huge properties file. Is there any
> other better way of doing this? Any suggestions would be greatly
> appreciated!

600 lines is nothing to worry about. I have an application in production
that uses multiple properties files, and just one of those has around 3500
lines. You have plenty of breathing room yet. ;-)

--
Martin Cooper


>
> Thanks in advance,
> Jana.
>
>
> - Original Message -
> From: "Steven Banks" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, November 20, 2002 10:25 AM
> Subject: Re: How to build Multi-Lingual Web Site?
>
>
> > I asked this question a while back and got some very good answers.  If you
> do a search on these archives on "internationalizing large amounts of text"
> you will get several ideas.
> >
> > Steven
> >
> > >>> <[EMAIL PROTECTED]> 11/19/02 06:45PM >>>
> >
> > Our application has both legal notice and privacy pages.  We opted to
> > change these from static html pages to jsps.  The conversion was
> relatively
> > painless, and it allows the use of the struts custom tags (and thus
> > locale-specific text and images).  In our case, the client is fine
> > maintaining the verbage used on these pages in properties files than
> > editing the static html directly.
> >
> > We keep our image file paths in the properties file and use the scrkey
> > attribute to of the html:image tag  to reference them.  This allows us to
> > have locale-specific images as well as text.
> >
> > Jim
> >
> >
> >
> >
> >   "Jana Navaneethan"
> >Mailing List" <[EMAIL PROTECTED]>
> >   bs.gte.com> cc:
> >   Subject:  How to build
> Multi-Lingual Web Site?
> >   11/19/2002 04:02 PM
> >   Please respond to
> >   "Struts Users
> >   Mailing List"
> >
> >
> >
> >
> >
> >
> > Hi,
> > We have a multi-lingual application. We are trying to convert our
> > existing application using STRUTS. We have few static HTML pages (.html)
> > How
> > to serve this pages to the User? because these are not JSP pages and I
> > can't
> > use   and the it has lot of static content for example
> > privacy
> > policy? I tried to convert them to .jsp and convert all the static text in
> > to messages. Since the file is huge Is there any other better way of doing
> > this? Also We need to serve the user with different images (Language
> > specific) in our JSP Pages how to do that?
> >
> > Any help would be greatly appreciated!
> >
> > Thanks,
> > Jana.
> >
> >
> >
> > --
> > To unsubscribe, e-mail:   <
> > mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <
> > mailto:[EMAIL PROTECTED]>
> >
> >
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




RE: JSP's under WEB-INF... or not

2002-11-19 Thread Martin Cooper


On Tue, 19 Nov 2002, David Graham wrote:

> My understanding of WebLogic is that it does not allow jsps under WEB-INF.
> WebLogic is one of the 2 most popular containers so that makes this approach
> non-portable.

Ugh. Even in WebLogic 7? If this is really true, you can expect me to be
pestering them big time about this. ;-)

--
Martin Cooper


>
> David
>
>
>
>
>
>
> >From: Martin Cooper <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: Struts Users Mailing List <[EMAIL PROTECTED]>
> >Subject: RE: JSP's under WEB-INF... or not
> >Date: Tue, 19 Nov 2002 21:54:00 -0800 (PST)
> >
> >
> >
> >On Tue, 19 Nov 2002, David Graham wrote:
> >
> > > You can keep your jsps in public folders and protect them with this
> >security
> > > rule in your web.xml file.  This keeps your application portable and
> > > prevents direct access to jsps.  Just make sure nobody is added to the
> > > "nobody" role.
> >
> >Just curious - why would one choose to do this instead of simply locating
> >their JSP pages under WEB-INF (which is also portable)?
> >
> >--
> >Martin Cooper
> >
> >
> > >
> > > 
> > >   
> > >   SecureAllJSPs
> > >   *.jsp
> > >   
> > >
> > >   
> > >   
> > >   No roles should be able to access a JSP directly.  
>Everyone
> > >   must go through the controller servlet.
> > >   
> > >   nobody
> > >   
> > >   
> > >
> > > 
> > >   
> > >   Nobody should be in this role so jsp files are protected
> > >   from direct access.
> > >   
> > >   nobody
> > > 
> > >
> > >
> > >
> > >
> > >
> > >
> > > >From: "edgar" <[EMAIL PROTECTED]>
> > > >Reply-To: <[EMAIL PROTECTED]>
> > > >To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > > >Subject: RE: JSP's under WEB-INF... or not
> > > >Date: Tue, 19 Nov 2002 18:42:52 -0500
> > > >
> > > >The only reason with struts to put the jsp's under the web-inf is to
> > > >guarantee that your actions are executed in the expected manner.  If
> >you
> > > >leave the jsp's in a public directory then it is possible to execute
> > > >them out of sequence or without the proper form load / unload since the
> > > >web server will just as happily give out the jsp as the action in a
> > > >public directory.
> > > >
> > > >The style sheets and images were not supposed to be moved to the
> >web-inf
> > > >directory.  Perhaps that was the source of your problem.  Since tiles
> >is
> > > >driven by the struts action controller it will not be a problem in the
> > > >web-inf directory.
> > > >
> > > >Hope this helps
> > > >
> > > >Edgar
> > > >
> > > >-Original Message-
> > > >From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
> > > >Sent: Tuesday, November 19, 2002 5:41 PM
> > > >To: 'Struts Users Mailing List'
> > > >Subject: JSP's under WEB-INF... or not
> > > >
> > > >
> > > >
> > > >Having the jsp files under WEB-INF is nice because I know no one can
> >get
> > > >to them without going through an action.  But it already caused one
> > > >problem with my style sheet and the images within it.
> > > >
> > > >Now I'm about to add tiles to the mix, and I wonder if I'm going to
> > > >unnecessarily complicate my life by having my jsp's where they don't
> > > >"officially" belong.
> > > >
> > > >I'm wondering if I can get the same effect by putting them in
> > > >/path/to/tomcat/webapps/my_app/private and then putting a Filter in
> > > >front of just that directory to keep people from requesting those pages
> > > >directly.
> > > >
> > > >Any comments?  Other ideas?
> > > >
> > > >--
> > > >Wendy Smoak
> > > >Applications Systems Analyst, Sr.
> > > >Arizona State University PA Information Resources Management
> > > >
> > > >
> > > >--
> > > >To unsubscribe, e-mail:
> > > ><mailto:[EMAIL PROTECTED]>
> > > >For additional commands, e-mail:
> > > ><mailto:[EMAIL PROTECTED]>
> > >
> > >
> > > _
> > > Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> > > http://join.msn.com/?page=features/featuredemail
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> > >
> > >
> >
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> ><mailto:[EMAIL PROTECTED]>
>
>
> _
> Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




RE: JSP's under WEB-INF... or not

2002-11-19 Thread Martin Cooper


On Tue, 19 Nov 2002, David Graham wrote:

> You can keep your jsps in public folders and protect them with this security
> rule in your web.xml file.  This keeps your application portable and
> prevents direct access to jsps.  Just make sure nobody is added to the
> "nobody" role.

Just curious - why would one choose to do this instead of simply locating
their JSP pages under WEB-INF (which is also portable)?

--
Martin Cooper


>
> 
>   
>   SecureAllJSPs
>   *.jsp
>   
>
>   
>   
>   No roles should be able to access a JSP directly.  
>Everyone
>   must go through the controller servlet.
>   
>   nobody
>   
>   
>
> 
>   
>   Nobody should be in this role so jsp files are protected
>   from direct access.
>   
>   nobody
> 
>
>
>
>
>
>
> >From: "edgar" <[EMAIL PROTECTED]>
> >Reply-To: <[EMAIL PROTECTED]>
> >To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> >Subject: RE: JSP's under WEB-INF... or not
> >Date: Tue, 19 Nov 2002 18:42:52 -0500
> >
> >The only reason with struts to put the jsp's under the web-inf is to
> >guarantee that your actions are executed in the expected manner.  If you
> >leave the jsp's in a public directory then it is possible to execute
> >them out of sequence or without the proper form load / unload since the
> >web server will just as happily give out the jsp as the action in a
> >public directory.
> >
> >The style sheets and images were not supposed to be moved to the web-inf
> >directory.  Perhaps that was the source of your problem.  Since tiles is
> >driven by the struts action controller it will not be a problem in the
> >web-inf directory.
> >
> >Hope this helps
> >
> >Edgar
> >
> >-Original Message-
> >From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, November 19, 2002 5:41 PM
> >To: 'Struts Users Mailing List'
> >Subject: JSP's under WEB-INF... or not
> >
> >
> >
> >Having the jsp files under WEB-INF is nice because I know no one can get
> >to them without going through an action.  But it already caused one
> >problem with my style sheet and the images within it.
> >
> >Now I'm about to add tiles to the mix, and I wonder if I'm going to
> >unnecessarily complicate my life by having my jsp's where they don't
> >"officially" belong.
> >
> >I'm wondering if I can get the same effect by putting them in
> >/path/to/tomcat/webapps/my_app/private and then putting a Filter in
> >front of just that directory to keep people from requesting those pages
> >directly.
> >
> >Any comments?  Other ideas?
> >
> >--
> >Wendy Smoak
> >Applications Systems Analyst, Sr.
> >Arizona State University PA Information Resources Management
> >
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> ><mailto:[EMAIL PROTECTED]>
>
>
> _
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re: Access temporary files

2002-11-19 Thread Martin Cooper


On Wed, 20 Nov 2002, Bernhard Oberndorfer wrote:

> Thanks!
> But what do you mean with reliable in this case?
> Could a temporary file be deleted with no explicit destroy() or before the
> end of a session?
> By the way, when using textareas and DiskMultipartRequestHandler, the first
> newline is discarded!
> Maybe someway has the same problem(bug) too?

The DiskMultipartRequestHandler has a number of problems, including
several related to corruption of the uploaded data. The problem you are
seeing with a textarea is one of those. There are enough problems that are
difficult to fix that we decided to move to the Commons FileUpload
package for Struts 1.1. That package has no outstanding bugs, and is much
faster as well.

--
Martin Cooper


>
> Bernhard Oberndorfer
>
> - Original Message -
> From: "Martin Cooper" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 19, 2002 9:02 PM
> Subject: Re: Access temporary files
>
>
> >
> >
> > On Tue, 19 Nov 2002, Dan Tran wrote:
> >
> > > Configure your controller, via Struts config, to have multipartClass set
> to
> > > org.apache.struts.upload.DiskMultipartRequestHandler
> >
> > If you are using Struts 1.1, I strongly recommend that you do *not* do
> > this. The default file upload handler in Struts 1.1 is much faster and
> > much more reliable than the DiskMultipartRequestHandler implementation,
> > which will be deprecated in Struts 1.1.
> >
> > --
> > Martin Cooper
> >
> >
> > >
> > > Hope this helps
> > >
> > > -D
> > >
> > > - Original Message -
> > > From: "Bernhard Oberndorfer" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, November 19, 2002 12:57 AM
> > > Subject: Access temporary files
> > >
> > >
> > > > Hello
> > > >
> > > > Is there a way to access or to get the name of an temporary file which
> was
> > > > uploaded as FormFile(I use the  tag)?
> > > > DiskFile, which implements FormFile, for example provides a method
> > > > getFilePath() to get the temporary file path.
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
> >
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re: Access temporary files

2002-11-19 Thread Martin Cooper


On Tue, 19 Nov 2002, Dan Tran wrote:

> Martin, It is good to learn something new form you.
>
> However, as I look thru the default handler, the FormFile.getInputStream()
> returns a ByteArrayInputStream
> which somewhat equivalent to the strongly discouraged getFileData().  Any
> comment on this?

No, FormFile.getInputStream() returns an InputStream. See:

http://jakarta.apache.org/struts/doc-1.0.2/api/org/apache/struts/upload/FormFile.html#getInputStream()

What kind of input stream this is depends on the underlying
implementation. Struts 1.1 uses the Commons FileUpload package, by
default, and that package determines whether to store the uploaded part to
disk or not based on its size.

>
> Also, on the topic of DiskFile,  Others and I may just want to have access
> to the temp file and rename or move it
> to other location without paying for another round of copying.  I believe it
> is reasonable.

Again, you are assuming that there is a temp file. With the Commons
FileUpload implementation in Struts 1.1, even Struts does not know if
there is a temp file or not.

In a future version of both Commons FileUpload and Struts, it is possible
that we could add a method that allows specifying a File to write the
content to, using a file rename under the covers if possible. However, it
would have to be a future version of both packages, since it would require
an interface change in each.

Feel free to submit an enhancement request to Bugzilla if you'd like to
make sure we don't forget about this. ;-)

--
Martin Cooper


>
> -Dan
>
> - Original Message -
> From: "Martin Cooper" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 19, 2002 12:02 PM
> Subject: Re: Access temporary files
>
>
> >
> >
> > On Tue, 19 Nov 2002, Dan Tran wrote:
> >
> > > Configure your controller, via Struts config, to have multipartClass set
> to
> > > org.apache.struts.upload.DiskMultipartRequestHandler
> >
> > If you are using Struts 1.1, I strongly recommend that you do *not* do
> > this. The default file upload handler in Struts 1.1 is much faster and
> > much more reliable than the DiskMultipartRequestHandler implementation,
> > which will be deprecated in Struts 1.1.
> >
> > --
> > Martin Cooper
> >
> >
> > >
> > > Hope this helps
> > >
> > > -D
> > >
> > > - Original Message -
> > > From: "Bernhard Oberndorfer" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, November 19, 2002 12:57 AM
> > > Subject: Access temporary files
> > >
> > >
> > > > Hello
> > > >
> > > > Is there a way to access or to get the name of an temporary file which
> was
> > > > uploaded as FormFile(I use the  tag)?
> > > > DiskFile, which implements FormFile, for example provides a method
> > > > getFilePath() to get the temporary file path.
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




RE: which one to buy? Struts books? Any ideas?

2002-11-19 Thread Martin Cooper


On Tue, 19 Nov 2002, Michael C. Clark wrote:

> I've read the Goodwill book a couple of times.  If you're "not new"
> to struts, it may not be of great value.  It will get you up and
> running, is clearly and succinctly written and has good, though
> *basic* examples.

As far as I can tell, though, this book does not cover Struts 1.1 at all,
so if you're looking for information on "the latest Struts goodies", this
wouldn't be the right book. (Someone please correct me if I'm wrong.)

--
Martin Cooper


>
> -Mike
>
>  Original Message 
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: RE: which one to buy? Struts books? Any ideas?
> Date: Tue, 19 Nov 2002 16:07:15 +0200
>
> >Hi all,
> >
> >here is a list of struts books available, without being biased, can
> >anyone
> >tell me which books will be worth buying, and why? I'm not new to
> >struts,
> >although i haven't been using it for a year or so. I need to have a
> >decent
> >book to bring me up to date with the latest struts goodies. Also,
> >preferably
> >with some advanced struts stuff.
> >
> >Programming Jakarta Struts  by Chuck Cavaness; Paperback
> >Not yet published
> >Date added: November 4, 2002
> >
> >Struts in Action: Building Web Applications with the Leading Java
> >Framework
> >by Ted Husted, Craig R. McClanahan (Foreword); Paperback
> >Not yet published
> >Date added: November 4, 2002
> >Mastering Jakarta Strutsby James Goodwill; Paperback
> >
> >
> >
> >This message contains information intended solely for the addressee,
> >which is confidential or private in nature and subject to legal
> >privilege.
> >If you are not the intended recipient, you may not peruse, use,
> >disseminate, distribute or copy this message or any file attached to
> >this message.
> >Any such unauthorised use, is prohibited and may be unlawful. If you
> >have received this message in error, please notify the sender
> >immediately by e-mail,
> >facsimile or telephone and thereafter delete the original message
> >from your machine.
> >
> >Furthermore, the information contained in this message, and any
> >attachments thereto, is for information purposes only and may contain
> >the personal views and opinions of the author,
> >which are not necessarily the views and opinions of Dimension Data
> >(South Africa) (Proprietary) Limited or its subsidiaries and
> >associated companies ("Dimension Data").
> >Dimension Data therefore does not accept liability for any claims,
> >loss or damages of whatsoever nature, arising as a result of the
> >reliance on such information by anyone.
> >
> >Whilst all reasonable steps are taken to ensure the accuracy and
> >integrity of information transmitted electronically and to preserve
> >the confidentiality thereof,
> >Dimension Data accepts no liability or responsibility whatsoever if
> >information or data is, for whatsoever reason, incorrect, corrupted
> >or does not reach its intended destination.
> >
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re: Access temporary files

2002-11-19 Thread Martin Cooper


On Tue, 19 Nov 2002, Dan Tran wrote:

> Configure your controller, via Struts config, to have multipartClass set to
> org.apache.struts.upload.DiskMultipartRequestHandler

If you are using Struts 1.1, I strongly recommend that you do *not* do
this. The default file upload handler in Struts 1.1 is much faster and
much more reliable than the DiskMultipartRequestHandler implementation,
which will be deprecated in Struts 1.1.

--
Martin Cooper


>
> Hope this helps
>
> -D
>
> - Original Message -
> From: "Bernhard Oberndorfer" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, November 19, 2002 12:57 AM
> Subject: Access temporary files
>
>
> > Hello
> >
> > Is there a way to access or to get the name of an temporary file which was
> > uploaded as FormFile(I use the  tag)?
> > DiskFile, which implements FormFile, for example provides a method
> > getFilePath() to get the temporary file path.
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re: Access temporary files

2002-11-19 Thread Martin Cooper


On Tue, 19 Nov 2002, Bernhard Oberndorfer wrote:

> Hello
>
> Is there a way to access or to get the name of an temporary file which was
> uploaded as FormFile(I use the  tag)?
> DiskFile, which implements FormFile, for example provides a method
> getFilePath() to get the temporary file path.

You are assuming that there *is* a temp file corresponding to the uploaded
data. That is an implementation-specific detail, which is why the FormFile
interface does not expose it.

You can access the uploaded content using the getInputStream() method.

--
Martin Cooper


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


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




Re: Loosing my parameter in the multipart request

2002-11-19 Thread Martin Cooper


On Tue, 19 Nov 2002, Murray, Christopher wrote:

> Hey there guys n gals,
>
> I seem to be loosing a parameter of my request when I submit a multi-part
> form.

Yes, this is a bug. A fix is already in the works. Thanks for submitting
the bug report to Bugzilla.

--
Martin Cooper


>
> In the page I have a,
>
> 
>
> this is written to by a call to,
>
>  href="javascript:submitFormDispatch('UploadForm','performUpload')">LINK
>
> which calls,
>
>   function submitFormDispatch( formname, value )
>   {
>   var form = document.forms[ formname ];
>   var elements = form.elements;
>
>   elements[ 'userAction' ].value = value;
>   alert("userAction =" + value);
>   form.submit();
>   }
>
> Now I know this is working because the alert pops up to tell me.
>
> When the reset method is called in the ActionForm I get a null pointer
> exception because no parameter is found for the action mapping set in the
> struts-config.xml,
>
>  type="com...UploadAction"
> name="UploadForm"
> scope="session"
> validate="true"
> input="/.../upload.jsp"
> parameter="userAction">
>  path="/.../upload.jsp">
>  path="/.../Upload_confirmed.jsp">
> 
> 
>
> And then in the form I've been using,
>
> public void reset(ActionMapping mapping, HttpServletRequest request){
>
> FWLog log = FWLogManager.getLog("UploadActionForm");
> log.debug("Entering UploadActionForm.reset");
>
> System.out.println("mapping.getParameter() = " +
> mapping.getParameter());
> System.out.println("request.getParameter(mapping.getParameter()) =
> ");
> System.out.println(request.getParameter(mapping.getParameter()));
>
> System.out.println("request = " + request.toString());
>
> if
> (request.getParameter(mapping.getParameter()).equals(Constants.STAGE_ACTION_
> METHOD)){
>
> this.emailText = null;
> contactId = null;
> log.debug("email text has been reset.");
> }
>
> log.debug("Entering UploadActionForm.reset");
> }
>
> When all this executes this outputs
>
> mapping.getParameter() = userAction
> request.getParameter(mapping.getParameter()) =
> null
> request = org.apache.struts.upload.MultipartRequestWrapper@799ca4
>
> java.lang.NullPointerException
> at com...web.action.UploadActionForm.reset(Unknown Source)
>
> Guessing that a Multipart request is a different request object.
>
> Have you got any suggestions ?
>
> Is this possible ?
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re: Keeping up to date with nightly builds

2002-11-18 Thread Martin Cooper


On Mon, 18 Nov 2002, Wendy Smoak wrote:

>
> Does anyone have a procedure for updating an existing project to use all the
> stuff from a nightly build?
>
> So far, I delete my 'jakarta-struts' directory and unzip both of the nightly
> build files (source & binary) again.  Then I copy all the .jar files, all
> the .tld files and the validator-rules.xml file over from the unzipped
> jakarta-struts/lib into the appropriate places in my own project.
>
> I'm a bit confused about the .dtd files included with the nightly build from
> the 18th.  They don't seem to be used anywhere.  For example, there is a
> validator-rules_1_1.dtd, but the included validator-rules.xml file uses
> http://jakarta.apache.org/commons/dtds/validator_1_0.dtd.

If you check the latest version of validator-rules_1_1.dtd, you'll find
DEPRECATED comments all over it. The Validator is now part of Jakarta
Commons, and so the latest code references the Commons Validator DTD. The
DTD in the Struts tree is maintained for backwards compatibility only.

--
Martin Cooper


>
> Do I need these .dtd files from the nightly build?  Have I missed anything?
> (It compiles, but I've already caused myself problems by using some files
> from one build and some from another!)
>
> Thanks,
>
> --
> Wendy Smoak
> Applications Systems Analyst, Sr.
> Arizona State University PA Information Resources Management
>


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




Re: In which cases should we use DiskFile?

2002-11-18 Thread Martin Cooper


On Sun, 17 Nov 2002, Huynh Ngoc Huy wrote:

>   Hi all,
>   In which cases should we use DiskFile?

DiskFile is an implementation of the FormFile interface. In almost all
cases, you should use FormFile and not DiskFile. The exception is when you
are using dynamic form beans, and you need to specify the class to
instantiate for a particular form bean property.

--
Martin Cooper


>   Thanks,
>   Huy
>
>
> __
> Do you Yahoo!?
> Yahoo! Web Hosting - Let the expert host your site
> http://webhosting.yahoo.com
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re: dynamic img with EL

2002-11-18 Thread Martin Cooper


On Mon, 18 Nov 2002, Mohan Radhakrishnan wrote:

> Hi,
> We are using EL(JSTL) to display dynamic img tags.
>
>usemap="#Map"/>
>
>   Is this valid ? It doesn't really pick up the value of the 'src' tag.
> Having read the archives I've decided that there is no other way. We need
> URL rewriting.

The regular  tag doesn't understand the JSTL EL. You'll need to
use the corresponding Struts-EL tag, , to do what you want.

--
Martin Cooper


>
> Thanks,
> Mohan
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re: Assigning an object(FormFile) to a dynamic form.

2002-11-18 Thread Martin Cooper


On Mon, 18 Nov 2002, Reza Aliakbari wrote:

> Hi,
>
> I use dynamic forms in my projects; but this time I want to upload
> A file and when I usetype="org.apache.struts.upload.FormFile" />
> An error occurs that says that cannot assign String to FormFile.
> How can I use dynamic form with this kind of objects?

FormFile is an interface, so it can't be instantiated. Try using DiskFile
instead - it implements FormFile.

--
Martin Cooper


>
> Thanks, reza.
>
>


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




Re: What can I do to display unicode-string in struts tag?

2002-11-17 Thread Martin Cooper


On Thu, 14 Nov 2002, Huynh Ngoc Huy wrote:

>   I'm using struts version 1.1b2. The followings are
> my snippet codes:
>
> *  struts-config.xml *
>   ...
>   
> type="org.apache.struts.action.DynaActionForm">
> type="java.lang.String"/>
>   ...
>  type="anAction"
>   name="aForm">
> 
>   
>   ...
>
> *  anAction.java *
>   ...
>   String s = ;
>   PropertyUtils.setSimpleProperty(form, "msg", s);
>   ...
>   return mapping.findForward("target");
>
> *  index.jsp *
>   <%@ taglib uri="/WEB-INF/struts-html.tld"
>   prefix="html" %>
>
> go
>
> *  result.jsp *
>   <%@ taglib uri="/WEB-INF/struts-html.tld"
>   prefix="html" %>
>
>   
> 
>   
>
> *
>
>   In the result.jsp, the textarea cannot display the
> unicode-string correctly.

What do you mean by "unicode-string"? Strings in Java are always Unicode.
Perhaps you mean a string that contains non-Latin characters? If that's
the case, you'll need to specify the encoding you want in the JSP page.
The pages above do not specify an encoding, so they are defaulting to
ISO-8859-1, which may not be what you want.

Also, I've seen a couple of people mention problems related to storing
non-Latin characters in a MySql database. I don't use MySql, so I can't
help you with that, but you'll probably find more information in the
mailing list archives.

--
Martin Cooper


>   Any help is appreciated !
>   Thanks in advance,
>   Huy
>
>
> __
> Do you Yahoo!?
> Yahoo! Web Hosting - Let the expert host your site
> http://webhosting.yahoo.com
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




RE: Tiles referencing actions.

2002-11-17 Thread Martin Cooper


On Fri, 15 Nov 2002, ROSSEL Olivier wrote:

> > But when I want to tiles:put the output of the LoginState
> > action into the
> > loginBox :
> >
> > 
> >  
> >  
> > 
> >
> > , nothing appears.
> >
> > My question:
> > is it possible to have tiles:put to display the output of an
> > action, instead
> > of just the output of a
> > (statically-referenced) jsp.
>
> I answer to me:
> yes you can reference to a Struts action from a tile.
> But this action must not forward to a result page via a redirection
> (:  will make the tile to display nothing.)
>
> So my question is: why?
> Having redirect="true" in the  of an action is quite
> good. But it is incompatible with tiles, which are also quite good.

Tiles needs to use request attributes to communicate information between
the tiles on a page. Using a redirect loses att request attributes,
because it requires a round trip to the browser and back.

--
Martin Cooper


>
> Is it a feature?
>
> This e-mail is intended only for the above addressee. It may contain
> privileged information. If you are not the addressee you must not copy,
> distribute, disclose or use any of the information in it. If you have
> received it in error please delete it and immediately notify the sender.
> Security Notice: all e-mail, sent to or from this address, may be
> accessed by someone other than the recipient, for system management and
> security reasons. This access is controlled under Regulation of
> Investigatory Powers Act 2000, Lawful Business Practises.
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re: Small log4j PlugIn-Contribution

2002-11-17 Thread Martin Cooper


On Fri, 15 Nov 2002, Thomas Nagel wrote:

> Hi,
>
> I guess more people than I had the problem to use log4j inside a
> "non log4j enviroment" e.g. Caucho Resin.

I'm not sure I understand why you need this plugin (apart from the
reloading aspect). If you have log4j.jar in WEB-INF/lib and
log4j.properties in WEB-INF/classes, it should just work.

--
Martin Cooper


>
> I wrote a small Struts log4j PlugIn which might be useful to those
> who do not want to reinvent the wheel ;-)
>
> The Plug-In is also able to reload configuration after a given sleep time,
> because restarting the server on every property file change anoyed me.
>
> Use:
> 
> 1) put your log4j.properties in your /WEB-INF/ directory.
>
> 2) Add the following to your struts-config.xml
>
> 
> 
> 
>
> 
>value="/WEB-INF/log4j.properties" />
>   
>
>
> 3) Compile the following and add to your /WEB-INF/classes
>
> - code -
>
> import java.io.File;
> import javax.servlet.ServletException;
>
> import org.apache.log4j.PropertyConfigurator;
> import org.apache.log4j.Logger;
>
> import org.apache.struts.action.PlugIn;
> import org.apache.struts.config.ApplicationConfig;
> import org.apache.struts.action.ActionServlet;
>
> /**
>  * Initializes the http://jakarta.apache.org/log4j";>log4j
>  * system with a given log4j.properties file for non - Log4j enviroments,
>  * e.g. Caucho Resin.
>  * 
>  * This class also starts a background thread which checks the modification
>  * time of the property file periodically (sleepTime) and updates the
>  * system if necessary.
>  * 
>  * Default sleep time is 2 minutes, a sleep time of 0 simply means
>  * NO background thread.
>  *
>  * @author  mailto:[EMAIL PROTECTED]";>Thomas Nagel
>  * @version $Revision: 1.1 $ $Date: 2002/11/12 09:23:27 $
>  */
> public final class Log4jPlugIn implements PlugIn {
>
> // --- members
>
> /** Logger instance to use with this Plugin. */
> private Logger log;
>
> /** Path to find the log properties. */
> private String _logConfiguration;
>
> /** Which configuration file to use. */
> private File _logProperties;
>
> /** When was last time the logging properties where modified. */
> private long _lastChange;
>
>
> /**
>  * The background thread which updates the log4j if the configuration
>  * file has changed.
>  */
> private ModificationWatcher _modificationWatcher;
>
> /**
>  * How long should the modification thread sleep until
>  * it reloads the configuration? Default to 2 minutes
>  * (12 milliseconds).
>  */
>  private long _sleepTime = 12;
>
>
>
> // --- constructor
>
> /** Creates a new instance of DatabasePlugIn */
> public Log4jPlugIn() {}
>
>
> // --- methods
>
> /**
>  * Initializes the Log4jPlugIn by configuring the log4j system
>  * with the given property file.
>  *
>  * @throws ServletException if initialization failes.
>  */
> public void init(ActionServlet servlet,
> ApplicationConfig applicationConfig) throws
> ServletException {
> try{
> _logProperties =
>  new
> File(servlet.getServletContext().getRealPath(getLogProperties()));
> configureLog4j();
> log = Logger.getLogger(getClass().getName());
>
> if(_sleepTime > 0 ){
> _modificationWatcher = new
> Log4jPlugIn.ModificationWatcher();
> _modificationWatcher.start();
> }
> }catch(Exception e){
> throw new ServletException("Could not initialize log4j
> subsystem", e);
> }
> log.info("Log4j successfully initialized.");
> }
>
>
> /**
>  * Not used but required by interface.
>  */
> public void destroy() {
> log.info("Shutting down log4j system.");
> _modificationWatcher.shutdown();
> }
>
>
> /**
>  * Configures the log4j system.
>  */
> private void configureLog4j() throws Exception {
> PropertyConfigurator.configure(_logProperties.toURL());
> _lastChange  = _logProperties.lastModified();
> }
>
>
> // 
> properties
>
> publ

  1   2   3   4   5   6   >