Request from contributer user.....

2001-05-24 Thread Jonathan Asbell



Hello all.  I am still only a few months 
playing with struts but I would like to ask if you wouldn't mind 
putting more detailed debugging in the framework.  I personally am 
studying the framework by reading about it, but most importantly by watching how 
it performs step by step.  I do this by adding the same type of statements 
as yours, but if you set a debug level of 5 it gives you a step by 
step view of what is occuring.  Could you consider this.  It is 
because it is hard enough to understand a framework when you really cant see 
exactly what is happening.  But it is a nice framewor ;^>
 
respectfully
Jonathan


How to run example ?

2001-05-24 Thread Mahesh

Hi all,

can any of you tell me how to run the struts example ? I am using
Jakarta-tomcat as my webserver ?

Thanks heaps.
Mahesh.




Re: Possible to access Init Params from JSP??

2001-05-24 Thread Jim Richards



George Craig wrote:
> Yes you can. Here is how to do it:
> 
> <%=
> application.getInitParameter(SOME_KEY)
> %>

Does this actually work? I've had report that in Tomcat and JRUN,
it doesn't seem to return the values. Has anyone used it?



Re: subclassing ActionServlet?

2001-05-24 Thread Jim Richards


I made a sub-class of ActionServlet an overloaded the initXXX()
method that created the connecion pool. I did this because
my database manager beans needed access to the connection
pool parameters.

The other choice is to use something like a singleton or factory
bean pattery that generates the objects (or returns an instance
to an already created one) as you need it. The down side is
it may not have the initialisation parameters it needs.

[EMAIL PROTECTED] wrote:
> 
> Hello struts-users,
> 
> My webapp needs bunch of beans that should be available
> all the time and accessible from all JSP pages, so I guess I
> have to create the beans at the startup time and set them to
> the application context.
> 
> How should I do this? My candidates are,
> 
> 1) create a subclass of ActionServlet and do it there,
> 2) create a subclass of Servlet (unrelated to ActionServlet)
> and do it there.
> 
> Which is better, or are there any other standard ways?
> I don't see any examples that use subclasses of ActionServlet,
> and I am wondering if there are some reasons not to.
> 
> Thanks in advance,
> 
> - kazumi



who provides ActionMapping class?

2001-05-24 Thread iwanek

Hello struts-users,

A newbie question:

Who is responsible for providing ActionMapping class?
My prototype webapp runs fine with 
descriptions in the struts-config.xml, I did not have to
write ActionMapping.java for this myself. I must be
missing something.

Digester documetation seems to me to imply that I'd
have to write a class to parse struts-config.xml and create
ActionMapping.java using Digester. I am confused.

- kazumi



Re: Possible to access Init Params from JSP??

2001-05-24 Thread George Craig

Yes you can. Here is how to do it:

<%=
application.getInitParameter(SOME_KEY)
%>

- George

- Original Message - 
From: "Peter Smith" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 24, 2001 9:48 PM
Subject: Possible to access Init Params from JSP??


> I have access to the parameters in my web.xml file
> from a class which extends ActionServlet using:
> 
>   getServletConfig().getInitParameter( SOME_KEY );
> 
> I'd like to access those same parameters from a JSP
> which is 'forwarded' to.  Can it be done?
> 
> Thanks.
> 
> --Peter--
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/




Possible to access Init Params from JSP??

2001-05-24 Thread Peter Smith

I have access to the parameters in my web.xml file
from a class which extends ActionServlet using:

  getServletConfig().getInitParameter( SOME_KEY );

I'd like to access those same parameters from a JSP
which is 'forwarded' to.  Can it be done?

Thanks.

--Peter--


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



subclassing ActionServlet?

2001-05-24 Thread iwanek

Hello struts-users,

My webapp needs bunch of beans that should be available
all the time and accessible from all JSP pages, so I guess I
have to create the beans at the startup time and set them to
the application context.

How should I do this? My candidates are,

1) create a subclass of ActionServlet and do it there,
2) create a subclass of Servlet (unrelated to ActionServlet)
and do it there.

Which is better, or are there any other standard ways?
I don't see any examples that use subclasses of ActionServlet,
and I am wondering if there are some reasons not to.

Thanks in advance,

- kazumi



RE: more connection pool problems ....

2001-05-24 Thread Gogineni, Pratima
Title: more connection pool problems 



Thanks 
- there is no problem with running under the system dsn - I was just 
wondering why I should see different behavior on the two 
appservers.
 
I 
didnt see anything in the documentation but the JRun news groups seems to have 
several threads and which ended with an answer from the JRun engineers saying 
that they should use a system dsn rather than user dsn, since user dsn's are not 
detected under certain circumstances. No reason given for 
this.
 
Could 
you as you said it runs under system account ...
 
Thanks
Pratima

  -Original Message-From: Roman Fail 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 24, 2001 5:28 
  PMTo: [EMAIL PROTECTED]Subject: RE: more 
  connection pool problems 
  The most likely reason is that Jrun runs under the SYSTEM account or some 
  other account besides the one you are logged in with.  A "User" DSN works 
  with one specific account only.  I guess Tomcat runs under the currently 
  logged in user.  Consult the JRun docs to find out what account it runs 
  under - it may even run under several accounts at different times, including 
  the IUSR Internet Guest Account.  You would have to set up a User DSN for 
  each of these accounts if that is the case.
   
  What the problem with running it as a System DSN anyway?  
  Security issues?
   
  Roman
  
-Original Message- From: Gogineni, 
Pratima Sent: Thu 5/24/2001 3:49 PM To: 
'[EMAIL PROTECTED]' Cc: Subject: more 
connection pool problems 
I see the following strange behavior or JRUN and *Not* on 
TOMCAT.I have an access database that is registered as an ODBC "user 
dsn" - theconnection pool finds the datasource the runs fine in tomcat 
but when thesame war file is running in JRUN a URI not found exception 
is thrown. But ifcreate a "system dsn" both tomcat and jrun find the 
datasource without anyproblem.would anyone happen to have an 
idea as to why this should occur? I am usingthe JDBC-ODBC bridge as the 
driver 
..thankspratima


struts-upload.war

2001-05-24 Thread Ken Torimaru

Hi

Are there any known problems with struts-upload.war

When I try to run it I get the following:

500 Servlet Exception
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1159)
at java.io.File.createTempFile(File.java:1244)
at
org.apache.struts.upload.MultipartIterator.createLocalFile(MultipartIterator
.java:481)
at
org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.
java:217)
at
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMulti
partRequestHandler.java:76)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:726)
at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
42)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1552)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:508)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:83)
at com.caucho.server.http.Invocation.service(Invocation.java:296)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:121)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:238)
at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:157)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:484)




Resin 1.2.3 (built Thu Feb 15 11:31:58 PST 2001)

I'm trying to transfer a file from a Win200 machine to a Linux box.

Thanks

Ken

PS all the other WAR files seem to be working.




RE: more connection pool problems ....

2001-05-24 Thread Roman Fail

The most likely reason is that Jrun runs under the SYSTEM account or
some other account besides the one you are logged in with.  A "User" DSN
works with one specific account only.  I guess Tomcat runs under the
currently logged in user.  Consult the JRun docs to find out what
account it runs under - it may even run under several accounts at
different times, including the IUSR Internet Guest Account.  You would
have to set up a User DSN for each of these accounts if that is the
case.
 
What the problem with running it as a System DSN anyway?  Security
issues?
 
Roman

-Original Message- 
From: Gogineni, Pratima 
Sent: Thu 5/24/2001 3:49 PM 
To: '[EMAIL PROTECTED]' 
Cc: 
Subject: more connection pool problems 



I see the following strange behavior or JRUN and *Not* on
TOMCAT.

I have an access database that is registered as an ODBC "user
dsn" - the
connection pool finds the datasource the runs fine in tomcat but
when the
same war file is running in JRUN a URI not found exception is
thrown. But if
create a "system dsn" both tomcat and jrun find the datasource
without any
problem.

would anyone happen to have an idea as to why this should occur?
I am using
the JDBC-ODBC bridge as the driver ..

thanks
pratima



 winmail.dat


Re: digester and whitespace in XML text body

2001-05-24 Thread Mark Simms

I believe the digester must be rewritten to support the JAXP 1.1 specs.
wow, almost everything in digester is now deprecated...

- Original Message - 
From: "Nick Afshartous" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, May 24, 2001 1:25 PM
Subject: digester and whitespace in XML text body


> 
> I'd like to follow up on my original post.  It looks like the
> digester.CallMethodRule.body method doesn't remove whitespace
> from both ends of the XML body text.  However, other rules
> like digester.CallParamRule.body actually do by calling method
> String.trim.
> 
> Maybe the call to String.trim should be in a central place 
> (i.e. digester.Digester) so that the individual rules don't 
> have to worry about removing the whitespace ?
> 
> I'd be happy to work on a patch.
> -- 
> 
> Nick
> 
> 
> 
> From: Nick Afshartous <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: digester and whitespace in XML text body
> Date: Wed, 23 May 2001 17:11:27 -0400 (EDT)
> 
> 
> Hi,
> 
> I'm using the digester to process the nested content in
> XML tags and am noticing that the leading/trailing whitespace
> doesn't seem to be removed as advertised in the doc.  
> 
> For instance, the rule
> 
> digester.addCallMethod("gateway/application/app-name", 
>"setAppName", 0);
> 
> results in the method setAppName being called with the surrounding
> whitespace in 
> 
>foo  
> 
> If anyone has any idea how to tell the digester to ignore 
> the leading/trailing whitespace please let me now, thanks.
> -- 
> 
> Nick




RE: what is 'input' for

2001-05-24 Thread Deadman, Hal

That's where you will forwarded back to if the validate() function on the
ActionForm returns errors.

> -Original Message-
> From: Blue, Neil [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 24, 2001 10:22 AM
> To: [EMAIL PROTECTED]
> Subject: what is 'input' for
>
>
> Hello,
>
> I am trying to figure out what the input attribute in the action
> mappings is
> for. Could anyone help please.
>
> Cheers
> Neil



RE: Options tag problem

2001-05-24 Thread Deadman, Hal

I don't think the option tag will work like that. You can either put your
Hashset in some scope, call it something like "persons" and then use the




Or you could have two methods on your form, one that returns a collection of
Strings for the label and another that returns a collection of Strings for
the value. If they are the same then what you are doing  will work but you need to change the getPersons method
to return a collection of strings instead of beans.

The options documentation is confusing but giving the tag any more
flexibility would only make it that much more complex. The fact that the
attributes "property" and "labelProperty" mean two different things
depending on whether "collection" is used makes it confusing. You basically
need the first usage with an alternate way of specifying the collection.

Disclaimer: I could be confused myself.

Hal

> -Original Message-
> From: Mikkel Bruun [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 24, 2001 6:13 AM
> To: '[EMAIL PROTECTED] '
> Subject: Options tag problem
>
>
>
> Hi Guys!
>
> I have an ActionForm which contains a HashSet named Persons that
> contains
> several instances of Person
>
> In my jsp i want a dropdown box showing the Person's name.
>
> code:
> 
>
> This points to the getPersons() method in the ActionForm
> that'll return
> a
> HashSet...
> Now I need to access each elements getName() method, but
> looking through
> the
> options tag code, it seems like it can only handle Collections of
> Stringsis this correct
>
> Any suggestions on how to solve it???
>
> thanks
>
> Mikkel



RE: struts framework without its TAG LIBRARIES in jsp pages how?

2001-05-24 Thread Nanduri, Amarnath

Sanjay,

   Use the  tag . It will automatically create your bean. Use
jsp tags to set the properties of the bean. In your form post, when you call
the action.do , the ActionServlet will automatically populate the bean (the
bean that is mapped to this action in the struts-config.xml file), call its
validate() method and if everything is satisfactory call the perform()
method on the Action. A best way to deal with this is to code a simple
example.

cheers,
Amar..

-Original Message-
From: Sanjay Melinamani [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 1:56 PM
To: '[EMAIL PROTECTED]'
Subject: RE: struts framework without its TAG LIBRARIES in jsp pages
how?


but my question is how? If we use HTML, how is the "ActionForm" gets
delegated to Action::perform() method? 
I guess we have to explicitly use the ActionForm bean and call its "set"
methods...I am not sure about this !

If u suggest me as how is the ActionForm will be delegated to the
Action::perfom method, that would be great !

thanx
sanjay


> -Original Message-
> From: Nanduri, Amarnath [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, May 24, 2001 5:21 AM
> To:   '[EMAIL PROTECTED]'
> Subject:  RE: struts framework without its TAG LIBRARIES in jsp pages
> how?
> 
> You can ignore the Tag Libraries and still use the ActionServlet, Actions
> and ActionForms functionality. Write your own html . The beauty of using
> the
> Tag Libraries is that they are fully internationalized. But if
> internationalization is not an issue, then by all means write your own
> html
> without using the Tag Libraries.
> 
> 
> cheers,
> Amar..
> 
> -Original Message-
> From: Sanjay Melinamani [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 23, 2001 7:49 PM
> To: [EMAIL PROTECTED]
> Subject: struts framework without its TAG LIBRARIES in jsp pages how?
> 
> 
> > hi,
> > I am trying to make use of struts framework in our application. But can
> I
> > implement the frame work "without" using its Tag libraries? If so how
> can
> > I do it? Basically I do not wnat to use Struts TAG LIBRARIES in my JSP
> > pages.
> > 
> > thanx
> > regards
> > sanjay
> > 



more connection pool problems ....

2001-05-24 Thread Gogineni, Pratima

I see the following strange behavior or JRUN and *Not* on TOMCAT.

I have an access database that is registered as an ODBC "user dsn" - the
connection pool finds the datasource the runs fine in tomcat but when the
same war file is running in JRUN a URI not found exception is thrown. But if
create a "system dsn" both tomcat and jrun find the datasource without any
problem.

would anyone happen to have an idea as to why this should occur? I am using
the JDBC-ODBC bridge as the driver ..

thanks
pratima 



RE: New ActionMapping Class

2001-05-24 Thread Michael Binette

Great.  It worked.

I am using this so that I can easily use one action class for multiple
actions such as "view", "edit", "delete" and "save", where it makes sense.
I wanted multiple Action mappings such as /editUser.do and /saveUser.do but
have them both use the same Action class.

I used your Transport idea and created an ActionInfo class to contain
properties with the mapping, request, response, form, and my new
processAction properties.

I also created a GenericAction that extends Action, sets up the ActionInfo
and calls an abstract method processAction(ActionInfo actionInfo).

Hopefully this will save me from the many Action classes per jsp view.

I've created a ViewSubmitAction that extends my GenericAction that looks at
the processAction and calls either processView(ActionInfo actionInfo) - an
abstract method of ViewSubmitAction, or processSubmit(AcitonInfo
actionInfo) - which can take care of all other cases.

anyways...  Thanks for the tip.

--
Thanks,
Michael Binette


-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 23, 2001 8:45 PM
To: [EMAIL PROTECTED]
Subject: RE: New ActionMapping Class


Michael

You need to use a  tag is Struts-config.xml

For example:


  
  
  


Niall

> -Original Message-
> From: Michael Binette [mailto:[EMAIL PROTECTED]]
> Sent: 22 May 2001 23:53
> To: Struts-User
> Subject: New ActionMapping Class
>
>
> I created a new GenericActionMapping class that extends ActionMapping.  I
> added one property, processAction with public getter and setter
> methods for
> it.
>
> I then set the mapping property in web.xml for the struts Action
> servlet to
> my new GenericActionMapping class.  The log when I run TomCat correctly
> shows it using my new GenericActionMapping class.
>
> But, if I add processAction="whatever" to my struts-config.xml, within the
>  element, I get a SAXParseException, Attribute "processAction" is
> not declared for element "action".
>
> How do I get this to work?
>
> --
> Thanks,
> Michael Binette
>
>





RE: tricky mapping

2001-05-24 Thread Yuriy Zubarev

John,

Thanks a LOT!!!
"Content-disposition" header made my day. There is still
a problem when user selects "Save target as..." but when
he clicks the link a browser suggests the default name
as expected.

Thanks again!

Best of luck,
Yuriy Zubarev



--- John Schroeder <[EMAIL PROTECTED]> wrote:
> Yuri,
> 
> I have run into something similar with Excel files, but I'm not sure if
> it
> will address your current issue.
> 
> My problem: when users run a report, return to them an Excel worksheet
> instead of HTML.
> Our particular approach used JSP's to easily handle the formatting of
> the
> Excel doc, but you by no means would need to do so.  You just need to
> set
> the proper Content-type and Content-disposition headers.
> 
> <%@page contentType="application/vnd.ms-excel"%>
> <% response.setHeader("Content-disposition", "inline;
> filename\"myreport.xls\""); %>
> 
> Now when a user chooses to save the file, the default name is
> myreport.xls,
> and the content returned is of the proper MIME-type.
> 
> Hope this helps!
> 
> --John
> 
> 
> 
> 
> -Original Message-
> From: Yuriy Zubarev [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 24, 2001 12:33 PM
> To: [EMAIL PROTECTED]
> Subject: tricky mapping
> 
> 
> Hello everyone,
> 
> I'm not quite sure that my question is truly struts-related,
> but since I'm developing a web-application using struts as a framework,
> I decided to post it here.
> 
> A little proem. I'm in the middle of developing a web-mail facility
> and I've come to the point where I have to display mails' attachments.
> In general everything is fine except one minor but annoying thing.
> When a user double-clicks on a attachment link and selects
> "Save target as...", a browser presents "Save as" dialog and offers
> a default name for requested object which looks like "EmailPart",
> because the syntax of the link is as following:
> 
> "http://domain-name/EmailPart.do?part=1";
> 
> I know the name of the requested attachment file in advance but I don't
> know how to fit it into the URL so that a browser can offer that
> name instead of "EmailPart".
> 
> On yahoo web-mail a link that points to attachment looks like this:
> 
>
"http://yahoo_address/ym/ShowLetter/Account%5fmonitor%5fwork%5fflow.doc?box=
>
Inbox&MsgId=1915_4666388_102413_741_67881_0&bodyPart=2&filename=Account%5fmo
> nitor%5fwork%5fflow.doc&download=1&YY=2060&order=down&sort=date&pos=0"
> 
> Bearing in mind this syntax I tried to make my link looks like:
> 
> "...domain-name/EmailPart/File_name.ext?part=1"
> 
> And of course I failed, because the server (tomcat) treated
> "EmailPart" as a directory (I assume so) but not as action.
> 
> So I would like to ask if anyone came across this problem
> and found a solution. Any suggestions would be highly
> appreciated.
> 
> 
> Thank you for your time.
> 
> Best of luck,
> Yuriy Zubarev
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



RE: what is 'input' for

2001-05-24 Thread Blue, Neil

Thank you Dave,

That will explain the error messages that I have been getting too :)

Neil

-Original Message-
From: Firmin David [mailto:[EMAIL PROTECTED]]
Sent: 24 May 2001 15:34
To: '[EMAIL PROTECTED]'
Subject: RE: what is 'input' for


If the validate() method of the actionform returns errors, the framework
will call the page specified by the mapping's "input" attribute so that they
can be displayed.
The idea is that the input attribute specifies the page from which the input
required for the action is obtained.

HTH

Dave

-Original Message-
From: Blue, Neil [mailto:[EMAIL PROTECTED]]
Sent: 24 May 2001 15:22
To: [EMAIL PROTECTED]
Subject: what is 'input' for


Hello,

I am trying to figure out what the input attribute in the action mappings is
for. Could anyone help please.

Cheers
Neil


The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***




RE: tricky mapping

2001-05-24 Thread John Schroeder

Yuri,

I have run into something similar with Excel files, but I'm not sure if it
will address your current issue.

My problem: when users run a report, return to them an Excel worksheet
instead of HTML.
Our particular approach used JSP's to easily handle the formatting of the
Excel doc, but you by no means would need to do so.  You just need to set
the proper Content-type and Content-disposition headers.

<%@page contentType="application/vnd.ms-excel"%>
<% response.setHeader("Content-disposition", "inline;
filename\"myreport.xls\""); %>

Now when a user chooses to save the file, the default name is myreport.xls,
and the content returned is of the proper MIME-type.

Hope this helps!

--John




-Original Message-
From: Yuriy Zubarev [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 12:33 PM
To: [EMAIL PROTECTED]
Subject: tricky mapping


Hello everyone,

I'm not quite sure that my question is truly struts-related,
but since I'm developing a web-application using struts as a framework,
I decided to post it here.

A little proem. I'm in the middle of developing a web-mail facility
and I've come to the point where I have to display mails' attachments.
In general everything is fine except one minor but annoying thing.
When a user double-clicks on a attachment link and selects
"Save target as...", a browser presents "Save as" dialog and offers
a default name for requested object which looks like "EmailPart",
because the syntax of the link is as following:

"http://domain-name/EmailPart.do?part=1";

I know the name of the requested attachment file in advance but I don't
know how to fit it into the URL so that a browser can offer that
name instead of "EmailPart".

On yahoo web-mail a link that points to attachment looks like this:

"http://yahoo_address/ym/ShowLetter/Account%5fmonitor%5fwork%5fflow.doc?box=
Inbox&MsgId=1915_4666388_102413_741_67881_0&bodyPart=2&filename=Account%5fmo
nitor%5fwork%5fflow.doc&download=1&YY=2060&order=down&sort=date&pos=0"

Bearing in mind this syntax I tried to make my link looks like:

"...domain-name/EmailPart/File_name.ext?part=1"

And of course I failed, because the server (tomcat) treated
"EmailPart" as a directory (I assume so) but not as action.

So I would like to ask if anyone came across this problem
and found a solution. Any suggestions would be highly
appreciated.


Thank you for your time.

Best of luck,
Yuriy Zubarev


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



form out of order in struts-example?

2001-05-24 Thread andrew_hart


I have downloaded the Struts framework for evaluation.  I have it installed
on a Sybase Enterprise Application Server (EAS) aka Jaguar.
Most of the installation issues seemed to be similar to JRUN's...  I had to
manually copy the xml files from the WAR files... and I had to edit
the same tag properties because the version of EAS I am running as the same
problem casting datatypes on custom tags.

So, it *looks* like it's installed and up and running.  I have the
struts-upload working.  BUT, I'm running into this problem with the
struts-example
application:  I get the welcome page,  I go to the Registration page... I
enter my info and I get this message:

Validation Error

You must correct the following error(s) before proceeding:

 Cannot submit this form out of order


Based on the brief amount of digging I've been able to do, I believe this
is related to Session tracking?  Has anyone encountered this problem and,
if so, how do I resolve it?

thx.

-- Andy
[EMAIL PROTECTED]






struts example application query

2001-05-24 Thread B Manikandan

Hi,
In the example implementation, what is the reason for having
Subscription and SubscriptionForm.
They are essentially the same.
Is this out of a cleaner design approach ??

Mani





RE: Regarding making your own tags with Struts

2001-05-24 Thread Deadman, Hal

You can change the font of the header by modifying the values for
errors.header and errors.footer in your application resources properties
files.

errors.footer=
errors.header=Validation ErrorYou must
correct the following error(s) before proceeding:

You can write your own tags in struts the same way you write JSP tags
without struts. Look on this page for links to tutorials.
http://jsptags.com/gettingstarted/

> -Original Message-
> From: Raj Malhots Surrey [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 24, 2001 3:33 PM
> To: [EMAIL PROTECTED]
> Subject: Regarding making your own tags with Struts
>
>
>
> Hi,
>
> I have a field called email in my form.
> I do have an error with this field.So, in my ActionForm I add
> an ActionError for that and I can access it in my JSP file
> using  tag.
> But can you tell me if there is some way or some tag in
> Struts by which I can change the font of the label Email in
> red after checking if there is an error with the email field.
> If not can u suggest if some other way is possible.
> Also if someone can tell me how to write my own tags with Struts.
>
> Thankx in advance.
>
> Raj
>
> - Original Message --
> Peter Alfors <[EMAIL PROTECTED]> wrote:
> To:[EMAIL PROTECTED]
> From:Peter Alfors <[EMAIL PROTECTED]>
> Date:Thu, 24 May 2001 12:57:57 -0500
> Subject:Re: struts framework without its TAG LIBRARIES in jsp
> pages how?
>
> when you submit a form, you just need to set the action to
> the action class
> that you want in invoke.
> 
>
> If you have your web.xml set up to use the Struts
> ActionServlet whenever the
> desired mapping is encountered, then
> you should be fine.
>
> Check out the Struts example application to make sure that
> your web.xml file is
> set up correctly.
>
> HTH,
> Pete
>
>
> Sanjay Melinamani wrote:
>
> > but my question is how? If we use HTML, how is the "ActionForm" gets
> > delegated to Action::perform() method?
> > I guess we have to explicitly use the ActionForm bean and
> call its "set"
> > methods...I am not sure about this !
> >
> > If u suggest me as how is the ActionForm will be delegated to the
> > Action::perfom method, that would be great !
> >
> > thanx
> > sanjay
> >
> > > -Original Message-
> > > From: Nanduri, Amarnath [SMTP:[EMAIL PROTECTED]]
> > > Sent: Thursday, May 24, 2001 5:21 AM
> > > To:   '[EMAIL PROTECTED]'
> > > Subject:  RE: struts framework without its TAG
> LIBRARIES in jsp pages
> > > how?
> > >
> > > You can ignore the Tag Libraries and still use the
> ActionServlet, Actions
> > > and ActionForms functionality. Write your own html . The
> beauty of using
> > > the
> > > Tag Libraries is that they are fully internationalized. But if
> > > internationalization is not an issue, then by all means
> write your own
> > > html
> > > without using the Tag Libraries.
> > >
> > >
> > > cheers,
> > > Amar..
> > >
> > > -Original Message-
> > > From: Sanjay Melinamani [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, May 23, 2001 7:49 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: struts framework without its TAG LIBRARIES in
> jsp pages how?
> > >
> > >
> > > > hi,
> > > > I am trying to make use of struts framework in our
> application. But can
> > > I
> > > > implement the frame work "without" using its Tag
> libraries? If so how
> > > can
> > > > I do it? Basically I do not wnat to use Struts TAG
> LIBRARIES in my JSP
> > > > pages.
> > > >
> > > > thanx
> > > > regards
> > > > sanjay
> > > >
>
>
> _
> Chat with your friends as soon as they come online. Get Rediff Bol at
> http://bol.rediff.com
>
>
>
>



Re: Struts Example on WebSphere 3.5.3

2001-05-24 Thread Dan Miser

I wouldn't use the directions from the web site. Some steps are obsolte, 
some aren't needed, and some are fine. I've combined everything into one 
HOWTO and posted it here before, but I don't see that it's made it up to the 
Struts web site yet.

I'll upload the writeup to my web site tonight when I get home.
--
Dan Miser
http://www.distribucon.com


>From: "Alexander, Glynn (LIT)" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Struts Example on WebSphere 3.5.3
>Date: Thu, 24 May 2001 16:49:53 +0100
>
>Has anyone tried to get the Struts Example to work on WebSphere 3.5.3.
>  I have followed the installation instructions as described in
>http://jakarta.apache.org/struts/installation-was352.html omitting the fix

_
Get your FREE download of MSN Explorer at http://explorer.msn.com




tricky mapping

2001-05-24 Thread Yuriy Zubarev

Hello everyone,

I'm not quite sure that my question is truly struts-related,
but since I'm developing a web-application using struts as a framework,
I decided to post it here.

A little proem. I'm in the middle of developing a web-mail facility
and I've come to the point where I have to display mails' attachments.
In general everything is fine except one minor but annoying thing.
When a user double-clicks on a attachment link and selects 
"Save target as...", a browser presents "Save as" dialog and offers
a default name for requested object which looks like "EmailPart", 
because the syntax of the link is as following:

"http://domain-name/EmailPart.do?part=1";

I know the name of the requested attachment file in advance but I don't
know how to fit it into the URL so that a browser can offer that
name instead of "EmailPart".

On yahoo web-mail a link that points to attachment looks like this:

"http://yahoo_address/ym/ShowLetter/Account%5fmonitor%5fwork%5fflow.doc?box=Inbox&MsgId=1915_4666388_102413_741_67881_0&bodyPart=2&filename=Account%5fmonitor%5fwork%5fflow.doc&download=1&YY=2060&order=down&sort=date&pos=0";

Bearing in mind this syntax I tried to make my link looks like:

"...domain-name/EmailPart/File_name.ext?part=1"

And of course I failed, because the server (tomcat) treated
"EmailPart" as a directory (I assume so) but not as action.

So I would like to ask if anyone came across this problem
and found a solution. Any suggestions would be highly
appreciated.


Thank you for your time.

Best of luck,
Yuriy Zubarev


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



Regarding making your own tags with Struts

2001-05-24 Thread Raj Malhots Surrey


Hi,

I have a field called email in my form.
I do have an error with this field.So, in my ActionForm I add an ActionError for that 
and I can access it in my JSP file using  tag.
But can you tell me if there is some way or some tag in Struts by which I can change 
the font of the label Email in red after checking if there is an error with the email 
field.
If not can u suggest if some other way is possible.
Also if someone can tell me how to write my own tags with Struts.

Thankx in advance.

Raj

- Original Message --
Peter Alfors <[EMAIL PROTECTED]> wrote:
To:[EMAIL PROTECTED]
From:Peter Alfors <[EMAIL PROTECTED]>
Date:Thu, 24 May 2001 12:57:57 -0500
Subject:Re: struts framework without its TAG LIBRARIES in jsp pages how?

when you submit a form, you just need to set the action to the action class
that you want in invoke.


If you have your web.xml set up to use the Struts ActionServlet whenever the
desired mapping is encountered, then
you should be fine.

Check out the Struts example application to make sure that your web.xml file is
set up correctly.

HTH,
Pete


Sanjay Melinamani wrote:

> but my question is how? If we use HTML, how is the "ActionForm" gets
> delegated to Action::perform() method?
> I guess we have to explicitly use the ActionForm bean and call its "set"
> methods...I am not sure about this !
>
> If u suggest me as how is the ActionForm will be delegated to the
> Action::perfom method, that would be great !
>
> thanx
> sanjay
>
> > -Original Message-
> > From: Nanduri, Amarnath [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, May 24, 2001 5:21 AM
> > To:   '[EMAIL PROTECTED]'
> > Subject:  RE: struts framework without its TAG LIBRARIES in jsp pages
> > how?
> >
> > You can ignore the Tag Libraries and still use the ActionServlet, Actions
> > and ActionForms functionality. Write your own html . The beauty of using
> > the
> > Tag Libraries is that they are fully internationalized. But if
> > internationalization is not an issue, then by all means write your own
> > html
> > without using the Tag Libraries.
> >
> >
> > cheers,
> > Amar..
> >
> > -Original Message-
> > From: Sanjay Melinamani [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, May 23, 2001 7:49 PM
> > To: [EMAIL PROTECTED]
> > Subject: struts framework without its TAG LIBRARIES in jsp pages how?
> >
> >
> > > hi,
> > > I am trying to make use of struts framework in our application. But can
> > I
> > > implement the frame work "without" using its Tag libraries? If so how
> > can
> > > I do it? Basically I do not wnat to use Struts TAG LIBRARIES in my JSP
> > > pages.
> > >
> > > thanx
> > > regards
> > > sanjay
> > >


_
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com







Re: struts framework without its TAG LIBRARIES in jsp pages how?

2001-05-24 Thread Peter Alfors

when you submit a form, you just need to set the action to the action class
that you want in invoke.


If you have your web.xml set up to use the Struts ActionServlet whenever the
desired mapping is encountered, then
you should be fine.

Check out the Struts example application to make sure that your web.xml file is
set up correctly.

HTH,
Pete


Sanjay Melinamani wrote:

> but my question is how? If we use HTML, how is the "ActionForm" gets
> delegated to Action::perform() method?
> I guess we have to explicitly use the ActionForm bean and call its "set"
> methods...I am not sure about this !
>
> If u suggest me as how is the ActionForm will be delegated to the
> Action::perfom method, that would be great !
>
> thanx
> sanjay
>
> > -Original Message-
> > From: Nanduri, Amarnath [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, May 24, 2001 5:21 AM
> > To:   '[EMAIL PROTECTED]'
> > Subject:  RE: struts framework without its TAG LIBRARIES in jsp pages
> > how?
> >
> > You can ignore the Tag Libraries and still use the ActionServlet, Actions
> > and ActionForms functionality. Write your own html . The beauty of using
> > the
> > Tag Libraries is that they are fully internationalized. But if
> > internationalization is not an issue, then by all means write your own
> > html
> > without using the Tag Libraries.
> >
> >
> > cheers,
> > Amar..
> >
> > -Original Message-
> > From: Sanjay Melinamani [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, May 23, 2001 7:49 PM
> > To: [EMAIL PROTECTED]
> > Subject: struts framework without its TAG LIBRARIES in jsp pages how?
> >
> >
> > > hi,
> > > I am trying to make use of struts framework in our application. But can
> > I
> > > implement the frame work "without" using its Tag libraries? If so how
> > can
> > > I do it? Basically I do not wnat to use Struts TAG LIBRARIES in my JSP
> > > pages.
> > >
> > > thanx
> > > regards
> > > sanjay
> > >


begin:vcard 
n:;
x-mozilla-html:FALSE
org:http://www.irista.com/logo/irista.gif";>Bringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



RE: struts framework without its TAG LIBRARIES in jsp pages how?

2001-05-24 Thread Sanjay Melinamani

but my question is how? If we use HTML, how is the "ActionForm" gets
delegated to Action::perform() method? 
I guess we have to explicitly use the ActionForm bean and call its "set"
methods...I am not sure about this !

If u suggest me as how is the ActionForm will be delegated to the
Action::perfom method, that would be great !

thanx
sanjay


> -Original Message-
> From: Nanduri, Amarnath [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, May 24, 2001 5:21 AM
> To:   '[EMAIL PROTECTED]'
> Subject:  RE: struts framework without its TAG LIBRARIES in jsp pages
> how?
> 
> You can ignore the Tag Libraries and still use the ActionServlet, Actions
> and ActionForms functionality. Write your own html . The beauty of using
> the
> Tag Libraries is that they are fully internationalized. But if
> internationalization is not an issue, then by all means write your own
> html
> without using the Tag Libraries.
> 
> 
> cheers,
> Amar..
> 
> -Original Message-
> From: Sanjay Melinamani [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 23, 2001 7:49 PM
> To: [EMAIL PROTECTED]
> Subject: struts framework without its TAG LIBRARIES in jsp pages how?
> 
> 
> > hi,
> > I am trying to make use of struts framework in our application. But can
> I
> > implement the frame work "without" using its Tag libraries? If so how
> can
> > I do it? Basically I do not wnat to use Struts TAG LIBRARIES in my JSP
> > pages.
> > 
> > thanx
> > regards
> > sanjay
> > 



enctype.

2001-05-24 Thread Andy Wicks

Hi,

I'm using jakarta-struts-1.0-b1 with a Resin 1.2.5 container running on 
hpux11. When I post a form with a form struts tag including

method="POST" enctype="multipart/form-data"


The servlet throws an exception like this: java.io.IOException: No such 
file or directory at java.io.UnixFileSystem.createFileExclusively(Native 
Method) at java.io.File.checkAndCreate(File.java:1161) at 
java.io.File.createTempFile(File.java:1246) at 
org.apache.struts.upload.MultipartIterator.createLocalFile(MultipartIterator.java:465) 
at 
org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.java:201) 
at 
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMultipartRequestHandler.java:70)
 
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:447) at 
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:1910) 
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1521) 
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)

Struts seems to be parsing the input and failing to create a temporary 
file. The system temporary area is /var/tmp which is world writable.

I've seen a lot of similar posts on this topic, they seemed more 
compicated. I'm hoping this is simply a configuration problem. If anyone 
has any ideas they would be appreciated. thanks,

Andy.   




digester and whitespace in XML text body

2001-05-24 Thread Nick Afshartous


I'd like to follow up on my original post.  It looks like the
digester.CallMethodRule.body method doesn't remove whitespace
from both ends of the XML body text.  However, other rules
like digester.CallParamRule.body actually do by calling method
String.trim.

Maybe the call to String.trim should be in a central place 
(i.e. digester.Digester) so that the individual rules don't 
have to worry about removing the whitespace ?

I'd be happy to work on a patch.
-- 

Nick



From: Nick Afshartous <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: digester and whitespace in XML text body
Date: Wed, 23 May 2001 17:11:27 -0400 (EDT)


Hi,

I'm using the digester to process the nested content in
XML tags and am noticing that the leading/trailing whitespace
doesn't seem to be removed as advertised in the doc.  

For instance, the rule

digester.addCallMethod("gateway/application/app-name", 
   "setAppName", 0);

results in the method setAppName being called with the surrounding
whitespace in 

   foo  

If anyone has any idea how to tell the digester to ignore 
the leading/trailing whitespace please let me now, thanks.
-- 

Nick




RE: Struts Example on WebSphere 3.5.3

2001-05-24 Thread Ravindran Ramaiah




Follow the Steps:
-

·   Start the WebSphere Administrative Console
·   Once it's started, select "Convert a War File" from the tasks
toolbar option, or from the Console->Tasks menu. This will cause a "Convert
War File" Wizard dialog to appear.
·   Select a Servlet Engine to host the web application that will result
from converting the War file, e.g. "Default Servlet Engine", by expanding
the tree control under Nodes. Press the Next button.
·   Select a Virtual Host to associate the resulting web application
with, e.g. "default host". Press the Next button.
·   Press the Browse button and choose the "struts-test.war" application
WAR file. Press the Next button.
·   Select a destination directory for the resulting web application,
e.g. $WAS_HOME/hosts/default_host. Press the Next button
·   Enter a "Web Application Web Path", e.g. /struts-test, and a "Web
Application Name", e.g. struts-test. Press the Finish button
·   You should get a message box with the text Command "convert war
file" completed successfully. Press Ok.
·   You now need to add jaxp.jar and parser.jar from JAXP 1.0.1  to the
struts-test web application's servlet's directory,  e.g.
$WAS_HOME/AppServer/hosts/default_host/struts-test/servlets
·   Create a WEB-INF directory in the servlets dir and copy
struts-config.xml and web.xml into it (Keep WEB-INF with all the TLD's [if
any] under web - both WEB-INF directories must be present).  
·   In the DOCTYPE declaration, change the word PUBLIC to SYSTEM and
completely remove the line that reads "-//Sun Microsystems, Inc.//DTD Web
Application 2.2//EN" from web.xml and remove "-//Apache Software
Foundation//DTD Struts Configuration 1.0//EN" from struts-config.xml.
·   In the servlets directory, open struts.jar.  Extract the three DTD's
(struts-config_1_0.dtd, web-app_2_2.dtd and web-app_2_3.dtd) into the
servlets directory making sure you use folder names (so the files extract to
servlets/org/apache/struts/resources).
·   In the Admin Console, down where it says Default Error Page, enter
/ErrorReporter and then click Apply.
·   Shut down the WebSphere Application Server and Restart
·   Open a Browser and type the URL
http:///struts-test/index.jsp where  is the name
of the machine. If you want you can use localhost instead







-Original Message-
From: Alexander, Glynn (LIT) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 11:50 AM
To: [EMAIL PROTECTED]
Subject: Struts Example on WebSphere 3.5.3


Has anyone tried to get the Struts Example to work on WebSphere 3.5.3.
 I have followed the installation instructions as described in
http://jakarta.apache.org/struts/installation-was352.html omitting the fix
for 3.5.2 assuming it has been fixed in 3.5.3.  I have then followed the
instuctions to get the Struts  example running
(http://jakarta.apache.org/struts/installation-was352-x.html).  However on
starting the Default server the system hangs when loading the
struts-config.xml file.
When accessing http://localhost/struts-example/index.jsp I get the first
page OK However clicking on the Log on to the MailReader Demonstration
Application  
link I get the following:
Error 500
An error has occured while processing
request:http://localhost/struts-example/logon.jsp
Message: Server caught unhandled exception from servlet [jsp11]: Cannot find
ActionMappings or ActionFormBeans collection

Target Servlet: jsp11
StackTrace: 

Root Error-1: Cannot find ActionMappings or ActionFormBeans collection
javax.servlet.jsp.JspException: Cannot find ActionMappings or
ActionFormBeans collection at
javax.servlet.jsp.JspException.(JspException.java:73) at
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:703) at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441) at
_logon_jsp_1._jspService(_logon_jsp_1.java:164) at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:127) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:381) at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:702) at
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:822) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
.java:626) at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
eServlet.java:160) at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
t.java:287) at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
Servlet.java:105) at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:36
0) at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
ager.java:775) at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
er.j

Re: Using tags from Java code

2001-05-24 Thread John Raley

Yes, my own tags tend to be factored such that most of what they do is 
available from other contexts.  This is not necessarily the case with 
other taglibs I'm interested in...  Mostly I was looking for a general 
solution to this problem - I'd prefer to use a tag as its author expects 
over poring over its source code, trying to determine if I can safely 
call some methods on it directly.

Thanks

Deadman, Hal wrote:

>Which tag do you want to use? If there is functionality in a tag that you
>want to use, it probably ought to be available in a seperate class that the
>tag and your code can both use. That is the case with bean:message and
>MessageResources, for example.
>
>Hal
>





RE: uploading files.

2001-05-24 Thread GIBSON,ROB (HP-Boise,ex1)

Andy,

If you haven't already, you might want to check out:
http://www.mail-archive.com/cgi-bin/htsearch?method=and&format=short&config=
struts-dev_jakarta_apache_org&restrict=&exclude=&words=enctype

and 

http://www.mail-archive.com/cgi-bin/htsearch?method=and&format=short&config=
struts-user_jakarta_apache_org&restrict=&exclude=&words=enctype

Rob

> -Original Message-
> From: Andy Wicks [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 24, 2001 10:55 AM
> To: [EMAIL PROTECTED]
> Cc: Simon Wawra; [EMAIL PROTECTED]
> Subject: uploading files.
> 
> 
> Hi,
> 
> I'm using jakarta-struts-1.0-b1 with a Resin 1.2.5 container 
> running on 
> hpux11. When I post a form with a struts tag like this
> 
> 
> 
> The servlet throws an exception like this:
> 
> java.io.IOException: No such file or directory
> at java.io.UnixFileSystem.createFileExclusively(Native Method)
> at java.io.File.checkAndCreate(File.java:1161)
> at java.io.File.createTempFile(File.java:1246)
> at 
> org.apache.struts.upload.MultipartIterator.createLocalFile(Mul
> tipartIterator.java:465) 
> 
> at 
> org.apache.struts.upload.MultipartIterator.getNextElement(Mult
> ipartIterator.java:201) 
> 
> at 
> org.apache.struts.upload.DiskMultipartRequestHandler.handleReq
> uest(DiskMultipartRequestHandler.java:70) 
> 
> at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:447)
> at 
> org.apache.struts.action.ActionServlet.processPopulate(ActionS
> ervlet.java:1910) 
> 
> at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.j
> ava:1521) 
> at 
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
> 
> 
> Struts seems to be parsing the input and failing to create a 
> temporary 
> file. The system temporary area is /var/tmp which is world writable.
> 
> If anyone has any ideas they would be appreciated.
> 
> thanks,
> Andy.
> 
> 



uploading files.

2001-05-24 Thread Andy Wicks

Hi,

I'm using jakarta-struts-1.0-b1 with a Resin 1.2.5 container running on 
hpux11. When I post a form with a form struts tag including

method="POST" enctype="multipart/form-data"


The servlet throws an exception like this: java.io.IOException: No such 
file or directory at java.io.UnixFileSystem.createFileExclusively(Native 
Method) at java.io.File.checkAndCreate(File.java:1161) at 
java.io.File.createTempFile(File.java:1246) at 
org.apache.struts.upload.MultipartIterator.createLocalFile(MultipartIterator.java:465) 
at 
org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.java:201) 
at 
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMultipartRequestHandler.java:70)
 
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:447) at 
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:1910) 
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1521) 
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)

Struts seems to be parsing the input and failing to create a temporary 
file. The system temporary area is /var/tmp which is world writable.

If anyone has any ideas they would be appreciated. thanks,

Andy.




Using tags from Java code

2001-05-24 Thread John Raley

Having functionality in taglibs is great, until you want to use the 
functionality outside of a JSP (i.e. in the implementation of your own 
tag).  It would seem fairly easy to write a 'tag player' that would 
instantiate a tag and run it from within code - is this really 
necessary?  Any other ideas on this topic?

I've been on this list for a while, and I'm surprised that this question 
has never come up (that I'm aware of).




RE: Options tag problem

2001-05-24 Thread Deadman, Hal

I don't think the option tag will work like that. You can either put your
Hashset in some scope, call it something like "persons" and then use the




Or you could have two methods on your form, one that returns a collection of
Strings for the label and another that returns a collection of Strings for
the value. If they are the same then what you are doing  will work but you need to change the getPersons method
to return a collection of strings instead of beans.

The options documentation is confusing but giving the tag any more
flexibility would only make it that much more complex. The fact that the
attributes "property" and "labelProperty" mean two different things
depending on whether "collection" is used makes it confusing. You basically
need the first usage with an alternate way of specifying the collection.

Disclaimer: I could be confused myself.

Hal

> -Original Message-
> From: Mikkel Bruun [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 24, 2001 6:13 AM
> To: '[EMAIL PROTECTED] '
> Subject: Options tag problem
>
>
>
> Hi Guys!
>
> I have an ActionForm which contains a HashSet named Persons that
> contains
> several instances of Person
>
> In my jsp i want a dropdown box showing the Person's name.
>
> code:
> 
>
> This points to the getPersons() method in the ActionForm
> that'll return
> a
> HashSet...
> Now I need to access each elements getName() method, but
> looking through
> the
> options tag code, it seems like it can only handle Collections of
> Stringsis this correct
>
> Any suggestions on how to solve it???
>
> thanks
>
> Mikkel



Struts Example on WebSphere 3.5.3

2001-05-24 Thread Alexander, Glynn (LIT)

Has anyone tried to get the Struts Example to work on WebSphere 3.5.3.
 I have followed the installation instructions as described in
http://jakarta.apache.org/struts/installation-was352.html omitting the fix
for 3.5.2 assuming it has been fixed in 3.5.3.  I have then followed the
instuctions to get the Struts  example running
(http://jakarta.apache.org/struts/installation-was352-x.html).  However on
starting the Default server the system hangs when loading the
struts-config.xml file.
When accessing http://localhost/struts-example/index.jsp I get the first
page OK However clicking on the Log on to the MailReader Demonstration
Application  
link I get the following:
Error 500
An error has occured while processing
request:http://localhost/struts-example/logon.jsp
Message: Server caught unhandled exception from servlet [jsp11]: Cannot find
ActionMappings or ActionFormBeans collection

Target Servlet: jsp11
StackTrace: 

Root Error-1: Cannot find ActionMappings or ActionFormBeans collection
javax.servlet.jsp.JspException: Cannot find ActionMappings or
ActionFormBeans collection at
javax.servlet.jsp.JspException.(JspException.java:73) at
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:703) at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441) at
_logon_jsp_1._jspService(_logon_jsp_1.java:164) at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:127) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:381) at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:702) at
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:822) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
.java:626) at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
eServlet.java:160) at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
t.java:287) at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
Servlet.java:105) at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:36
0) at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
ager.java:775) at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
er.java:701) at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W
ebAppRequestDispatcher.java:404) at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest
Dispatcher.java:203) at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
ispatcher.java:107) at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.
java:77) at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
vocation.java:67) at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
estProcessor.java:155) at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
.java:300) at
com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(SQ
EventListenerImp.java:230) at
com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEventL
istenerImp.java:104) at
com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQE
ventSource.java:212) at
com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRu
nnable.notifyService(SQWrapperEventSource.java:353) at
com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRu
nnable.run(SQWrapperEventSource.java:220) at
com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run
(OutOfProcThread.java:248) at java.lang.Thread.run(Thread.java:481) 

Wrapped Error-2: Cannot find ActionMappings or ActionFormBeans collection
javax.servlet.ServletException: Cannot find ActionMappings or
ActionFormBeans collection at
javax.servlet.ServletException.(ServletException.java:161) at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:386) at _logon_jsp_1._jspService(_logon_jsp_1.java:378) at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:127) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:381) at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:702) at
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:822) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
.java:626) at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
eServlet.java:160) at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
t.java:287) at
com.ibm.servlet.engine.webapp.StrictLifec

Re: tool for the struts-config.xml

2001-05-24 Thread Mikael Eriksson

Hello

I think the portability has to do with that the file is read from the WEB-INF
directory and that it is not always possible to store thing there. So probably
a struts-config-config application would not have the same problem, depending
on how it wanted to handle the file.

 A way to handle it, without having to store anything persistent on the server
would be that the user starts with selecting a struts-config.xml to upload
(or selects to work with a completely new configuration). Then do all
the wanted changes and finally request the web-app to generate a struts-config
with the current configuration, the file could then be delivered to the
browser and saved/viewed just as any other file.

 Mikael


"Gogineni, Pratima" wrote:

> Hi,
>
> This could be done similar to the way they serialize the user database xml
> file in the struts example but this is what I saw under the changes and bug
> fixes section of the struts example application:
>
> "Removed any attempt to save the pseudo-database at application shutdown,
> because there is no portable mechanism to accomplish this task. "
>
> a. does anyone know why the mechanism is not portable?
> b. if above is true we will face the same problem when you try to serialize
> the struts-config.xml file?
>
> pratima




RE: dynamic button names

2001-05-24 Thread Deadman, Hal

It looks like this was broken in a recent update. The ButtonTag.java needs a
doAfterBody() method in order to set the text instance variable to the body
content. That will make it work like the SubmitTag.java. You should submit
this as a bug on Bugzilla. http://nagoya.apache.org/bugzilla/ If you can't
do that, let me know and I will do it.


/**
 * Save the associated label from the body content.
 *
 * @exception JspException if a JSP exception has occurred
 */
public int doAfterBody() throws JspException {

if (bodyContent != null) {
String value = bodyContent.getString().trim();
if (value.length() > 0)
text = value;
}
return (SKIP_BODY);

}

Hal
> -Original Message-
> From: Thane Eisener [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 24, 2001 11:19 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: dynamic button names
>
>
> I'm not able to get this to work since I upgraded to b2.
>
> The following shows a button with the text "Click" (I assume
> "Click" is
> the HTML default). All the other internationalized strings are working
> fine. Any ideas?
>
> 
>   
> 
>
>
>
> -Original Message-
> From: Blue, Neil [ mailto:[EMAIL PROTECTED]
> 
> ]
> Sent: Thursday, May 24, 2001 10:53 AM
> To: [EMAIL PROTECTED]
> Subject: RE: dynamic button names
>
>
> Thank you Peter,
>
> It has also now been pointed out to me that you can set the
> value of a
> submit button by using a two part tag
>
> 
> 
> 
>
> or something close to this if I remember correct. I have found it hard
> to
> get some docs on this.
>
> Cheers
> Neil
>
> -Original Message-
> From: Peter Alfors [ mailto:[EMAIL PROTECTED]
>  ]
> Sent: 24 May 2001 14:39
> To: [EMAIL PROTECTED]
> Subject: Re: dynamic button names
>
>
> It looks as though the ButtonTag and SubmitTag do not allow you to do
> this.
>
> Therefore, you have a few other options.
>
> 1.  Use HTML along with the message tag...
>
>  value=" key="myBundleKey"/>">
>
> 2. Write your own custom tag.  You could extend the SubmitTag and
> over-ride
> the getValue() call to retrieve a resoure bundle key.
>
> 3.  Last resort: Retrieve the bundle key through the message resources
> class
> and place it into a script variable.
>  Then place the script variable in the custom tag...
>  This is ugly, so I would not do this unless you have a
> good reason
> to.
>
> MessageResources bundle =
>   (MessageResources)
> pageContext.getServletContext().getAttribute(Action.MESSAGES_KEY);
> String myValueRetrievedFromBundle = bundle.getMessage("myKey");
> 
>
> (The code may not be exactly right.. I have not implemented
> this myself)
>
>
> HTH,
> Pete
>
>
> Neil Blue wrote:
>
> > Hello,
> >
> > I am planning a struts app and I would like to know please
> if there is
> a
> > way to set the text of a submit button, based on a key from the
> > ApplicationResources.properties file.
> >
> > Thank you
> >
> > Neil Blue
>



Re: 64K limit

2001-05-24 Thread Mat Diss

Has anyone found a solution that doesn't involve using includes?

We have a custom tag that needs to surround the entire page and you 
can't use jsp:include whilst you are inside a custom tag.

Mat.

Nanduri, Amarnath wrote:

>yeah ... check the archives . Somebody has posted a solution. Alternately
>you can go to  http://husted.com/about/struts   for the solution
>
>-Original Message-
>From: Mat Diss [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, May 24, 2001 4:13 PM
>To: [EMAIL PROTECTED]
>Subject: 64K limit
>
>
>Has anyone come across the problem whereby the 64k method limit is 
>reached as Jasper puts all the generated Java into the _jspService method?
>
>If I have a page with a lot of custom tags in it, I get this problem.
>
>If you have come across the problem, have you found a way around it?
>
>Cheers
>
>Mat.
>





RE: 64K limit

2001-05-24 Thread Nanduri, Amarnath

yeah ... check the archives . Somebody has posted a solution. Alternately
you can go to  http://husted.com/about/struts   for the solution

-Original Message-
From: Mat Diss [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 4:13 PM
To: [EMAIL PROTECTED]
Subject: 64K limit


Has anyone come across the problem whereby the 64k method limit is 
reached as Jasper puts all the generated Java into the _jspService method?

If I have a page with a lot of custom tags in it, I get this problem.

If you have come across the problem, have you found a way around it?

Cheers

Mat.



RE: dynamic button names

2001-05-24 Thread Thane Eisener
Title: RE: dynamic button names





I'm not able to get this to work since I upgraded to b2.


The following shows a button with the text "Click" (I assume "Click" is the HTML default). All the other internationalized strings are working fine. Any ideas?


  





-Original Message-
From: Blue, Neil [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 10:53 AM
To: [EMAIL PROTECTED]
Subject: RE: dynamic button names



Thank you Peter,


It has also now been pointed out to me that you can set the value of a
submit button by using a two part tag



    



or something close to this if I remember correct. I have found it hard to
get some docs on this.


Cheers
Neil


-Original Message-
From: Peter Alfors [mailto:[EMAIL PROTECTED]]
Sent: 24 May 2001 14:39
To: [EMAIL PROTECTED]
Subject: Re: dynamic button names



It looks as though the ButtonTag and SubmitTag do not allow you to do this.


Therefore, you have a few other options.


1.  Use HTML along with the message tag...


">


2. Write your own custom tag.  You could extend the SubmitTag and over-ride
the getValue() call to retrieve a resoure bundle key.


3.  Last resort: Retrieve the bundle key through the message resources class
and place it into a script variable.
 Then place the script variable in the custom tag...
 This is ugly, so I would not do this unless you have a good reason to.


MessageResources bundle =
  (MessageResources)
pageContext.getServletContext().getAttribute(Action.MESSAGES_KEY);
String myValueRetrievedFromBundle = bundle.getMessage("myKey");



(The code may not be exactly right.. I have not implemented this myself)


HTH,
    Pete



Neil Blue wrote:


> Hello,
>
> I am planning a struts app and I would like to know please if there is a
> way to set the text of a submit button, based on a key from the
> ApplicationResources.properties file.
>
> Thank you
>
> Neil Blue





64K limit

2001-05-24 Thread Mat Diss

Has anyone come across the problem whereby the 64k method limit is 
reached as Jasper puts all the generated Java into the _jspService method?

If I have a page with a lot of custom tags in it, I get this problem.

If you have come across the problem, have you found a way around it?

Cheers

Mat.




RE: Template Problems

2001-05-24 Thread Jon.Ridgway

Hi Dan,

Many thanks, I now have a beautiful looking webapp..

Jon.

-Original Message-
From: Dan Miser [mailto:[EMAIL PROTECTED]] 
Sent: 24 May 2001 14:08
To: [EMAIL PROTECTED]
Subject: Re: Template Problems

Be sure you're using at least Beta 2, and you can add the flush='true'
attribute to the template:get tags.
--
Dan Miser
http://www.distribucon.com

- Original Message -
> Root Error-1: Server caught unhandled exception from servlet [jsp]: Server
> caught unhandled exception from servlet [jsp]: OutputStream already
obtained
>
> javax.servlet.jsp.JspException: Server caught unhandled exception from
> servlet [jsp]: Server caught unhandled exception from servlet [jsp]:
> OutputStream already obtained
> java.lang.Throwable(java.lang.String)
> java.lang.Exception(java.lang.String)
> javax.servlet.jsp.JspException(java.lang.String)
> int org.apache.struts.taglib.template.InsertTag.doEndTag()
>
> I'm using VAJ 3.5.3 WTE. I don't get this error with the template example
> app. But if I change the template and swap the header for the side bar I
get
> the above error.




Re: dynamic button names

2001-05-24 Thread Peter Alfors

Yep that will work.
I've never used that tag (SubmitTag) before, but now that I look at the code
a little closer. You are right.
Ya learn something new every day.  :)

Pete


"Deadman, Hal" wrote:

> Isn't this what you want to do?
>
> 
>
> > -Original Message-
> > From: Peter Alfors [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 24, 2001 9:39 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: dynamic button names
> >
> >
> > It looks as though the ButtonTag and SubmitTag do not allow you to do
> > this.
> >
> > Therefore, you have a few other options.
> >
> > 1.  Use HTML along with the message tag...
> >
> >  > value=" > key="myBundleKey"/>">
> >
> > 2. Write your own custom tag.  You could extend the SubmitTag and
> > over-ride
> > the getValue() call to retrieve a resoure bundle key.
> >
> > 3.  Last resort: Retrieve the bundle key through the message resources
> > class
> > and place it into a script variable.
> >  Then place the script variable in the custom tag...
> >  This is ugly, so I would not do this unless you have a
> > good reason
> > to.
> >
> > MessageResources bundle =
> >   (MessageResources)
> > pageContext.getServletContext().getAttribute(Action.MESSAGES_KEY);
> > String myValueRetrievedFromBundle = bundle.getMessage("myKey");
> > 
> >
> > (The code may not be exactly right.. I have not implemented
> > this myself)
> >
> > HTH,
> > Pete
> >
> >
> > Neil Blue wrote:
> >
> > > Hello,
> > >
> > > I am planning a struts app and I would like to know please
> > if there is
> > a
> > > way to set the text of a submit button, based on a key from the
> > > ApplicationResources.properties file.
> > >
> > > Thank you
> > >
> > > Neil Blue
> >
> >


begin:vcard 
n:;
x-mozilla-html:FALSE
org:http://www.irista.com/logo/irista.gif";>Bringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



RE: dynamic button names

2001-05-24 Thread Blue, Neil

Thank you Peter,

It has also now been pointed out to me that you can set the value of a
submit button by using a two part tag





or something close to this if I remember correct. I have found it hard to
get some docs on this.

Cheers
Neil

-Original Message-
From: Peter Alfors [mailto:[EMAIL PROTECTED]]
Sent: 24 May 2001 14:39
To: [EMAIL PROTECTED]
Subject: Re: dynamic button names


It looks as though the ButtonTag and SubmitTag do not allow you to do this.

Therefore, you have a few other options.

1.  Use HTML along with the message tag...

">

2. Write your own custom tag.  You could extend the SubmitTag and over-ride
the getValue() call to retrieve a resoure bundle key.

3.  Last resort: Retrieve the bundle key through the message resources class
and place it into a script variable.
 Then place the script variable in the custom tag...
 This is ugly, so I would not do this unless you have a good reason to.

MessageResources bundle =
  (MessageResources)
pageContext.getServletContext().getAttribute(Action.MESSAGES_KEY);
String myValueRetrievedFromBundle = bundle.getMessage("myKey");


(The code may not be exactly right.. I have not implemented this myself)

HTH,
Pete


Neil Blue wrote:

> Hello,
>
> I am planning a struts app and I would like to know please if there is a
> way to set the text of a submit button, based on a key from the
> ApplicationResources.properties file.
>
> Thank you
>
> Neil Blue



Re: dynamic button names

2001-05-24 Thread Scott Walter

just set the property attribute on the struts submit
tag.

scott.
--- Neil Blue <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I am planning a struts app and I would like to know
> please if there is a 
> way to set the text of a submit button, based on a
> key from the 
> ApplicationResources.properties file.
> 
> Thank you
> 
> Neil Blue
> 


=
~~~
Scott

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



RE: dynamic button names

2001-05-24 Thread Deadman, Hal

Isn't this what you want to do?



> -Original Message-
> From: Peter Alfors [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 24, 2001 9:39 AM
> To: [EMAIL PROTECTED]
> Subject: Re: dynamic button names
> 
> 
> It looks as though the ButtonTag and SubmitTag do not allow you to do
> this.
> 
> Therefore, you have a few other options.
> 
> 1.  Use HTML along with the message tag...
> 
>  value=" key="myBundleKey"/>">
> 
> 2. Write your own custom tag.  You could extend the SubmitTag and
> over-ride
> the getValue() call to retrieve a resoure bundle key.
> 
> 3.  Last resort: Retrieve the bundle key through the message resources
> class
> and place it into a script variable.
>  Then place the script variable in the custom tag...
>  This is ugly, so I would not do this unless you have a 
> good reason
> to.
> 
> MessageResources bundle =
>   (MessageResources)
> pageContext.getServletContext().getAttribute(Action.MESSAGES_KEY);
> String myValueRetrievedFromBundle = bundle.getMessage("myKey");
> 
> 
> (The code may not be exactly right.. I have not implemented 
> this myself)
> 
> HTH,
> Pete
> 
> 
> Neil Blue wrote:
> 
> > Hello,
> >
> > I am planning a struts app and I would like to know please 
> if there is
> a
> > way to set the text of a submit button, based on a key from the
> > ApplicationResources.properties file.
> >
> > Thank you
> >
> > Neil Blue
> 
> 



RE: Cancel an upload form (Problem not solved yet)

2001-05-24 Thread Peter Doyle

Hi,
 I'm currently faced with this problem. I'm uploading a zip file. My servelt
renames the file, unzips it then returns. All grand. The problem is if the
user presses cancel of there is some delay or file access issue, the files
become locked. When the user tries to repeat the procedure it cannot
succeed as the files are locked.

I am forced to restart my servlet container.

How can I ensure all files are closed/locks removed?
Can I detect the user cancel and erase the new files?

Thanks for any ideas,
Peter




-Original Message-
From: Till Nagel [mailto:[EMAIL PROTECTED]]
Sent: 06 February 2001 11:35
To: [EMAIL PROTECTED]
Subject: Cancel an upload form (Problem not solved yet)


Hi,

I didn't find a solution to the problem described below (forwarded message).


Currently the form and all its new data is stored, even if the user
canceled.
If the ActionServlet reads the cancel-Parameter from a multipart request,
the action would be able to cancel the storing process. But the file will be
uploaded though.

If I don't use the Struts cancel mechanism where should I delete the data
bean from the session?

Regards,
Till

- Original Message -
From: Till Nagel <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 16, 2001 6:51 PM
Subject: Cancel an upload form


> Hi,
>
> I've encountered a problem with forms supporting uploading files.
>
> These forms must include enctype="multipart/form-data" in their form-tag.
> The problem is that these multipart streams could be read just once.
> The ActionServlet populates the objectForm (i.e. reads the stream) and
next
> it tries to read the parameter Constants.CANCEL_PROPERTY from request. But
> it is always null.
> How could I solve this problem?
>
> Thanks for any advice.
>
> Regards,
> Till
>
>
>
>
>




RE: what is 'input' for

2001-05-24 Thread Firmin David

If the validate() method of the actionform returns errors, the framework
will call the page specified by the mapping's "input" attribute so that they
can be displayed.
The idea is that the input attribute specifies the page from which the input
required for the action is obtained.

HTH

Dave

-Original Message-
From: Blue, Neil [mailto:[EMAIL PROTECTED]]
Sent: 24 May 2001 15:22
To: [EMAIL PROTECTED]
Subject: what is 'input' for


Hello,

I am trying to figure out what the input attribute in the action mappings is
for. Could anyone help please.

Cheers
Neil


The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***




RE: How to use the new iterate tag?

2001-05-24 Thread Deadman, Hal

It seems like overkill because the alternative would be simple scriptlet:

<% int i=0; %>

<%= ++i %>


But I think it makes sense to have a tag, my opinion is that the overhead from tags 
should be insignificant compared to the overhead from network and database access. 
Nobody has to use the tag if they think it's overkill. 

I submitted the tag as a low priority enhancement request on bugzilla. 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1871

Hal

> -Original Message-
> From: Amos Shapira [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 24, 2001 2:38 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: How to use the new iterate tag?
> 
> 
> Hi,
> 
> Thanks a lot!  That's exactly what I wanted.
> 
> You said that it seems like an overkill to use a tag, is there
> another way to access this index?
> 
> What are the chances to see this tag in the library?
> 
> Cheers,
> 
> --Amos
> 
> > -Original Message-
> > From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, May 23, 2001 7:29 PM
> > To: [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: How to use the new iterate tag?
> > 
> > 
> > Do you just want to display the index? If you do, I just 
> > wrote a custom tag that does that. It allows me to remove one 
> > of the last instances of scriptlets that I have in my jsps. 
> > It's seems overkill to have a tag that just displays the 
> > iterate counter but oh well. If nothing else, you can use it 
> > as an example of how to access the index of the iterate tag. 
> 
> [ rest deleted ]
> 



what is 'input' for

2001-05-24 Thread Blue, Neil

Hello,

I am trying to figure out what the input attribute in the action mappings is
for. Could anyone help please.

Cheers
Neil



Re: removing request parameters before action forward

2001-05-24 Thread Andrew Steady

I have a similar question which perhaps could be asked at the same time.

I have a JSP that submits to an Action with a certain set of parameters,
the ActionClass then forwards to another ".do" if succesful, when this
".do" is called the corresponding form bean is created and populated with
request data. However the data in the request object was never meant for
that form bean it was only for the form bean belonging to the original
".do". A side affect is that if the 2nd bean has any matching data names to
the first it will get populated with data. I understand you could make sure
that all the names were different but that rather detracts from the
atomicity of the two ".do" actions.

Am I looking through something obvious? Anyone solved this before?

Andy S







[EMAIL PROTECTED] on 18/04/2001 12:47:01

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Andrew Steady/Swindon01/Domino01/Kinesis)
Subject:  removing request parameters before action forward




Hello to all,
I don't know how to remove request parameters just before leaving a
perform(...) method.
1) Is this a bad practice or wrong design?
2) if not, how can I do this?
What I'am trying to do:
A jsp page displays some items. If one clicks an item, the same page shows
again with an incremented item count.
The -tag includes the item id as an url parameter. The
perform
method of the action class looks for this url parameter, increments the
corresponding item count in the action form and forwards back to the jsp
page.
Everything works fine, but the url parameter (the complete url) is also
forwarded to the jsp page. Sometimes this doesn't matter (or even should be
like that), but in this case, pushing the reload button increments the item
count again.
Could anyone give me a hint or even a solution?
Thank You
Stefan
PS: I feel this was asked before, but I could not locate similar questions
in the archive. Sorry.
--
Stefan Seidel










Re: dynamic button names

2001-05-24 Thread Peter Alfors

It looks as though the ButtonTag and SubmitTag do not allow you to do this.

Therefore, you have a few other options.

1.  Use HTML along with the message tag...

">

2. Write your own custom tag.  You could extend the SubmitTag and over-ride
the getValue() call to retrieve a resoure bundle key.

3.  Last resort: Retrieve the bundle key through the message resources class
and place it into a script variable.
 Then place the script variable in the custom tag...
 This is ugly, so I would not do this unless you have a good reason to.

MessageResources bundle =
  (MessageResources)
pageContext.getServletContext().getAttribute(Action.MESSAGES_KEY);
String myValueRetrievedFromBundle = bundle.getMessage("myKey");


(The code may not be exactly right.. I have not implemented this myself)

HTH,
Pete


Neil Blue wrote:

> Hello,
>
> I am planning a struts app and I would like to know please if there is a
> way to set the text of a submit button, based on a key from the
> ApplicationResources.properties file.
>
> Thank you
>
> Neil Blue


begin:vcard 
n:;
x-mozilla-html:FALSE
org:http://www.irista.com/logo/irista.gif";>Bringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: struts framework without its TAG LIBRARIES in jsp pages how?

2001-05-24 Thread Peter Alfors

You sure can.
just use HTML or your own custom tags.

Pete

Sanjay Melinamani wrote:

> > hi,
> > I am trying to make use of struts framework in our application. But can I
> > implement the frame work "without" using its Tag libraries? If so how can
> > I do it? Basically I do not wnat to use Struts TAG LIBRARIES in my JSP
> > pages.
> >
> > thanx
> > regards
> > sanjay
> >


begin:vcard 
n:;
x-mozilla-html:FALSE
org:http://www.irista.com/logo/irista.gif";>Bringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Template Problems

2001-05-24 Thread Dan Miser

Be sure you're using at least Beta 2, and you can add the flush='true'
attribute to the template:get tags.
--
Dan Miser
http://www.distribucon.com

- Original Message -
> Root Error-1: Server caught unhandled exception from servlet [jsp]: Server
> caught unhandled exception from servlet [jsp]: OutputStream already
obtained
>
> javax.servlet.jsp.JspException: Server caught unhandled exception from
> servlet [jsp]: Server caught unhandled exception from servlet [jsp]:
> OutputStream already obtained
> java.lang.Throwable(java.lang.String)
> java.lang.Exception(java.lang.String)
> javax.servlet.jsp.JspException(java.lang.String)
> int org.apache.struts.taglib.template.InsertTag.doEndTag()
>
> I'm using VAJ 3.5.3 WTE. I don't get this error with the template example
> app. But if I change the template and swap the header for the side bar I
get
> the above error.





RE: struts framework without its TAG LIBRARIES in jsp pages how?

2001-05-24 Thread Nanduri, Amarnath

You can ignore the Tag Libraries and still use the ActionServlet, Actions
and ActionForms functionality. Write your own html . The beauty of using the
Tag Libraries is that they are fully internationalized. But if
internationalization is not an issue, then by all means write your own html
without using the Tag Libraries.


cheers,
Amar..

-Original Message-
From: Sanjay Melinamani [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 23, 2001 7:49 PM
To: [EMAIL PROTECTED]
Subject: struts framework without its TAG LIBRARIES in jsp pages how?


> hi,
> I am trying to make use of struts framework in our application. But can I
> implement the frame work "without" using its Tag libraries? If so how can
> I do it? Basically I do not wnat to use Struts TAG LIBRARIES in my JSP
> pages.
> 
> thanx
> regards
> sanjay
> 



removing request parameters before action forward

2001-05-24 Thread Stefan Seidel

Hello to all,

I don't know how to remove request parameters just before leaving a
perform(...) method.

1) Is this a bad practice or wrong design?
2) if not, how can I do this?

What I'am trying to do:

A jsp page displays some items. If one clicks an item, the same page shows
again with an incremented item count.

The -tag includes the item id as an url parameter. The perform
method of the action class looks for this url parameter, increments the
corresponding item count in the action form and forwards back to the jsp
page.

Everything works fine, but the url parameter (the complete url) is also
forwarded to the jsp page. Sometimes this doesn't matter (or even should be
like that), but in this case, pushing the reload button increments the item
count again.

Could anyone give me a hint or even a solution?

Thank You
Stefan

PS: I feel this was asked before, but I could not locate similar questions
in the archive. Sorry.

--
Stefan Seidel




Error - unable to extract the files in the jar files

2001-05-24 Thread shirleyl

Hi,

I have created an applet application. The applet is residing on an  Apache
web server 1.3 and Servlet Exec 3.0 AS.
When I try to access the application from another PC, there is an error,
that is 1 of the file in the jgrid.jar file cannot be extracted.
All the other files in other jar files can be extracted.

The error message and the jsp code that contain the applet is included in
the mail.

Would you advice me on what are the possible reasons?
I have verified that com/objectshare/grid/list/JKTableList is in jgrid.jar
and I have even tried to re jar the jgrid.jar, but the same problem occurs.

regards
Shirley

Here is the applet code in the jsp page...





//Shirley Lim 16042001
//set the URI of the pushlet

//set client type - browser or applet



  <%
  int watchListLen = watchList.length;
  for (int i=0; i
 value="<%=value%>" >
  <%
 }
  %>





--

Here is the error message

java.lang.NoClassDefFoundError: com/objectshare/grid/list/JKTableList
 at sg/com/netlife/ebrokerage/dispatch/applet/RealTimeApplet.init
(RealTimeApplet.java:1012)
 at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
 at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
 at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
 at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
 at com/ms/applet/AppletPanel.run (AppletPanel.java)
 at java/lang/Thread.run (Thread.java)


Senior Software Engineer
Netlife Solutions
EdgeMatrix

Tel (Main)  : +65 395 3400
Tel (DID)   : +65 395 8331
Fax: +65 395 3401
http://www.netlifeasia.com





Options tag problem

2001-05-24 Thread Mikkel Bruun

 
Hi Guys!

I have an ActionForm which contains a HashSet named Persons that contains
several instances of Person

In my jsp i want a dropdown box showing the Person's name.

code:
 

This points to the getPersons() method in the ActionForm that'll return a
HashSet...
Now I need to access each elements getName() method, but looking through the
options tag code, it seems like it can only handle Collections of
Stringsis this correct

Any suggestions on how to solve it???

thanks

Mikkel




Template Problems

2001-05-24 Thread Jon.Ridgway

Hi All,

I have just started looking at the template tags and have run into a problem
:

Root Error-1: Server caught unhandled exception from servlet [jsp]: Server
caught unhandled exception from servlet [jsp]: OutputStream already obtained

javax.servlet.jsp.JspException: Server caught unhandled exception from
servlet [jsp]: Server caught unhandled exception from servlet [jsp]:
OutputStream already obtained
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
javax.servlet.jsp.JspException(java.lang.String)
int org.apache.struts.taglib.template.InsertTag.doEndTag()

I'm using VAJ 3.5.3 WTE. I don't get this error with the template example
app. But if I change the template and swap the header for the side bar I get
the above error.

Any thoughts ?

Jon