TILES - cannot run the provided webapps

2001-08-14 Thread nicolas bonvin

cedric?,

I downloaded the latest(20010731) version of tiles from
http://www.lifl.fr/~dumoulin/tiles/ and tried to deploy the tiles-tutorial
webapp inside of tomcat4.0-b7 (as well as other tomcat versions just to make
sure); unfortunately, here's the error I get upon requesting
http://localhost:8080/tiles-tutorial/index.jsp

any idea?

thanks,

nicolas b.


Root Cause:
javax.servlet.jsp.JspException: Can't get definitions factory from context.
at
org.apache.struts.taglib.tiles.InsertTag.processDefinitionName(InsertTag.jav
a:589)
at
org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:442
)
at org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:399)
at org.apache.jsp._0002findex_jsp._jspService(_0002findex_jsp.java:65)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:215)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1000)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093
)
at java.lang.Thread.run(Thread.java:484)




FW: id attribute for Struts img and Image Tag

2001-08-14 Thread Jain, Shipra

Hi,

I posted this question to user mailing list three days back but received no
answer. So now, I am posting to developers list. Hope you people have answer
to my question. 

Also, I haven't subscribed to developers list, please whoever responds to
this mail, take a second to make sure that you send it to me also. My e-mail
address is [EMAIL PROTECTED]

Thanks
Shipra Jain

-Original Message-
From: Jain, Shipra [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 10, 2001 5:06 PM
To: '[EMAIL PROTECTED]'
Subject: id attribute for Struts img or Image Tag



Is there an id attribute for Struts img or Image Tag.  If not, Is it planned
for Struts 1.1.  

I think I read somewhere in mailing list that it was available in nightly
build.  If yes, can I take just the specific Tags out of the build ? 
Now, I tried hard to find that mail, but was not able to find.

Actually I want something like below to be there in my resulting html.  I
want id for the image so that my javascript can use it.

IMG id=register src=/images/registerActive.gif border=0

Can someone help me achieve this.

Thanks
Shipra Jain



RE: findForward and Errors

2001-08-14 Thread Deadman, Hal

You can put an entry in the property files like this:

error.message=Error {0}
or
error.message={0}

and then you can do something like this:

...new ActionError(error.message, e.getMessage())...

or whatever it is that allows you to pass substitution arguments to a
message.

-Original Message-
From: Shawn Sohl [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 14, 2001 5:02 PM
To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
Subject: RE: findForward and Errors


Craig,
Thanks for your reply.  I have tested the code in the logonAction
class it does work.  However, it only works when you use a key in the
properties file.  If I have this code in a catch statement, how can I use
the actual error message with the getMessage() method of the exception
class?   Any ideas on how to get around this?

Thanks

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 14, 2001 1:20 PM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: Re: findForward and Errors




On Tue, 14 Aug 2001, Shawn Sohl wrote:

 In my Action class I catch errors if they occur.  What I want to know is
can
 I create an ActionErrors object within my Action class and add an error
to
 it like I do in a Form class.  Basically what I want to do is shown in the
 code below.  My .jsp page that failure points to has the
html:errors/
 tag within it but it isnt picking up the error.  I know I can create and
set
 an attribute within the response object and pass the error that way but I
 thought I could use something like I'm trying to do below.

  catch(Exception e)
 {
   ActionErrors errors = new ActionErrors();
 errors.add(error,new ActionError(e.getMessage());
 return mapping.findForward(failure);
 }

 Thanks



The Struts example application does something very similar to this in
LogonAction -- since that is where an invalid username/pasword combination
is detected.  I think this is a reasonable design approach.

Craig



Re: Struts and WebSphere

2001-08-14 Thread Colin Sharples

The WebSphere development team are now fully aware of the problem
(including the missing break statement from the Tomcat 3.2 version of
PageContextImpl) and are working on an e-fix. I don't know what the
timescale for the e-fix being available is at present, but I'll post here
when it is available.

I agree with Craig's earlier comment that this is not a Struts problem, but
a WebSphere problem (well, to be precise it's a Tomcat 3.1 problem). The
correct fix is for WebSphere to update it's version of PageContextImpl -
and this is now in hand.

HTH.

Regards

Colin M Sharples
I/T Architect
Business Innovation Services Group
IBM New Zealand

email: [EMAIL PROTECTED]
phone: 64-4-5769853
mobile: 64-21-402085
fax: 64-4-5765616




   

Dave Bettin

javabettin@ya   To: [EMAIL PROTECTED] 

hoo.com cc:   

 Subject: Re: Struts and WebSphere 

14/08/2001 

03:51  

Please respond 

to struts-dev  

   

   




We are currently pushing IBM to upgrade their jasper
implmentation to the latest. They also use the old
jasper version in websphere 4.0. We are pushing this
through various IBM contacts.

Dave
--- Anders Monrad [EMAIL PROTECTED] wrote:
 Colin Sharples wrote:

 WebSphere relies on a very old implementation of
 Jasper (from Tomcat 3.1)
 that does not correctly implement the
 pageContext.removeAttribute()
 method.  That needs to be fixed.
 
 
 Um, yes, I am pursuing this one. I *think* it may
 be fixed in WebSphere
 3.5.4 (i.e. FixPack 4), but I haven't tested that
 yet.
 
 Another thing you can do is to get hold of
 PageContextImpl from Tomcat 3.2,
 add the missing break statement in
 removeAttribute() (in the REQUEST case),
 and then update the ibmwebas.jar in the WAS lib
 directory with the
 recompiled PageContextImpl. Works a treat :-)
 
 Regards
 
 Colin M Sharples
 I/T Architect
 Business Innovation Services Group
 IBM New Zealand
 
 email: [EMAIL PROTECTED]
 phone: 64-4-5769853
 mobile: 64-21-402085
 fax: 64-4-5765616
 
 
 
 Hi ..

 We are using WAS 3.5.4, with the latest e-fixes, and
 this is not fixed
 in this release. We commented out those lines in the
 Struts source, and
 rebuild to get it working.

 rgrds
 Anders Monrad




__
Do You Yahoo!?
Send instant messages  get email alerts with Yahoo! Messenger.
http://im.yahoo.com/






RE: Workflow Support Proposal

2001-08-14 Thread Colin Sharples

Craig,

First of all - great job on the workflow proposal! I had begun writing a
workflow system based on basic Struts Actions with a bit of state
management thrown in, but what you're suggesting is much closer to what I
need.

I have a couple of requirements which I'm sure are not unique to my
application. The processes I'm modelling take a long time - the overall
process takes a few weeks to finish, and individual steps may take a few
minutes, a few hours or even a few days. This has a couple of implications:
1) there isn't going to be a user waiting for an interactive response; the
user triggers the process by sending in some data, and will receive a
notification when it's finally finished. In between, it's up to the
system to ensure that each step gets executed. 2) Most of the steps will
therefore be asynchronous (some of them involve getting approval, sometimes
with delays of days).

If the steps are asynchronous, this will require some state management, so
that the workflow engine knows where to start off again. I had been
thinking along the lines that an asynchronous step would actually consist
of two steps, one which will send a message to initiate the process, and
another to assimilate the results of the step (triggered by some event).
Once the message initiating the step has been sent, the activity will be
suspended until the end-of-step-event arrives. The workflow engine will
invoke the activity, starting up at the point it left off (that's where the
state management comes in). This also implies that instances of activities
will need unique ids, so that the workflow engine knows which instance to
invoke. The messaging bit could have several implementations - JMS, email,
HTTP, etc.

I realise it's early days - these are just a few points to ponder. I'll see
if I can adapt my earlier work to what you've come up with.

Regards

Colin M Sharples
I/T Architect
Business Innovation Services Group
IBM New Zealand

email: [EMAIL PROTECTED]
phone: 64-4-5769853
mobile: 64-21-402085
fax: 64-4-5765616




   

Craig R.  

McClanahan  To: [EMAIL PROTECTED] 

craigmcc@apac   cc:   

he.org  Subject: RE: Workflow Support Proposal

   

14/08/2001 

07:25  

Please respond 

to struts-dev  

   

   






On Mon, 13 Aug 2001, Dan - Blue Lotus Software wrote:

 I've got a few ideas, and a few comments on the proposal.

 Reading over your workflow support, it looks not that far from what I had
 done for per-request workflow support.  You've also got it extended to
 multiple pages.  Nice.  The suggestion below, of allowing people to share
 workflows, is an interesting one.  Given this, here's a few of my
 suggestions.

 First of all, I'd like to see some consistent address space available
across
 an entire workflow.  I'd like to be able to request a form field value
from
 a FormBean on the 2nd page of the workflow, even though I'm on the 7th
page.
 I'd like to be able to transfer control for a workflow to another user,
in a
 secure fashion.  Given this, here's my proposal.

 In your multi-wizard schema, add a struts:page id=page1 (or whatever)
to
 indicate a single page within the workflow.  This would, in turn, contain
 the struts:forward and struts:navigate tags.  The idea is that this
 provides a namespace for looking up FormBean values.  From some other
page
 in the workflow, you should be able to look up values from the FormBean
 associated with a given page that is identified by name.


I guess I'm of a somewhat different opinion on how collaboration like this
should happen:

* ActionForm beans (from the perspective of the workflow system) are
  an implementation detail -- collaboration that requires information
  from multiple pages should be explicit

* If you're using request scope for form beans, they will not in fact
  exist in 

cvs commit: jakarta-struts/src/share/org/apache/struts/util RequestUtils.java

2001-08-14 Thread martinc

martinc 01/08/14 23:15:51

  Modified:src/share/org/apache/struts/action ActionServlet.java
   src/share/org/apache/struts/util RequestUtils.java
  Log:
  Allow disabling of the Struts multipart request handling mechanism, by
  specifying 'none' as the value of the 'multipartClass' init-param.
  
  Revision  ChangesPath
  1.74  +10 -6 
jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java
  
  Index: ActionServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- ActionServlet.java2001/07/16 00:44:52 1.73
  +++ ActionServlet.java2001/08/15 06:15:51 1.74
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java,v 1.73 
2001/07/16 00:44:52 craigmcc Exp $
  - * $Revision: 1.73 $
  - * $Date: 2001/07/16 00:44:52 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java,v 1.74 
2001/08/15 06:15:51 martinc Exp $
  + * $Revision: 1.74 $
  + * $Date: 2001/08/15 06:15:51 $
*
* 
*
  @@ -211,7 +211,8 @@
* megabytes, or gigabytes, respectively.  [250M]/li
* listrongmultipartClass/strong - The fully qualified name of the
* MultiplartRequestHandler implementation class to be used for processing
  - * file uploads.  [org.apache.struts.upload.DiskMultipartRequestHandler]
  + * file uploads. If set to codenone/code, disables Struts multipart
  + * request handling.  [org.apache.struts.upload.DiskMultipartRequestHandler]
* /li
* listrongnocache/strong - If set to codetrue/code, add HTTP headers
* to every response intended to defeat browser caching of any response we
  @@ -228,7 +229,7 @@
* /ul
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.73 $ $Date: 2001/07/16 00:44:52 $
  + * @version $Revision: 1.74 $ $Date: 2001/08/15 06:15:51 $
*/
   
   public class ActionServlet
  @@ -1408,7 +1409,10 @@
   String classValue = getServletConfig().getInitParameter(multipartClass);
   
   if ((classValue != null)  (classValue.length()  0)) {
  -multipartClass = classValue;
  +if (classValue.equals(none))
  +multipartClass = null;
  +else
  +multipartClass = classValue;
   }
   
   //maximum file size
  
  
  
  1.22  +124 -83   
jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java
  
  Index: RequestUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- RequestUtils.java 2001/08/05 19:00:29 1.21
  +++ RequestUtils.java 2001/08/15 06:15:51 1.22
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.21 
2001/08/05 19:00:29 martinc Exp $
  - * $Revision: 1.21 $
  - * $Date: 2001/08/05 19:00:29 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.22 
2001/08/15 06:15:51 martinc Exp $
  + * $Revision: 1.22 $
  + * $Date: 2001/08/15 06:15:51 $
*
* 
*
  @@ -97,7 +97,7 @@
* in the Struts controller framework.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.21 $ $Date: 2001/08/05 19:00:29 $
  + * @version $Revision: 1.22 $ $Date: 2001/08/15 06:15:51 $
*/
   
   public class RequestUtils {
  @@ -646,106 +646,60 @@
   HashMap properties = new HashMap();
   // Iterator of parameter names
   Enumeration names = null;
  -//Hashtable for multipart values
  +// Hashtable for multipart values
   Hashtable multipartElements = null;
   
  -boolean isMultipart = false;
   String contentType = request.getContentType();
   String method = request.getMethod();
  +boolean isMultipart = false;
  +
   if ((contentType != null) 
   (contentType.startsWith(multipart/form-data)) 
   (method.equalsIgnoreCase(POST))) {
  -isMultipart = true;
  -//initialize a MultipartRequestHandler
  -MultipartRequestHandler multipart = null;
   
  -//get an instance of ActionServlet
  +// Get the ActionServlet from the form bean
   ActionServlet servlet;
  -
   if (bean instanceof ActionForm) {
   servlet = ((ActionForm) bean).getServlet();
   } else {
   throw new 

RE: findForward and Errors

2001-08-14 Thread Shawn Sohl

Craig,
Thanks for your reply.  I have tested the code in the logonAction
class it does work.  However, it only works when you use a key in the
properties file.  If I have this code in a catch statement, how can I use
the actual error message with the getMessage() method of the exception
class?   Any ideas on how to get around this?

Thanks

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 14, 2001 1:20 PM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: Re: findForward and Errors




On Tue, 14 Aug 2001, Shawn Sohl wrote:

 In my Action class I catch errors if they occur.  What I want to know is
can
 I create an ActionErrors object within my Action class and add an error
to
 it like I do in a Form class.  Basically what I want to do is shown in the
 code below.  My .jsp page that failure points to has the
html:errors/
 tag within it but it isnt picking up the error.  I know I can create and
set
 an attribute within the response object and pass the error that way but I
 thought I could use something like I'm trying to do below.
 
  catch(Exception e)
 {
   ActionErrors errors = new ActionErrors();
 errors.add(error,new ActionError(e.getMessage());
 return mapping.findForward(failure);
 }
 
 Thanks
   
 

The Struts example application does something very similar to this in
LogonAction -- since that is where an invalid username/pasword combination
is detected.  I think this is a reasonable design approach.

Craig