RE: Weblogic 5.1 and Struts 1.0, Classpath question

2001-01-25 Thread rhayden


Harit,

2) Do not unjar-the-war, or struts.jar :)

1) Do not put struts.jar in the weblogic classpath... Here is my output from
wlconfig:

WebLogic startup settings are presently:

CLASSPATH Prefix
c:\weblogic\lib\weblogic510sp8boot.jar;c:\java\xerces-1_2_3\tools\xerces.jar
CLASSPATH
c:\weblogic\lib\weblogic510sp8boot.jar;c:\java\xerces-1_2_3\tools\xerces.jar
;c:\weblogic\jre1_2\lib\tools.jar;c:\weblogic\jre1_2\jre\lib\rt.jar;c:\weblo
gic\jre1_2\jre\lib\i18n.jar;C:\weblogic\license;C:\weblogic\classes\boot;C:\
weblogic\classes;C:\weblogic\lib\weblogicaux.jar;C:\weblogic\eval\cloudscape
\lib\cloudscape.jar
JAVA_HOME   c:\weblogic\jre1_2
WEBLOGIC_LICENSEDIR C:\weblogic\license
WEBLOGIC_HOME   C:\weblogic
system properties:
java.security.manager
java.security.policy==C:\weblogic\weblogic.policy
weblogic.system.home=C:\weblogic
java.compiler=symcjit
 
weblogic.class.path=c:\weblogic\lib\weblogic510sp8.jar;C:\weblogic\license;C
:\weblogic\classes;C:\weblogic\myserver\serverclasses;C:\weblogic\lib\weblog
icaux.jar;
INITIAL_HEAP8 MB
MAX_HEAP32 MB
SERVERCLASSPATH
c:\weblogic\lib\weblogic510sp8boot.jar;c:\java\xerces-1_2_3\tools\xerces.jar
;c:\weblogic\jre1_2\jre\lib\rt.jar;c:\weblogic\jre1_2\jre\lib\i18n.jar;C:\we
blogic\classes\boot;C:\weblogic\eval\cloudscape\lib\cloudscape.jar


4) You have added an entry in weblogic.properties for each application,
right? i.e.

weblogic.httpd.webApp.strutsexample=c:/java/jakarta-struts10/webapps/struts-
example.war
weblogic.httpd.webApp.strutsdocs=c:/java/jakarta-struts10/webapps/struts-doc
umentation.war
weblogic.httpd.webApp.strutstest=c:/java/jakarta-struts10/webapps/struts-tes
t.war 

5) Now start WL and let it extract the classes from the wars, then you need
to open the war with winzip and extract only ApplicationResources.properties
and put this with the other class files in the _tmp_war.

6) Restart WL and it should work.


Good luck :)



-Original Message-
From: Harit Nanavati [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 10:51 PM
To: [EMAIL PROTECTED]
Subject: Re: Weblogic 5.1 and Struts 1.0, Classpath question


Just did that ..
sturts.jar extracted. directory in WL classpath
war file extrected.
deleted starts.jar from lib directory
added the addtional precomple lines in web.xml
All the jsp compiles without problem.
But same error again !!..
 Missing resources attribute org.apache.struts.action.MESSAGE

No luck here !




Re: Weblogic 5.1 and Struts 1.0, Classpath question

2001-01-25 Thread renzo estrella

I was using the struts 0.5 examples I did not unjar
the
 main struts.jar file, I left that in the lib 
 directory. 
 Instead I unjarred the struts-example.war file &  
 modified the web.xml for the struts-example demo.
 Weblogic5.1 doesn't seem able to read ResourceBundles
 from a *.war file.
 I have not tried the 1.0 examples, if you are using
 those perhaps what I did those not apply.

--- Harit Nanavati <[EMAIL PROTECTED]> wrote:
> Just did that ..
> sturts.jar extracted. directory in WL classpath
> war file extrected.
> deleted starts.jar from lib directory
> added the addtional precomple lines in web.xml
> All the jsp compiles without problem.
> But same error again !!..
>  Missing resources attribute
> org.apache.struts.action.MESSAGE
> 
> No luck here !
> 
> -Harit
> - Original Message -
> From: "renzo estrella" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 25, 2001 7:27 PM
> Subject: Re: Weblogic 5.1 and Struts 1.0, Classpath
> question
> 
> 
> > This may be caused by the cast exception problem:
> >   MessageTag code first gets tries to get
> >   the MessageResources from
> >   servletContext.getAttribute()
> >   It then cast the object returned to
> MessageResources
> >this failure may be leading to your problem
> >so I would suggest you try including the
> following
> >sectoin into web.xml:
> >
> >
> >
> weblogic.jsp.precompile
> >  true
> >
> >
> >
> > --- Harit Nanavati <[EMAIL PROTECTED]>
> wrote:
> > > I have been trying the same thing. Getting the
> > > examples to work with
> > > Weblogic 5.1. I did get pass though the problem
> of
> > > runtime failur by
> > > un-jar-ing the classes and then included in WL
> > > classpath.
> > > I still get following exception. Can anyone
> please
> > > explain. I really want
> > > struts to get working in our current
> development.
> > > Thanx
> > > -Harit
> > > Exception
> > >
> >
>
--
> > > Thu Jan 25 19:22:58 PST 2001:
> > >  Root cause of
> > > ServletException
> > > javax.servlet.jsp.JspException: Missing
> resources
> > > attribute
> > > org.apache.struts.action.MESSAGE
> > > at
> > >
> >
>
org.apache.struts.taglib.MessageTag.doStartTag(MessageTag.java:360)
> > > at
> > > jsp_servlet._index._jspService(_index.java:82)
> > > at
> > >
> >
>
weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> > > at
> > >
> >
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> > > :124)
> > > at
> > >
> >
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> > > :142)
> > > at
> > >
> >
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> > > l.java:760)
> > > - Original Message -
> > > From: <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Thursday, January 25, 2001 7:05 PM
> > > Subject: Weblogic 5.1 and Struts 1.0, Classpath
> > > question
> > >
> > >
> > > > Well,
> > > >
> > > > After much frustration the past few nights I
> have
> > > finally managed to get
> > > the
> > > > Struts 1.0 example application to work on
> WL5.1.
> > > The majority of my
> > > problems
> > > > had to do with the classpath, which I never
> > > thought could be so irritating
> > > > (Thierry Cools suggested not to put struts.jar
> in
> > > the classpath, so I did
> > > > this and then it worked... Thanks!). My other
> > > problem was that I was using
> > > > the JAXP parser from Sun, which apparently is
> not
> > > appropriate for Struts
> > > 1.0
> > > > and WL5.1. It was fine with 0.5, but 1.0
> failed to
> > > load with many errors.
> > > > Now I am using Xerces and things are much
> better.
> > > >
> > > > However, there is still a problem. If I put
> > > struts.jar in the WL
> > > classpath,
> > > > the example application will not work. The app
> > > deploys and loads without
> > > > errors, but when the first JSP is executed I
> get a
> > > "runtime failure in
> > > > custom tag 'message'" error (see below). So
> the
> > > easy solution is just
> > > don't
> > > > put struts.jar in the classpath. The problem
> is
> > > that it needs to be
> > > included
> > > > because my session beans need a few classes
> that
> > > are included with
> > > > struts.jar (probably not the ideal design, but
> > > this how I am doing things)
> > > > such as ValidatingActionForm. Before I unzip
> > > things and try to include
> > > just
> > > > what I need, I just wanted to see if anyone
> had
> > > any ideas why including
> > > this
> > > > in the classpath is causing these problems.
> Both
> > > *.jars are identical, so
> > > I
> > > > don't see why this makes a difference.  I am
> not
> > > sure what this error
> > > means
> > > > so I don't know where to begin.
> > > >
> > > > Any ideas?
> > > >
> > > > Thanks
> > > > -Bob
> > > >
> > > > BTW - has anyone written (or in process or
> > > writing) installation notes
> > > > regardi

Re: Weblogic 5.1 and Struts 1.0, Classpath question

2001-01-25 Thread Harit Nanavati

Just did that ..
sturts.jar extracted. directory in WL classpath
war file extrected.
deleted starts.jar from lib directory
added the addtional precomple lines in web.xml
All the jsp compiles without problem.
But same error again !!..
 Missing resources attribute org.apache.struts.action.MESSAGE

No luck here !

-Harit
- Original Message -
From: "renzo estrella" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 25, 2001 7:27 PM
Subject: Re: Weblogic 5.1 and Struts 1.0, Classpath question


> This may be caused by the cast exception problem:
>   MessageTag code first gets tries to get
>   the MessageResources from
>   servletContext.getAttribute()
>   It then cast the object returned to MessageResources
>this failure may be leading to your problem
>so I would suggest you try including the following
>sectoin into web.xml:
>
>
> weblogic.jsp.precompile
>  true
>
>
>
> --- Harit Nanavati <[EMAIL PROTECTED]> wrote:
> > I have been trying the same thing. Getting the
> > examples to work with
> > Weblogic 5.1. I did get pass though the problem of
> > runtime failur by
> > un-jar-ing the classes and then included in WL
> > classpath.
> > I still get following exception. Can anyone please
> > explain. I really want
> > struts to get working in our current development.
> > Thanx
> > -Harit
> > Exception
> >
> --
> > Thu Jan 25 19:22:58 PST 2001:
> >  Root cause of
> > ServletException
> > javax.servlet.jsp.JspException: Missing resources
> > attribute
> > org.apache.struts.action.MESSAGE
> > at
> >
> org.apache.struts.taglib.MessageTag.doStartTag(MessageTag.java:360)
> > at
> > jsp_servlet._index._jspService(_index.java:82)
> > at
> >
> weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> > at
> >
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> > :124)
> > at
> >
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> > :142)
> > at
> >
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> > l.java:760)
> > - Original Message -
> > From: <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, January 25, 2001 7:05 PM
> > Subject: Weblogic 5.1 and Struts 1.0, Classpath
> > question
> >
> >
> > > Well,
> > >
> > > After much frustration the past few nights I have
> > finally managed to get
> > the
> > > Struts 1.0 example application to work on WL5.1.
> > The majority of my
> > problems
> > > had to do with the classpath, which I never
> > thought could be so irritating
> > > (Thierry Cools suggested not to put struts.jar in
> > the classpath, so I did
> > > this and then it worked... Thanks!). My other
> > problem was that I was using
> > > the JAXP parser from Sun, which apparently is not
> > appropriate for Struts
> > 1.0
> > > and WL5.1. It was fine with 0.5, but 1.0 failed to
> > load with many errors.
> > > Now I am using Xerces and things are much better.
> > >
> > > However, there is still a problem. If I put
> > struts.jar in the WL
> > classpath,
> > > the example application will not work. The app
> > deploys and loads without
> > > errors, but when the first JSP is executed I get a
> > "runtime failure in
> > > custom tag 'message'" error (see below). So the
> > easy solution is just
> > don't
> > > put struts.jar in the classpath. The problem is
> > that it needs to be
> > included
> > > because my session beans need a few classes that
> > are included with
> > > struts.jar (probably not the ideal design, but
> > this how I am doing things)
> > > such as ValidatingActionForm. Before I unzip
> > things and try to include
> > just
> > > what I need, I just wanted to see if anyone had
> > any ideas why including
> > this
> > > in the classpath is causing these problems. Both
> > *.jars are identical, so
> > I
> > > don't see why this makes a difference.  I am not
> > sure what this error
> > means
> > > so I don't know where to begin.
> > >
> > > Any ideas?
> > >
> > > Thanks
> > > -Bob
> > >
> > > BTW - has anyone written (or in process or
> > writing) installation notes
> > > regarding Struts1.0 and WL5.1? If not, I would be
> > happy to help out and do
> > > this.
> > >
> > >
> > > Thu Jan 25 21:32:15 EST 2001:
> >  Root
> > > cause of ServletException
> > > javax.servlet.ServletException: runtime failure in
> > custom tag 'message'
> > > at
> > jsp_servlet._index._jspService(_index.java, Compiled
> > Code)
> > > at
> >
> weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> > > at
> > >
> >
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> > > :106)
> > > at
> > >
> >
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> > > :124)
> > > at
> > >
> >
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> > > l.java:907)
> > 

Re: new template tag framework

2001-01-25 Thread David Geary

I think this is a good idea. In a couple of weeks, I'll have some time to
integrate it, unless someone objects.


david

"Craig R. McClanahan" wrote:

> "Deadman, Hal" wrote:
>
> > I just tried out this Components extension to Struts and I like how it
> > allows you centralize the template component definitions in an xml file and
> > that it allows you to extend a template component and just override the
> > parts that are different. Are there any plans for adopting this as part of
> > Struts? It appears the authors would like it to be part of struts. Has it
> > been voted down or is it being put off until after the 1.0 release?
> >
>
> It certainly won't be added to 1.0 at this point.  For 1.1, I'm certainly open
> to cool additions, and will be looking at this one closely.
>
> >
> > Hal
> >
>
> Craig
>
> >
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> > Nathan Eric Probst
> > Sent: Thursday, January 25, 2001 2:13 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: new template tag framework
> >
> > Check out the Components extention to Struts:
> > http://gauss.ficsgrp.com/cdm
> >
> > nathan
> >
> > Quoc Le wrote:
> >
> > > The struts-template example implements a "C-Frame"  using
> > > the new template tag framework.  I was a little disappointed
> > > to find, though, that each new page inserted inside the
> > > C-Frame requires 2 jsp/html files.  (One jsp to use the template
> > > jsp and another html/jsp file to hold the content - options.jsp
> > > and options.html for example).
> > >
> > > It would be nice if there were a way to have variable content
> > > inside the C-Frame without having to create 2 new pages
> > > for each new page.
> > >
> > > Does anyone know of an easy way to do this?
> > >
> > > Thanks,
> > > Quoc Le




Re: Weblogic 5.1 and Struts 1.0, Classpath question

2001-01-25 Thread renzo estrella

This may be caused by the cast exception problem:
  MessageTag code first gets tries to get 
  the MessageResources from 
  servletContext.getAttribute()
  It then cast the object returned to MessageResources
   this failure may be leading to your problem
   so I would suggest you try including the following
   sectoin into web.xml:

   
weblogic.jsp.precompile
 true
   


--- Harit Nanavati <[EMAIL PROTECTED]> wrote:
> I have been trying the same thing. Getting the
> examples to work with
> Weblogic 5.1. I did get pass though the problem of
> runtime failur by
> un-jar-ing the classes and then included in WL
> classpath.
> I still get following exception. Can anyone please
> explain. I really want
> struts to get working in our current development.
> Thanx
> -Harit
> Exception
>
--
> Thu Jan 25 19:22:58 PST 2001:
>  Root cause of
> ServletException
> javax.servlet.jsp.JspException: Missing resources
> attribute
> org.apache.struts.action.MESSAGE
> at
>
org.apache.struts.taglib.MessageTag.doStartTag(MessageTag.java:360)
> at
> jsp_servlet._index._jspService(_index.java:82)
> at
>
weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :124)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :142)
> at
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> l.java:760)
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 25, 2001 7:05 PM
> Subject: Weblogic 5.1 and Struts 1.0, Classpath
> question
> 
> 
> > Well,
> >
> > After much frustration the past few nights I have
> finally managed to get
> the
> > Struts 1.0 example application to work on WL5.1.
> The majority of my
> problems
> > had to do with the classpath, which I never
> thought could be so irritating
> > (Thierry Cools suggested not to put struts.jar in
> the classpath, so I did
> > this and then it worked... Thanks!). My other
> problem was that I was using
> > the JAXP parser from Sun, which apparently is not
> appropriate for Struts
> 1.0
> > and WL5.1. It was fine with 0.5, but 1.0 failed to
> load with many errors.
> > Now I am using Xerces and things are much better.
> >
> > However, there is still a problem. If I put
> struts.jar in the WL
> classpath,
> > the example application will not work. The app
> deploys and loads without
> > errors, but when the first JSP is executed I get a
> "runtime failure in
> > custom tag 'message'" error (see below). So the
> easy solution is just
> don't
> > put struts.jar in the classpath. The problem is
> that it needs to be
> included
> > because my session beans need a few classes that
> are included with
> > struts.jar (probably not the ideal design, but
> this how I am doing things)
> > such as ValidatingActionForm. Before I unzip
> things and try to include
> just
> > what I need, I just wanted to see if anyone had
> any ideas why including
> this
> > in the classpath is causing these problems. Both
> *.jars are identical, so
> I
> > don't see why this makes a difference.  I am not
> sure what this error
> means
> > so I don't know where to begin.
> >
> > Any ideas?
> >
> > Thanks
> > -Bob
> >
> > BTW - has anyone written (or in process or
> writing) installation notes
> > regarding Struts1.0 and WL5.1? If not, I would be
> happy to help out and do
> > this.
> >
> >
> > Thu Jan 25 21:32:15 EST 2001:
>  Root
> > cause of ServletException
> > javax.servlet.ServletException: runtime failure in
> custom tag 'message'
> > at
> jsp_servlet._index._jspService(_index.java, Compiled
> Code)
> > at
>
weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> > at
> >
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> > :106)
> > at
> >
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> > :124)
> > at
> >
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> > l.java:907)
> > at
> >
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> > l.java:851)
> > at
> >
>
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
> > Manager.java:252)
> > at
> >
>
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:364)
> > at
> >
>
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252)
> > at
>
weblogic.kernel.ExecuteThread.run(ExecuteThread.java,
> Compiled
> > Code)
> >
> 
> 
> 
> Confidential Information. This email is for intended
> recipient only.
> 
> 
> 


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



RE: Weblogic 5.1 and Struts 1.0, Classpath question

2001-01-25 Thread rhayden


See previous post from Harit (which you have probably already read). You
must extract the ApplicationResources.properties manually and put it in the
_tmp_war directory. Weblogic only extracts *.class files from the war.

Then *don't* put struts.jar in the classpath and it should work...


-Original Message-
From: Harit Nanavati [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 10:24 PM
To: [EMAIL PROTECTED]
Subject: Re: Weblogic 5.1 and Struts 1.0, Classpath question


I have been trying the same thing. Getting the examples to work with
Weblogic 5.1. I did get pass though the problem of runtime failur by
un-jar-ing the classes and then included in WL classpath.
I still get following exception. Can anyone please explain. I really want
struts to get working in our current development.
Thanx
-Harit
Exception --
Thu Jan 25 19:22:58 PST 2001:  Root cause of
ServletException
javax.servlet.jsp.JspException: Missing resources attribute
org.apache.struts.action.MESSAGE
at
org.apache.struts.taglib.MessageTag.doStartTag(MessageTag.java:360)
at jsp_servlet._index._jspService(_index.java:82)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:124)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:142)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:760)
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 25, 2001 7:05 PM
Subject: Weblogic 5.1 and Struts 1.0, Classpath question


> Well,
>
> After much frustration the past few nights I have finally managed to get
the
> Struts 1.0 example application to work on WL5.1. The majority of my
problems
> had to do with the classpath, which I never thought could be so irritating
> (Thierry Cools suggested not to put struts.jar in the classpath, so I did
> this and then it worked... Thanks!). My other problem was that I was using
> the JAXP parser from Sun, which apparently is not appropriate for Struts
1.0
> and WL5.1. It was fine with 0.5, but 1.0 failed to load with many errors.
> Now I am using Xerces and things are much better.
>
> However, there is still a problem. If I put struts.jar in the WL
classpath,
> the example application will not work. The app deploys and loads without
> errors, but when the first JSP is executed I get a "runtime failure in
> custom tag 'message'" error (see below). So the easy solution is just
don't
> put struts.jar in the classpath. The problem is that it needs to be
included
> because my session beans need a few classes that are included with
> struts.jar (probably not the ideal design, but this how I am doing things)
> such as ValidatingActionForm. Before I unzip things and try to include
just
> what I need, I just wanted to see if anyone had any ideas why including
this
> in the classpath is causing these problems. Both *.jars are identical, so
I
> don't see why this makes a difference.  I am not sure what this error
means
> so I don't know where to begin.
>
> Any ideas?
>
> Thanks
> -Bob
>
> BTW - has anyone written (or in process or writing) installation notes
> regarding Struts1.0 and WL5.1? If not, I would be happy to help out and do
> this.
>
>
> Thu Jan 25 21:32:15 EST 2001:  Root
> cause of ServletException
> javax.servlet.ServletException: runtime failure in custom tag 'message'
> at jsp_servlet._index._jspService(_index.java, Compiled Code)
> at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :106)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :124)
> at
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> l.java:907)
> at
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> l.java:851)
> at
>
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
> Manager.java:252)
> at
>
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:364)
> at
> weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
> Code)
>



Confidential Information. This email is for intended recipient only.





RE: workaround for weblogic5.1 cast exception

2001-01-25 Thread rhayden


I get the same errors as well (except for the cast exception, I haven't
encountered this one... yet). All the test pages execute successfully except
for the following 3 which generate the following errors: I am not sure if
this is useful, but Craig said "try to break it" so here you go :)

---


weblogic.servlet.jsp.JspException: (line 25): sess is not defined as bean
at weblogic.servlet.jsp.JspLexer.jspException(JspLexer.java:665)
at weblogic.servlet.jsp.JspLexer.mXML_GET_PROPERTY(JspLexer.java,
Compiled Code)
at weblogic.servlet.jsp.JspLexer.mXML_THING(JspLexer.java, Compiled
Code)
at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java, Compiled
Code)
at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java, Compiled
Code)
at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java, Compiled Code)
at weblogic.servlet.jsp.JspParser.doit(JspParser.java, Compiled
Code)
at weblogic.servlet.jsp.JspParser.parse(JspParser.java:116)
at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:97)
at
weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java, Compiled
Code)
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java, Compiled
Code)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:217)
at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java,
Compiled Code)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
, Compiled Code)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:907)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:851)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:252)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:364)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)

*** Note - I occasionally got this error using struts 0.5 too, but it could
be corrected by including a  at the top of the JSP.

--


javax.servlet.jsp.JspException: Exception reading resource
http://localhost:7001/strutstest/index.jsp;jsessionid=OnDqhn2MFLbavf9w2PX78i
ExDikaNi7B3DiyS4fkKN3jkmCckRpf|
4211559274516983013/-1062731420/6/7001/7001/7002/7002/7001/-1:
java.io.FileNotFoundException: Response: '404' for url:
'http://localhost:7001/strutstest/index.jsp;jse
ssionid=OnDqhn2MFLbavf9w2PX78iExDikaNi7B3DiyS4fkKN3jkmCckRpf|421155927451698
3013/-1062731420/6/7001/7001/7002/7002/7001/-1'
at
org.apache.struts.taglib.bean.IncludeTag.doStartTag(IncludeTag.java,
Compiled Code)
at
jsp_servlet._bean_45_include._jspService(_bean_45_include.java:84)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
, Compiled Code)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:907)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:851)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:252)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:364)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)



Match Tags 

Thu Jan 25 22:16:21 EST 2001:  Root
cause of ServletException
javax.servlet.jsp.JspException: No cookie JSESSIONID was included in this
request
at
org.apache.struts.taglib.bean.CookieTag.doStartTag(CookieTag.java, Compiled
Code)
at jsp_servlet._logic_45_match._jspService(_logic_45_match.java:99)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
, Compiled Code)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:907)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:851)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:252)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:364)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)


** These 2 look like URL re-writing problems ???





-Original Message-
From: renzo estrella [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 9:59 PM
To: [EMAIL PROTECTED]
Subject: workaround for weblogic5.1 cast exception 


I made the struts-example & struts-do

Re: Weblogic 5.1 and Struts 1.0, Classpath question

2001-01-25 Thread Harit Nanavati

I have been trying the same thing. Getting the examples to work with
Weblogic 5.1. I did get pass though the problem of runtime failur by
un-jar-ing the classes and then included in WL classpath.
I still get following exception. Can anyone please explain. I really want
struts to get working in our current development.
Thanx
-Harit
Exception --
Thu Jan 25 19:22:58 PST 2001:  Root cause of
ServletException
javax.servlet.jsp.JspException: Missing resources attribute
org.apache.struts.action.MESSAGE
at
org.apache.struts.taglib.MessageTag.doStartTag(MessageTag.java:360)
at jsp_servlet._index._jspService(_index.java:82)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:124)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:142)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:760)
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 25, 2001 7:05 PM
Subject: Weblogic 5.1 and Struts 1.0, Classpath question


> Well,
>
> After much frustration the past few nights I have finally managed to get
the
> Struts 1.0 example application to work on WL5.1. The majority of my
problems
> had to do with the classpath, which I never thought could be so irritating
> (Thierry Cools suggested not to put struts.jar in the classpath, so I did
> this and then it worked... Thanks!). My other problem was that I was using
> the JAXP parser from Sun, which apparently is not appropriate for Struts
1.0
> and WL5.1. It was fine with 0.5, but 1.0 failed to load with many errors.
> Now I am using Xerces and things are much better.
>
> However, there is still a problem. If I put struts.jar in the WL
classpath,
> the example application will not work. The app deploys and loads without
> errors, but when the first JSP is executed I get a "runtime failure in
> custom tag 'message'" error (see below). So the easy solution is just
don't
> put struts.jar in the classpath. The problem is that it needs to be
included
> because my session beans need a few classes that are included with
> struts.jar (probably not the ideal design, but this how I am doing things)
> such as ValidatingActionForm. Before I unzip things and try to include
just
> what I need, I just wanted to see if anyone had any ideas why including
this
> in the classpath is causing these problems. Both *.jars are identical, so
I
> don't see why this makes a difference.  I am not sure what this error
means
> so I don't know where to begin.
>
> Any ideas?
>
> Thanks
> -Bob
>
> BTW - has anyone written (or in process or writing) installation notes
> regarding Struts1.0 and WL5.1? If not, I would be happy to help out and do
> this.
>
>
> Thu Jan 25 21:32:15 EST 2001:  Root
> cause of ServletException
> javax.servlet.ServletException: runtime failure in custom tag 'message'
> at jsp_servlet._index._jspService(_index.java, Compiled Code)
> at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :106)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :124)
> at
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> l.java:907)
> at
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
> l.java:851)
> at
>
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
> Manager.java:252)
> at
>
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:364)
> at
> weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
> Code)
>



Confidential Information. This email is for intended recipient only.






Weblogic 5.1 and Struts 1.0, Classpath question

2001-01-25 Thread rhayden

Well,

After much frustration the past few nights I have finally managed to get the
Struts 1.0 example application to work on WL5.1. The majority of my problems
had to do with the classpath, which I never thought could be so irritating
(Thierry Cools suggested not to put struts.jar in the classpath, so I did
this and then it worked... Thanks!). My other problem was that I was using
the JAXP parser from Sun, which apparently is not appropriate for Struts 1.0
and WL5.1. It was fine with 0.5, but 1.0 failed to load with many errors.
Now I am using Xerces and things are much better.

However, there is still a problem. If I put struts.jar in the WL classpath,
the example application will not work. The app deploys and loads without
errors, but when the first JSP is executed I get a "runtime failure in
custom tag 'message'" error (see below). So the easy solution is just don't
put struts.jar in the classpath. The problem is that it needs to be included
because my session beans need a few classes that are included with
struts.jar (probably not the ideal design, but this how I am doing things)
such as ValidatingActionForm. Before I unzip things and try to include just
what I need, I just wanted to see if anyone had any ideas why including this
in the classpath is causing these problems. Both *.jars are identical, so I
don't see why this makes a difference.  I am not sure what this error means
so I don't know where to begin.

Any ideas?

Thanks
-Bob

BTW - has anyone written (or in process or writing) installation notes
regarding Struts1.0 and WL5.1? If not, I would be happy to help out and do
this. 


Thu Jan 25 21:32:15 EST 2001:  Root
cause of ServletException
javax.servlet.ServletException: runtime failure in custom tag 'message'
at jsp_servlet._index._jspService(_index.java, Compiled Code)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:106)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:124)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:907)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:851)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:252)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:364)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)




workaround for weblogic5.1 cast exception

2001-01-25 Thread renzo estrella

I made the struts-example & struts-documentation demo
 apps work by doing the following 2 steps:
 
1. For cast exception added this section to web.xml:
 
  weblogic.jsp.precompile
  true

2. For missing resource exception:
   I had to unjar the *.war files to the directorie
   because weblogic5.1 can't find resource in *.war 
   files.  
I'm using weblogic5.1 service pack 8
I get a different problem for the struts-test demo:
 "weblogic.servlet.jsp.JspException: (line 25): 
  sess is not defined as bean
  at weblogic.servlet.jsp.JspLexer.jspException  
   (JspLexer.java:665)"

Any help with the struts-test demo app would be
appreciated.



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



Re: new template tag framework

2001-01-25 Thread Wong Kok Wai

Another approach that's worth considering is the
portlet concept in JetSpeed
(http://jakarta.apache.org/jetspeed). The added
advanatge is it allows the user to customise the
layout themselves (a cheap form of personalisation).

> It certainly won't be added to 1.0 at this point. 
> For 1.1, I'm certainly open
> to cool additions, and will be looking at this one
> closely.
> 
> 
> Craig
> 
> 


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



RE: localization

2001-01-25 Thread Justin Kennedy

Thanks for the input Scott. I did what you initially said and it works fine.

Basically, the "Administrator" of this application will choose the locale he
wants to use before "Adding new data".

Picture an Admin app where Shipping carriers and services have to be entered
into the system for each language where it will be used. First the
administrator will select french locale and then enter a french description
for the service "Federal Express overnight". Then the administrator switches
to spanish to do the same thing. But the content of the page itself, aside
from the form data, will be in the language local to the administrator. My
companies "database framework" takes care of storing/retrieving the data
using a Locale object. I'm not sure at this point how it's all going to tie
together, but I currently have it working for straight up JSP.

This all may sound a little off from my original question, so I'll apologize
in advance.

Thanks again

-Original Message-
From: Scott Sayles [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 5:15 PM
To: [EMAIL PROTECTED]
Subject: RE: localization



Just as an after thought, if you intend on displaying multiple languages
within a page, one way to handle this could be to instantiate seperate
resource bundles with each using a different locale and then make these
available as application or session scope objects.  It would be fairly easy
to implement some custom tags for doing the generic
resourcebundle.getString("key") calls for the particular locale.  Although
I'm not sure, I think there is some way to specify additional
"MessageResource"s with Struts (?).

Anybody have any additional ideas or insights?

Thanks.

Scott


> -Original Message-
> From: Scott Sayles [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 25, 2001 6:58 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: localization
>
>
> > <%
> > java.util.Locale locale = new java.util.Locale("fr", "CA");
> > session.setAttribute("localeKey", locale);
> > %>
>
> There is probably a way to handle this within the existing Struts API, but
> in reference to this particular mechanism your attempting...
>
> The "localeKey" should actually be set to
> org.apache.struts.action.Action.LOCALE_KEY.
> i.e.
> <%
> session.setAttribute(Action.LOCALE_KEY, locale);
> %>
>
> It's unfortunate that the provided java.util.Locale object is
> (for the most
> part) immuttable.  Although, it would probably be fairly easy to extend it
> to allow setting the country and lanuage on the fly.
>
> Hope this helps.
>
> Scott
>
>
> > -Original Message-
> > From: Justin Kennedy [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 25, 2001 6:25 PM
> > To: [EMAIL PROTECTED]
> > Subject: localization
> >
> >
> > Hi all,
> >
> > I'm creating an administrative web application using struts. The
> > application
> > needs to change locales in different parts of the same page. I'm having
> > trouble accomplishing this.
> >
> > I'm using struts 0.5 with tomcat 3.2.1 and jdk 1.3
> >
> > I have three files in my
> > $TOMCAT_HOME/webapps/hello-world/WEB-INF/classes/helloworld/ directory
> > named:
> > HelloWorldResources.properties
> > HelloWorldResources_fr.properties
> > HelloWorldResources_fr_CA.properties
> >
> > with
> > hello.message=Hello
> > in HelloWorldResources.properties
> >
> > hello.message=Bonjour
> > in both HelloWorldResources_fr.properties and
> > HelloWorldResources_fr_CA.properties
> >
> > by looking at the message tag in struts.tld I noticed the 'locale'
> > attribute. So first I tried this:
> > 
> >
> > Instead of getting back Bonjour I got Hello
> >
> > so then I tried:
> > 
> >
> > with the same results.
> >
> > then I decided to investigate MessageTag.java and found some
> references to
> > localeKey and mentioning that this was a session attribute.
> > So then I tried:
> > <%
> > java.util.Locale locale = new java.util.Locale("fr", "CA");
> > session.setAttribute("localeKey", locale);
> > %>
> > 
> >
> > but got the same results (hello instead of bonjour)
> >
> > I also tried the same thing above but with the message
> attribute locale of
> > "fr_CA" passed, but no go.
> >
> > What am I doing wrong ? This is my first crack at struts.
> >
> > Thanks,
> > -Justin
> >
> >
>
>




Re: Post/re-post problems

2001-01-25 Thread Elod Horvath

Bear wrote:
> 
> Craig,
> 
> At 10:28 AM 1/24/2001 -0800, you wrote:
> >* Tell my users "deal with it -- this is a web application, not a
> >   web site, and the URL that you see is totally irrelevant."
> 
> I'm perfectly comfortable with this regarding the displayed URL. But what
> about the refresh problem? Is there anyway to elegantly handle that?
> 
> thanks
> bear

see the following post in the archives for another view/solution
to this issue:

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg01823.html

e
-- 
___
Elod Horvath ('e')   /  ITFAIS Records (http://www.itfais.com/)



RE: localization

2001-01-25 Thread Scott Sayles


Just as an after thought, if you intend on displaying multiple languages
within a page, one way to handle this could be to instantiate seperate
resource bundles with each using a different locale and then make these
available as application or session scope objects.  It would be fairly easy
to implement some custom tags for doing the generic
resourcebundle.getString("key") calls for the particular locale.  Although
I'm not sure, I think there is some way to specify additional
"MessageResource"s with Struts (?).

Anybody have any additional ideas or insights?

Thanks.

Scott


> -Original Message-
> From: Scott Sayles [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 25, 2001 6:58 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: localization
>
>
> > <%
> > java.util.Locale locale = new java.util.Locale("fr", "CA");
> > session.setAttribute("localeKey", locale);
> > %>
>
> There is probably a way to handle this within the existing Struts API, but
> in reference to this particular mechanism your attempting...
>
> The "localeKey" should actually be set to
> org.apache.struts.action.Action.LOCALE_KEY.
> i.e.
> <%
> session.setAttribute(Action.LOCALE_KEY, locale);
> %>
>
> It's unfortunate that the provided java.util.Locale object is
> (for the most
> part) immuttable.  Although, it would probably be fairly easy to extend it
> to allow setting the country and lanuage on the fly.
>
> Hope this helps.
>
> Scott
>
>
> > -Original Message-
> > From: Justin Kennedy [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 25, 2001 6:25 PM
> > To: [EMAIL PROTECTED]
> > Subject: localization
> >
> >
> > Hi all,
> >
> > I'm creating an administrative web application using struts. The
> > application
> > needs to change locales in different parts of the same page. I'm having
> > trouble accomplishing this.
> >
> > I'm using struts 0.5 with tomcat 3.2.1 and jdk 1.3
> >
> > I have three files in my
> > $TOMCAT_HOME/webapps/hello-world/WEB-INF/classes/helloworld/ directory
> > named:
> > HelloWorldResources.properties
> > HelloWorldResources_fr.properties
> > HelloWorldResources_fr_CA.properties
> >
> > with
> > hello.message=Hello
> > in HelloWorldResources.properties
> >
> > hello.message=Bonjour
> > in both HelloWorldResources_fr.properties and
> > HelloWorldResources_fr_CA.properties
> >
> > by looking at the message tag in struts.tld I noticed the 'locale'
> > attribute. So first I tried this:
> > 
> >
> > Instead of getting back Bonjour I got Hello
> >
> > so then I tried:
> > 
> >
> > with the same results.
> >
> > then I decided to investigate MessageTag.java and found some
> references to
> > localeKey and mentioning that this was a session attribute.
> > So then I tried:
> > <%
> > java.util.Locale locale = new java.util.Locale("fr", "CA");
> > session.setAttribute("localeKey", locale);
> > %>
> > 
> >
> > but got the same results (hello instead of bonjour)
> >
> > I also tried the same thing above but with the message
> attribute locale of
> > "fr_CA" passed, but no go.
> >
> > What am I doing wrong ? This is my first crack at struts.
> >
> > Thanks,
> > -Justin
> >
> >
>
>




Re: configuring database connection pool

2001-01-25 Thread Steve A Drake

On Thu, 25 Jan 2001, Craig R. McClanahan wrote:

> It looks like the Informix JDBC driver is throwing an exception when you call 
>setReadOnly(true) on one of its
> connections.  Could you try that in a standalone program and see what happens, and 
>also what happens if you call
> setReadOnly(false)?

 Okay, thanks for the advice. I tried running this sample code with the
"user" as myself (who owns the tables), another user, and as user
"informix", who should have global read/write privileges. As any of these
users I can get a non-null result set from a select statement. I tried
the following code snippet:


  try {
boolean yup = true;
conn.setReadOnly(yup);
  }
  catch (SQLException e) {
System.out.println("Bummer, dude: got an exception ");
e.printStackTrace(System.out);
  }

Regardless of the value for "yup", I got this exception:

Bummer, dude: got an exception 
java.sql.SQLException
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:308)
at
com.informix.jdbc.IfxSqliConnect.setReadOnly(IfxSqliConnect.java:1484)
at edu.ucar.comet.sql.SqlManager$Test.main(SqlManager.java:245)



So, it does not look like a Struts problem.
Looking at the database table privileges, I have:

UserSelect Update Insert  Delete  Index Alter

public   AllAllYes Yes Yes   No


Looks okay to me. I think I'll search in ernest for some API docs for this
driver tomorrow. Maybe that'll shed some light.

Any other ideas would also be appreciated.




RE: localization

2001-01-25 Thread Scott Sayles

> <%
> java.util.Locale locale = new java.util.Locale("fr", "CA");
> session.setAttribute("localeKey", locale);
> %>

There is probably a way to handle this within the existing Struts API, but
in reference to this particular mechanism your attempting...

The "localeKey" should actually be set to
org.apache.struts.action.Action.LOCALE_KEY.
i.e.
<%
session.setAttribute(Action.LOCALE_KEY, locale);
%>

It's unfortunate that the provided java.util.Locale object is (for the most
part) immuttable.  Although, it would probably be fairly easy to extend it
to allow setting the country and lanuage on the fly.

Hope this helps.

Scott


> -Original Message-
> From: Justin Kennedy [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 25, 2001 6:25 PM
> To: [EMAIL PROTECTED]
> Subject: localization
>
>
> Hi all,
>
> I'm creating an administrative web application using struts. The
> application
> needs to change locales in different parts of the same page. I'm having
> trouble accomplishing this.
>
> I'm using struts 0.5 with tomcat 3.2.1 and jdk 1.3
>
> I have three files in my
> $TOMCAT_HOME/webapps/hello-world/WEB-INF/classes/helloworld/ directory
> named:
> HelloWorldResources.properties
> HelloWorldResources_fr.properties
> HelloWorldResources_fr_CA.properties
>
> with
> hello.message=Hello
> in HelloWorldResources.properties
>
> hello.message=Bonjour
> in both HelloWorldResources_fr.properties and
> HelloWorldResources_fr_CA.properties
>
> by looking at the message tag in struts.tld I noticed the 'locale'
> attribute. So first I tried this:
> 
>
> Instead of getting back Bonjour I got Hello
>
> so then I tried:
> 
>
> with the same results.
>
> then I decided to investigate MessageTag.java and found some references to
> localeKey and mentioning that this was a session attribute.
> So then I tried:
> <%
> java.util.Locale locale = new java.util.Locale("fr", "CA");
> session.setAttribute("localeKey", locale);
> %>
> 
>
> but got the same results (hello instead of bonjour)
>
> I also tried the same thing above but with the message attribute locale of
> "fr_CA" passed, but no go.
>
> What am I doing wrong ? This is my first crack at struts.
>
> Thanks,
> -Justin
>
>




Re: configuring database connection pool

2001-01-25 Thread Craig R. McClanahan

It looks like the Informix JDBC driver is throwing an exception when you call 
setReadOnly(true) on one of its
connections.  Could you try that in a standalone program and see what happens, and 
also what happens if you call
setReadOnly(false)?

Craig


Steve A Drake wrote:

>  Hello. I'm trying to configure Struts to instantiate a database
> connection pool using the ifxjdbc.jar driver for the Informix Dynamic
> Server (7.2). So far, I'm getting exceptions at startup. I also get an
> exception when I try to obtain a DB connection. Any help would be appreciated!
>
>  Note that I've verified that the Informix driver works fine in a sample
> servlet run outside of Struts. Also, I get the same error regardless of
> the value for "readOnly", even if it's not defined. My struts-config.xml
> file looks like:
>
>   
> autoCommit="false"
>readOnly="true"
>description="Informix Data Source Configuration"
>driverClass="com.informix.jdbc.IfxDriver"
>maxCount="4"
>minCount="2"
>password="thatestufa"
>url="jdbc:informix-sqli://yowza:1520/db:informixserver=yowza"
>user="thisestufa"
> />
>   
>
> And in the tomcat (4.0 beta) log file I'm getting:
>
> 2001-01-25 18:14:23 action: Loading application resources from resource 
>org.apache.struts.example.ApplicationResources
> 2001-01-25 18:14:23 action: Initializing configuration from resource path 
>/WEB-INF/struts-config.xml
> 2001-01-25 18:14:23 action: Initializing application data source 
>org.apache.struts.action.DATA_SOURCE
> 2001-01-25 18:14:24 action: Exception initializing application data source 
>org.apache.struts.action.DATA_SOURCE
> java.sql.SQLException
> at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:308)
> at com.informix.jdbc.IfxSqliConnect.setReadOnly(IfxSqliConnect.java:1484)
> at 
>org.apache.struts.util.GenericConnection.(GenericConnection.java:127)
> at 
>org.apache.struts.util.GenericDataSource.createConnection(GenericDataSource.java:623)
> at org.apache.struts.util.GenericDataSource.open(GenericDataSource.java:561)
> at 
>org.apache.struts.action.ActionServlet.initDataSources(ActionServlet.java:998)
> at org.apache.struts.action.ActionServlet.init(ActionServlet.java:444)
> at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:755)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:2979)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:816)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:334)
> at org.apache.catalina.core.StandardHost.deploy(StandardHost.java:545)
> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:294)
> at org.apache.catalina.startup.HostConfig.start(HostConfig.java:383)
> at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:226)
> at 
>org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1172)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1160)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:217)
> at org.apache.catalina.core.StandardService.start(StandardService.java:353)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:454)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:654)
> at org.apache.catalina.startup.Catalina.execute(Catalina.java:595)
> at org.apache.catalina.startup.Catalina.process(Catalina.java:176)
> at java.lang.reflect.Method.invoke(Native Method)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:157)




configuring database connection pool

2001-01-25 Thread Steve A Drake

 Hello. I'm trying to configure Struts to instantiate a database
connection pool using the ifxjdbc.jar driver for the Informix Dynamic
Server (7.2). So far, I'm getting exceptions at startup. I also get an
exception when I try to obtain a DB connection. Any help would be appreciated!
 
 Note that I've verified that the Informix driver works fine in a sample
servlet run outside of Struts. Also, I get the same error regardless of
the value for "readOnly", even if it's not defined. My struts-config.xml
file looks like:

  

  

And in the tomcat (4.0 beta) log file I'm getting:

2001-01-25 18:14:23 action: Loading application resources from resource 
org.apache.struts.example.ApplicationResources
2001-01-25 18:14:23 action: Initializing configuration from resource path 
/WEB-INF/struts-config.xml
2001-01-25 18:14:23 action: Initializing application data source 
org.apache.struts.action.DATA_SOURCE
2001-01-25 18:14:24 action: Exception initializing application data source 
org.apache.struts.action.DATA_SOURCE
java.sql.SQLException
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:308)
at com.informix.jdbc.IfxSqliConnect.setReadOnly(IfxSqliConnect.java:1484)
at org.apache.struts.util.GenericConnection.(GenericConnection.java:127)
at 
org.apache.struts.util.GenericDataSource.createConnection(GenericDataSource.java:623)
at org.apache.struts.util.GenericDataSource.open(GenericDataSource.java:561)
at 
org.apache.struts.action.ActionServlet.initDataSources(ActionServlet.java:998)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:444)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:755)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:2979)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:816)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:334)
at org.apache.catalina.core.StandardHost.deploy(StandardHost.java:545)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:294)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:383)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:226)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1172)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1160)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:217)
at org.apache.catalina.core.StandardService.start(StandardService.java:353)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:454)
at org.apache.catalina.startup.Catalina.start(Catalina.java:654)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:595)
at org.apache.catalina.startup.Catalina.process(Catalina.java:176)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:157)




localization

2001-01-25 Thread Justin Kennedy

Hi all,

I'm creating an administrative web application using struts. The application
needs to change locales in different parts of the same page. I'm having
trouble accomplishing this.

I'm using struts 0.5 with tomcat 3.2.1 and jdk 1.3

I have three files in my
$TOMCAT_HOME/webapps/hello-world/WEB-INF/classes/helloworld/ directory
named:
HelloWorldResources.properties
HelloWorldResources_fr.properties
HelloWorldResources_fr_CA.properties

with
hello.message=Hello
in HelloWorldResources.properties

hello.message=Bonjour
in both HelloWorldResources_fr.properties and
HelloWorldResources_fr_CA.properties

by looking at the message tag in struts.tld I noticed the 'locale'
attribute. So first I tried this:


Instead of getting back Bonjour I got Hello

so then I tried:


with the same results.

then I decided to investigate MessageTag.java and found some references to
localeKey and mentioning that this was a session attribute.
So then I tried:
<%
java.util.Locale locale = new java.util.Locale("fr", "CA");
session.setAttribute("localeKey", locale);
%>


but got the same results (hello instead of bonjour)

I also tried the same thing above but with the message attribute locale of
"fr_CA" passed, but no go.

What am I doing wrong ? This is my first crack at struts.

Thanks,
-Justin




RE: new template tag framework

2001-01-25 Thread Deadman, Hal

Doesn't this Components extension leverage the struts framework? It
basically just extends the struts ActionServlet. It then provides a
component tag library that is backwardly compatible with struts template
tags. I just modified a few files in my rather small web application to use
the components tld instead of struts-template.tld and it seemed to work fine
with the latest Struts build. Going back to the current template library
would be fairly easy but I would lose central administration of the
component/page definitions.

Hal

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 3:29 PM
To: Struts List
Subject: Re: new template tag framework


On 1/25/2001 at 11:42 AM Craig R. McClanahan wrote:
> It certainly won't be added to 1.0 at this point.  For 1.1, I'm
certainly open to cool additions, and will be looking at this one
closely.

The coolest addition would be one that actually leveraged the Struts
framework, the way some of the custom tags do.

The current template library is generic, and any other could be easily
used in its place. (Which is the beauty Struts. It is firmly based on
standards, so it is easy to plug-in whatever other standard library you
may need to use!)


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/



Re: new template tag framework

2001-01-25 Thread Ted Husted

On 1/25/2001 at 11:42 AM Craig R. McClanahan wrote:
> It certainly won't be added to 1.0 at this point.  For 1.1, I'm
certainly open to cool additions, and will be looking at this one
closely.

The coolest addition would be one that actually leveraged the Struts
framework, the way some of the custom tags do. 

The current template library is generic, and any other could be easily
used in its place. (Which is the beauty Struts. It is firmly based on
standards, so it is easy to plug-in whatever other standard library you
may need to use!)


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/





Re: Examples in Code

2001-01-25 Thread Dzenan Ridjanovic

Actually, my example works just fine.  It has DbActionServlet class that
inherits from ActionServlet.  DbActionServlet grabs a data source only once
at the init time, creates a Db object and opens it with the data source
argument.  The db package is not dependent on struts.  I have used a
similar db package n several client-server applets.

I do plan to use an Oracle example as well.  However, it is nice to have a
ready db example after you download the code.  The only thing you need to
do is to define the ODBC data source.  You do not need to have the Access
software to run the example locally.  Of course, the Access db file is
Windows only.

Ted Husted wrote:

> That's certainly worth looking at, and if Craig's suggestions don't fix
> you up, I will.
>
> The one thing I would note is that there are restrictions on how the
> JDBC:ODBC driver can be used with an Access database. If you continue
> to have problems, and haven't used this for other JDBC applications, I
> would try another database to be sure that is not the problem. Likely
> candidates might include MySQL (available for most platforms, including
> NT) and HyperSonicSQL, which is pure Java. Once you have confirmed that
> it is not an JDBC:ODBC:Access issue, you could switch back and continue
> troubleshooting.
>
> http://mysql.com/
> http://www.hypersonicsql.com/
>
> *** REPLY SEPARATOR  ***
>
> On 1/25/2001 at 2:06 PM Dzenan Ridjanovic wrote:
>
> Look at the examples in
>
> http://drdb.fsa.ulaval.ca:8080/dr/html/struts/membership/index.html
>
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 425-0252; Fax 716 223-2506.
> -- http://www.husted.com/about/struts/

--
Dzenan Ridjanovic
http://drdb.fsa.ulaval.ca/





Re: Nested and indexed attributes with the latest builds?

2001-01-25 Thread Ted Husted

I also have one that I will be able to share later today, as soon as
finish updating some of the code.

*** REPLY SEPARATOR  ***

On 1/25/2001 at 11:29 AM Craig R. McClanahan wrote:

Kevin Wang wrote:

> Just wondering whether anyone has successfully used nested/indexed
> attributes in Struts. Sample codes?
>

It's not very pretty or elegant, but the pages in the "struts-test.war"
application include some code that uses these sorts of attributes.

>
> Thanks.

Craig



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/





Re: new template tag framework

2001-01-25 Thread Craig R. McClanahan

"Deadman, Hal" wrote:

> I just tried out this Components extension to Struts and I like how it
> allows you centralize the template component definitions in an xml file and
> that it allows you to extend a template component and just override the
> parts that are different. Are there any plans for adopting this as part of
> Struts? It appears the authors would like it to be part of struts. Has it
> been voted down or is it being put off until after the 1.0 release?
>

It certainly won't be added to 1.0 at this point.  For 1.1, I'm certainly open
to cool additions, and will be looking at this one closely.

>
> Hal
>

Craig


>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Nathan Eric Probst
> Sent: Thursday, January 25, 2001 2:13 AM
> To: [EMAIL PROTECTED]
> Subject: Re: new template tag framework
>
> Check out the Components extention to Struts:
> http://gauss.ficsgrp.com/cdm
>
> nathan
>
> Quoc Le wrote:
>
> > The struts-template example implements a "C-Frame"  using
> > the new template tag framework.  I was a little disappointed
> > to find, though, that each new page inserted inside the
> > C-Frame requires 2 jsp/html files.  (One jsp to use the template
> > jsp and another html/jsp file to hold the content - options.jsp
> > and options.html for example).
> >
> > It would be nice if there were a way to have variable content
> > inside the C-Frame without having to create 2 new pages
> > for each new page.
> >
> > Does anyone know of an easy way to do this?
> >
> > Thanks,
> > Quoc Le




Re: Examples in Code

2001-01-25 Thread Ted Husted

That's certainly worth looking at, and if Craig's suggestions don't fix
you up, I will.

The one thing I would note is that there are restrictions on how the
JDBC:ODBC driver can be used with an Access database. If you continue
to have problems, and haven't used this for other JDBC applications, I
would try another database to be sure that is not the problem. Likely
candidates might include MySQL (available for most platforms, including
NT) and HyperSonicSQL, which is pure Java. Once you have confirmed that
it is not an JDBC:ODBC:Access issue, you could switch back and continue
troubleshooting.

http://mysql.com/ 
http://www.hypersonicsql.com/


*** REPLY SEPARATOR  ***

On 1/25/2001 at 2:06 PM Dzenan Ridjanovic wrote:

Look at the examples in

http://drdb.fsa.ulaval.ca:8080/dr/html/struts/membership/index.html



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/





Re: Nested and indexed attributes with the latest builds?

2001-01-25 Thread Craig R. McClanahan

Kevin Wang wrote:

> Just wondering whether anyone has successfully used nested/indexed
> attributes in Struts. Sample codes?
>

It's not very pretty or elegant, but the pages in the "struts-test.war"
application include some code that uses these sorts of attributes.

>
> Thanks.

Craig





Re: Handling refresh in a web based application

2001-01-25 Thread Craig R. McClanahan

ron talk wrote:

> Hi all,
>
> is there anyway to determine whether a repeated http request has been
> generated through a
>   - click on the refresh button on a browser
>   - through clicking the back button a the browser and re-clicking the
> link/button generating the initial request
>
> I am working on a struts based application in which I must allow the request
> to be completed if it is though going back and re clicking the link, but if
> its a simple refresh, the request is ignored.
>

There is a capability to detect repeated submits of the same form, using a
"command token" functionality.

In the Struts example application, you will note that EditRegistrationAction
(which sets up the form bean for the registration.jsp page) calls

saveToken(request);

near the bottom.  This stores a session attribute with a transactional control
token that must be submitted on the next request in order to be valid.  Then, in
the SaveRegistrationAction (which handles the submit), we see:

if (!isTokenValid(request)) {
... deal with the error ...
}
resetToken(request);

so that your app can do whatever is appropriate when it detects a resubmit.

No changes to the JSP pages themselves are necessary (the  tag
automatically creates a hidden variable if needed).  IMHO, transactional control
like this is a "controller" thing (in the model-view-controller paradigm), so
page authors should not have to be concerned with it.

Craig





Re: no 'application' init parameter for ActionServlet causes NullPoin terException in ??

2001-01-25 Thread Craig R. McClanahan

[EMAIL PROTECTED] wrote:

> Martin,
> Thanks for the response.  That's sort of the same conclusion I came to.
> If that's the way it needs to be, that's fine.  I like the design of the
> resource file.   I just skipped it in the interest of getting my first
> example working with as little as possible.
>
> Craig & Company:  Prehaps it would be possible to modify the documentation
> in such a way as to better explain this requirement?  I was thrown off by
> the description in the javadoc.  It would also be cool if the ErrorsTag.java
> source checked for a null messages object and threw a more descriptive error
> message stating that an application parameter is required, or something.
> Just a thought.
>

I've updated the 1.0 version of this tag (), which you should be
using instead of  in new development, to display "MISSING
APPLICATION RESOURCES" when this happens.  It had appropriate checks for null
values, and would completely ignore the ActionErrors object passed by your
application if there were no resources available.

This will show up in tonight's nightly build.

> Again, thanks for the excellent tool.  I'm really excited about using it.
>
> Perry Tew
>

Craig





Jsp Compilation question. (Want to load Jsp's from my own location=database)

2001-01-25 Thread Johan Compagner

Hi,

My JSP files are stored in a database because it should be possible to change the jsp 
pages 
on the fly without deploying a complete new war file and/or shutting down the 
application server.
And it must be possible to upload those jsp pages through our maintenance web pages of 
our application.

The problem is how to develop a standaard way so that the (re)compilation of those 
jsp's works 
over different application servers.

In tomcat i can override the jspCompilerPlugin param of the JspServlet to get what i 
want i believe!?


jspCompilerPlugin
org.apache.jasper.compiler.JikesJavaCompiler


But this is i believe Tomcat specifiek.

So what i can do is make my own JspServlet and replace the default JspServlet of the
application servlet by defining in my web.xml my own mapping and servlet:



jsp


*.jsp



and a servlet:


jsp


my.package.MyJspServlet



In tomcat 3.1 this works:
Context log: path="/postbank" Removing duplicate servlet jsp 
Wrapper(my.package.MyJspServlet)
Context log: path="/postbank" Removing duplicate *.jsp -> Wrapper(jsp 
org.apache.jasper.runtime.JspServlet)

So it seems that by default the JspServlet is attached to that context and when 
specified another one it removes 
that one and uses the specified one.

Is this standard behaviour?

But after that i come accross a problem: How can i parse and complile the Jsp to a 
Servlet??? Because then
i need an application specifiek item. In tomcat i believe Jasper?

So to make a large question short: If i want to load the Jsp pages from my own 
location how to implement the
rest so that it works with more then one specifiek App Server?

Johan C.











RE: Any way to dynamically change flow-of-control?

2001-01-25 Thread Rick Horowitz

Hi Curt,

Thanks for your detailed response.  I have some more questions, if you can 
spare the time.  Perhaps I can help you improve your design (once I fully 
understand it, that is) :) since you did say there were some shortcomings...

At 05:44 PM 1/24/01 -0800, you wrote:
>Rick-
>
> > When the user is presented with screen B, he fills out the
> > search form and selects either:
> >
> > - OK:  we process the search request and transition to screen C if
> > search is successful, and return to screen B with errors if search
> > is unsuccessful.
>
>Actually, screen B and screen C are implemented in the same (.jsp)
>file.  When first moving from screen A to screen B, there are no
>results stored in the context of the request.  When screen B is
>submitted to the Action, one of three things will happen.
>
> - The results are stored in a "requestList" attribute
> - The errors are stored in an "errorList" attribute
> - A boolean "true" is stored in a "noResults" attribute
>
>The .jsp displays the results as appropriate (using Struts logic
>tags) under the same (form) header that was used to collect the
>search criteria.  This also allows the user to immediately do a
>different search without hitting the "Back" button.

OK, this is clear.


> > - Cancel:  we obtain the data from the cache, set things up,
> > and return the user to screen A
>
>Yes.
>
> > - Hits the browser back button:  ??
>
>The browser simply restores screen A without any input from
>the server.  We never can directly discover whether or not this
>has happened without the type of JavaScript I'm trying to avoid.

Do you mean that you allow screen A to be cached by the browser?  In other 
words, you aren't setting the no-cache stuff in the HTML header to prevent 
caching?

> > So this leaves me with a couple of questions:
> >
> > 1. How do we differentiate the transitions when processing the
> > OK or Cancel from screen B?
>
>I look directly at the request.  The relevant code is:
> if (request.getParameter("cancel") != null)
> {
> LookupForm oldform = lkupform.getSavedForm();
> return oldform.processAction(request, response);
> }
>
>(LookupForm is a derivative of ActionForm that has the small
>amount of additional state information needed to implement the
>stack.)

LookupForm is a subclass of ActionForm...ok.  What is the variable 
lkupform? an instance of LookupForm?  I'm confused.  Then you call 
oldform.processAction()...don't get this either.  What I would imagine you 
want to do from a purely logical perspective is to recover the saved 
ActionForm associated with screen A and use RequestDispatcher.forward() to 
forward to the JSP that displays screen A.  That will reproduce screen A 
for the user with the same data the user last saw.  How does the above code 
do that?  Or am I misunderstanding what needs to happen here?


> > I suppose this means the token used to store screen A's
> > information is written to screen B's form, and retrieved IFF
> > the user decides to Cancel screen B's action. True?
>
>It's also used when the user selects a search result choice
>on screen C.

Sure, makes sense.


> > 2. What happens when the user selects a search result choice
> > on screen C?  We want to return the user to screen A.  Does
> > this mean that screen C should also be implemented as a HTML
> > form, and that we also write the token for screen A to this
> > form?  How do you know which token to write onto screen C's
> > form?  Do you just "know" that screen B needs to create a new
> > cache entry, and that screen C needs to use the cache entry
> > token that is submitted with screen B's request, and therefore
> > code it that way?  Or do you have some other mechanism that
> > you've designed?
>
>Knowing that screens B and C share a .jsp and (by extension)
>an ActionForm should make this a little clearer.  The actual
>selection of a search result from screen C is done with a custom
>tag that references a "LookupResult" action which I reuse for
>all such lookups.  This tag
>   
>produces this HTML
> 
>
>The caller is, again, a reference to the cached calling form.
>The "code" and "id" are fields that identify the search result
>chosen -- in this case, "code" is a human-readable possibly
>unique value representing the record, and "id" is a surrogate
>key to that record (and guaranteed unique).
>
>The code is what will populate the field on the original form
>(screen A) that we're looking up.  The id allows for any
>required disambiguation.  (Usually, there is none.)

Questions:
1. caller is "a reference to the cached calling form" - meaning the token 
used to recover the cached info, to use your previous terminology?
2. What happens to the "name" attribute of app:lookupResult? It doesn't 
seem to make it into the  >> When the user clicks the "..." search, the entire calling state,
> >> including the ActionForm bean, is copied into a cache which is
> >> stor

RE: new template tag framework

2001-01-25 Thread Deadman, Hal

I just tried out this Components extension to Struts and I like how it
allows you centralize the template component definitions in an xml file and
that it allows you to extend a template component and just override the
parts that are different. Are there any plans for adopting this as part of
Struts? It appears the authors would like it to be part of struts. Has it
been voted down or is it being put off until after the 1.0 release?

Hal

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Nathan Eric Probst
Sent: Thursday, January 25, 2001 2:13 AM
To: [EMAIL PROTECTED]
Subject: Re: new template tag framework


Check out the Components extention to Struts:
http://gauss.ficsgrp.com/cdm

nathan

Quoc Le wrote:

> The struts-template example implements a "C-Frame"  using
> the new template tag framework.  I was a little disappointed
> to find, though, that each new page inserted inside the
> C-Frame requires 2 jsp/html files.  (One jsp to use the template
> jsp and another html/jsp file to hold the content - options.jsp
> and options.html for example).
>
> It would be nice if there were a way to have variable content
> inside the C-Frame without having to create 2 new pages
> for each new page.
>
> Does anyone know of an easy way to do this?
>
> Thanks,
> Quoc Le



Re: why struts-config.xml AND action.xml

2001-01-25 Thread Craig R. McClanahan



[EMAIL PROTECTED] wrote:

> Hello,
>
> going through the struts example I wonder why there is an action.xml and a
> struts-config.xml
> because there are many equal entries (action-mappings).
>

As others have indicated, "action.xml" is there as a compatibility aid for
people migrating from Struts 0.5.  New development should be based on
"struts-config.xml".

I've just added a deprecation warning at the top of "action.xml" to reduce the
confustion of having both files present.

>
> Thank you for the explanation in advance.
>
> Regards
>
> Michael

Craig McClanahan





Re: AW: JDBC Connection Pooling

2001-01-25 Thread Craig R. McClanahan

Lind Jürgen wrote:

> > -Ursprüngliche Nachricht-
> > Von: Ted Husted [mailto:[EMAIL PROTECTED]]
> > Gesendet am: Dienstag, 23. Januar 2001 12:17
> > An: Struts List
> > Betreff: Re: JDBC Connection Pooling
> >
> > You can access the pool this way:
> >
> >  GenericDataSource ds = (GenericDataSource)
> > servlet.findDataSource(null);
> >
> > which I clipped from a working Action.perform method.
> >
> > -Ted.
>
> The problem I'm facing is a bit diffrent as I want to access the
> Connection Pool from a servlet that is started upon startup
> of the servlet engine (similar to the struts example application).
> In order to be able to access the DataSource, I tried to subclass
> the ActionServlet class and to access the data source that way.
> However, my servlet engine (Tomcat 3.2.1) complains that it is unable
> to start this new Action servlet...
>
> Any ideas how to solve this problem?
>

There are three things you will need to do:

* Make sure that both the Struts controller servlet and your own
  servlet are marked .

* Use values for the  attribute that cause the
  Struts controller servlet to be initialized first (for example, use a
  "1" as the value for the controller servlet, and "2" for yours).
  I'm not positive that Tomcat 3.2 respects this, but it is supposed to.

* The Struts controller servlet makes the data source it initializes
  available as a servlet context attribute, as well as available via a
  method call.  You can therefore grab it by calling:

DataSource ds = (javax.sql.DataSource)
  getServletContext().getAttribute(Action.DATA_SOURCE_KEY);

  in any other servlet (or JSP page) that is part of the same web app.

>
> Best regards
>
> Jürgen

Craig





Re: Examples in Code

2001-01-25 Thread Dzenan Ridjanovic

Look at the examples in

http://drdb.fsa.ulaval.ca:8080/dr/html/struts/membership/index.html



Ted Husted wrote:

> On 1/25/2001 at 12:48 PM [EMAIL PROTECTED] wrote:
> >An example in code would be really nice :-), although I'm happy to
> help out in that regard.
>
> Thanks for mentioning that! I've been thinking of starting an
> "examples" (plural) toolkit to demonstrate solutions to some common
> problems.
>
> Conceptually, this would be somewhere between the Struts test
> application and the current example application.
>
> I may try to merge my simple login app with the Fruit Glaze MySQL
> example to see how this might work.
>
> If anyone has similar generic, working, standalone, textbook-grade
> (note all four adjectives, please) examples of things they are doing,
> please feel free to send  them to me, and I will try and put it all
> together.
>
> In the 1.1 timeframe, we would also like to look at forming some type
> of user-contributed library of useful classes and tags. I believe it is
> important to emphasize the type of code reuse a framework like Struts
> allows.
>
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 425-0252; Fax 716 223-2506.
> -- http://www.husted.com/about/struts/

--
Dzenan Ridjanovic
http://drdb.fsa.ulaval.ca/





Re: AW: JDBC Connection Pooling

2001-01-25 Thread Dzenan Ridjanovic

Look at the following example:

http://drdb.fsa.ulaval.ca:8080/membership05/doc/membership05.html

Ted Husted wrote:

> Depending on what you are trying to do, you may want to setup a new
> servlet from scratch. The GenericDataSource is in the Utilities
> package, and may also be used outside of Struts.
>
> On the other hand, if you are using the GenericDataSource within
> Struts, it's still not clear to me why you want to subclass the
> ActionServlet for this. It should work fine out of the box.
>
> -Ted.
>
> *** REPLY SEPARATOR  ***
>
> On 1/25/2001 at 11:30 AM Lind Jürgen wrote:
>
> > -Ursprüngliche Nachricht-
> > Von: Ted Husted [mailto:[EMAIL PROTECTED]]
> > Gesendet am: Dienstag, 23. Januar 2001 12:17
> > An: Struts List
> > Betreff: Re: JDBC Connection Pooling
> >
> > You can access the pool this way:
> >
> >  GenericDataSource ds = (GenericDataSource)
> > servlet.findDataSource(null);
> >
> > which I clipped from a working Action.perform method.
> >
> > -Ted.
>
> The problem I'm facing is a bit diffrent as I want to access the
> Connection Pool from a servlet that is started upon startup
> of the servlet engine (similar to the struts example application).
> In order to be able to access the DataSource, I tried to subclass
> the ActionServlet class and to access the data source that way.
> However, my servlet engine (Tomcat 3.2.1) complains that it is unable
> to start this new Action servlet...
>
> Any ideas how to solve this problem?
>
> Best regards
>
> Jürgen
>
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 425-0252; Fax 716 223-2506.
> -- http://www.husted.com/about/struts/

--
Dzenan Ridjanovic
http://drdb.fsa.ulaval.ca/





Re: AW: HtmlTag - locale

2001-01-25 Thread Craig R. McClanahan

[EMAIL PROTECTED] wrote:

> Hi Craig,
>
> it seems to me that you've written the spec. and SUN and I didn't read it
> till the end :-) !
>

Well, I'm one of the participants in the expert group on the servlet 2.3 and JSP
1.2 specs, and my "day job" is implementing them (in Tomcat 4.0) -- I almost,
but not quite, have them memorized :-).

>
> Nevertheless STRUTS is good thing and we (insurance company) will decide to
> use it with IPLANET6.0 (thanks for creating STRUTS).
>
> But one question left:
>
> The page in the spec. you mentioned refers to the
> -defintion. Is that valid for the taglib-definitions, too
> ?
>

Yes ... that is what the errata issue #7 explicitly documents.  The same type
conversions that  does must be performed when setting
properties of a custom tag class.

I'm online while writing this response, so the link to the Errata in question
is:

http://java.sun.com/products/jsp/errata_1_1_a_042800.html

and the text of Issue 7 says:
=
Issue 7 ·

 Conversions in attributes in custom actions

 What type of conversions are applied to attribute values of a custom
action. Specifically, what is done to a request-time attribute
 value, and what is done to a literal string.

 Resolution

 A request-time attribute value is passed with no conversion.

 A literal string is converted following the rules in Table 2-4, section
2.13.2.
==

> Oliver
>

Craig





Re: Where are the *.tlds ?

2001-01-25 Thread Craig R. McClanahan

"Hines, Bill" wrote:

> > I'm always pleasantly surprised when I look, and as of a few seconds ago
> there
> > are 909 subscribers to STRUTS-USER (!!).  There are 450 on STRUTS-DEV.
>
> Yes, and the number of messages here daily often exceeds that of
> JSP_INTEREST! And more importantly, the messages and discussions here tend
> to be more focused and on-topic than other lists. Congratulations, Craig.
>

Thanks, but it's not just me ... the entire subscriber community has adopted a
style of high-bandwidth, on-topic, friendly discussions.  It's certainly
refreshing for me to participate here, compared to a bunch of other lists I
subscribe to :-).

>
> And John, don't sweat the mistake, I hope my post wasn't considered a flame.
> Most of us have made that mistake at one time or another, it's an easy one
> to make.
>

Having made my share (and that's one of the slightly embarrassing parts of open
source development you have to get used to -- everyone gets to see your goofs
:-), I wouldn't worry about mistakes.

>
> Bill

Craig





RE: Post without getting new page? -- RE: Handling refresh in a web based application

2001-01-25 Thread Abraham Kang

Hi James,

   This might sound complicated because it is.  You will again have to have
a hidden frame with a non-visual applet in it.  Everytime a page loads in
the visible page you will want to fire some JavaScript on the visible page
to notify the applet on the non-visual page of the form the user is viewing.
Each time an input field loses focus you will notify the applet so it can
communicate changes to the interface to the server.  One of the things to
note is applet security restrictions will only allow you to set up the web
server and JSP/Servlet engine on the same host.  This solution is not
trivial and I would not sugguest you pursue this option unless it was
absolutely required and you had the time to figure out Javascript to Java
interaction.

Good Luck,
Abraham

> -Original Message-
> From: GU,JAMES (HP-Corvallis,ex1) [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 25, 2001 8:53 AM
> To: '[EMAIL PROTECTED]'
> Subject: Post without getting new page? -- RE: Handling refresh in a web
> based application
>
>
> By saying "the request is ignored", what do you expect to be
> displayed in the
> browser? I assume you just wnat what page is displayed before the
> refresh.
>
> I have a related question that has been puzzling me for a while:
> can you just do
> a simple data post to the server from a web browser (form, link,
> or any DOM
> event etc) without causing the browser to expect/display new
> pages from the
> server? For instance, when the state at the client side has
> changed (e.g., the
> user changed the content in a form, notice that no submit button
> is clicked
> yet), I'd like to notify the server the user state has been
> changed but I don't
> need and don't want to get/display any new page from the server.
>
> -james
>
> > -Original Message-
> > From: ron talk [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 25, 2001 8:04 AM
> > To: [EMAIL PROTECTED]
> > Subject: Handling refresh in a web based application
> >
> >
> > Hi all,
> >
> > is there anyway to determine whether a repeated http request has been
> > generated through a
> >   - click on the refresh button on a browser
> >   - through clicking the back button a the browser and
> > re-clicking the
> > link/button generating the initial request
> >
> > I am working on a struts based application in which I must
> > allow the request
> > to be completed if it is though going back and re clicking
> > the link, but if
> > its a simple refresh, the request is ignored.
> >
> >
> >
> > __
> > ___
> > Get Your Private, Free E-mail from MSN Hotmail at
> http://www.hotmail.com.
>




"Invalid Path" plague

2001-01-25 Thread Peter Doyle

Hi,
 Part of my application involves the user filling in multiple forms as part
of a wizard.
I'm having trouble with paths. My forms are not in my web app root they are
in a sub directory.
I've followed the struts example as a basis for this application but I
cannot satisfy the action mappings for the form action.

What I want is for the user to go from one form to the next after they have
entered the correct details.
I've tried including  but this doesn't seem to help.

Any help before I go postal?

Cheers,
Peter


>From my account.jsp



>From my struts-config.xml

  



  




RE: Post without getting new page? -- RE: Handling refresh in a web based application

2001-01-25 Thread Andrew Boyko

> can you just do
> a simple data post to the server from a web browser (form, link, 
> or any DOM
> event etc) without causing the browser to expect/display new 
> pages from the
> server? For instance, when the state at the client side has 
> changed (e.g., the
> user changed the content in a form, notice that no submit button 
> is clicked
> yet), I'd like to notify the server the user state has been 
> changed but I don't
> need and don't want to get/display any new page from the server.

Just setStatus(HttpServletResponse.SC_NO_CONTENT) in your response; 
the browser will cheerfully do nothing.

Andy Boyko   [EMAIL PROTECTED]



RE: Post without getting new page? -- RE: Handling refresh in a web b ased application

2001-01-25 Thread Howard Moore

There is a HttpServletResponse code 204 (SC_NO_CONTENT) that stipulates that
the browser should continue to display the previous document because no new
document is available. This might do what you want.

> -Original Message-
> From: GU,JAMES (HP-Corvallis,ex1) [mailto:[EMAIL PROTECTED]]
> Sent: 25 January 2001 16:53
> To: '[EMAIL PROTECTED]'
> Subject: Post without getting new page? -- RE: Handling 
> refresh in a web
> b ased application
> 
> 
> By saying "the request is ignored", what do you expect to be 
> displayed in the
> browser? I assume you just wnat what page is displayed before 
> the refresh. 
> 
> I have a related question that has been puzzling me for a 
> while: can you just do
> a simple data post to the server from a web browser (form, 
> link, or any DOM
> event etc) without causing the browser to expect/display new 
> pages from the
> server? For instance, when the state at the client side has 
> changed (e.g., the
> user changed the content in a form, notice that no submit 
> button is clicked
> yet), I'd like to notify the server the user state has been 
> changed but I don't
> need and don't want to get/display any new page from the server.
> 
> -james
> 
<-- snip --> 



RE: FormTag problem

2001-01-25 Thread Howard Moore

If I understand it correctly, I don't think your modified tag works in all
cases. If, for example, you have a web-application called testApp and a
logon form at;

http:///testApp/admin/logon.do 

the ActionMapping defined in struts-config.xml must have a path attribute of
"/admin/logon" (I think) for the ActionServlet to find it (assuming you are
using extension mapping). To also find this mapping from your modified
FormTag you would need something like;



so in the output html it would write



This is ok if your JSP page that contains this form is under the same branch
as the logon page e.g.

http:///testApp/admin/changePassword.jsp

but fails if you are under a different branch such as;

http:///testApp/cart/checkout.jsp

because it will produce the URL;

http:///testApp/cart/logon.do

and not the one you want. 

Note: I've not tested this so I may have got it completely wrong :-)


The approach I've taken is slightly different (and may also not work
properly). I do the same thing as you to look up the ActionMapping except I
only add the leading forward-slash if there isn't already one. To build html
form element, however, rather than stripping the path and making the URL
relative I prepend the context path (the name of the web-application) and
make it an absolute URL. In the above example the output html this method
produces would be;



Which always works, I think. This basically copies the way redirecting
ActionForwards are handled in ActionServlet.
  

> -Original Message-
> From: Chris Smith [mailto:[EMAIL PROTECTED]]
> Sent: 25 January 2001 15:53
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: re: FormTag problem
> 
> 
> The problem is because the action in the jsp form tag is 
> being used for 
> two purposes - for the generated HTML and for looking up the 
> ActionMapping.
> 
> If you have the directory path in the form tag and modify 
> FormTag.java so 
> it doesn't strip it out, struts will generate the HTML page 
> for you.  But 
> when you come to submit the form, it fails because the 
> browser submits 
> relative to the directory in the URL, i.e. the browser submits to 
> /execute/action/execute/action/logon (I think, I'm using *.do).
> 
> If you go the other way, without the directory in the form 
> tag, you have 
> to remove the directory from struts-config.xml.  Again, the HTML is 
> generated ok, but when you try submitting the form, the 
> browser submits 
> it relative to the directory in the url, i.e. 
> execute/action/logon, which 
> isn't found in struts-config.xml.
> 
> My fix is to modify FormTag.java so it uses the action with a leading 
> "/", all directories, but without ".do" to look up the action 
> mapping, 
> and uses a different version - one without the leading 
> directories in the 
> generated HTML.
> 
> I'm using *.do mapping, but I think this should work for the /execute 
> type mapping too.
> 
> I've attached my modified FormTag.java and posted to struts-dev too.
> 
> Chris Smith
> 



Nested and indexed attributes with the latest builds?

2001-01-25 Thread Kevin Wang

Just wondering whether anyone has successfully used nested/indexed
attributes in Struts. Sample codes?

Thanks.



Post without getting new page? -- RE: Handling refresh in a web based application

2001-01-25 Thread GU,JAMES (HP-Corvallis,ex1)

By saying "the request is ignored", what do you expect to be displayed in the
browser? I assume you just wnat what page is displayed before the refresh. 

I have a related question that has been puzzling me for a while: can you just do
a simple data post to the server from a web browser (form, link, or any DOM
event etc) without causing the browser to expect/display new pages from the
server? For instance, when the state at the client side has changed (e.g., the
user changed the content in a form, notice that no submit button is clicked
yet), I'd like to notify the server the user state has been changed but I don't
need and don't want to get/display any new page from the server.

-james

> -Original Message-
> From: ron talk [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 25, 2001 8:04 AM
> To: [EMAIL PROTECTED]
> Subject: Handling refresh in a web based application
> 
> 
> Hi all,
> 
> is there anyway to determine whether a repeated http request has been 
> generated through a
>   - click on the refresh button on a browser
>   - through clicking the back button a the browser and 
> re-clicking the 
> link/button generating the initial request
> 
> I am working on a struts based application in which I must 
> allow the request 
> to be completed if it is though going back and re clicking 
> the link, but if 
> its a simple refresh, the request is ignored.
> 
> 
> 
> __
> ___
> Get Your Private, Free E-mail from MSN Hotmail at 
http://www.hotmail.com.



Can't get struts-example to run

2001-01-25 Thread Gael Stehagen

Hi, 
I'm having trouble to get the test-application to run on Solaris. I've
tried Solaris 2.6 and 2.8, without success. JDK1.2.2_05a was used in
both cases. I tried Solaris 8 because I noticed that I was supposed to
patch 6, to correct some troubles with Locales, but since I didn't got
lucky with Solaris 8 either, I really can use som help.

(With Linux/Intel I have no trouble...)

The trouble is that when I start up Tomcat (3.2.1) I get the message
 > cannot load servlet name: action

looking in servlet.log I can read this message:

2001-01-25 05:34:07 - path="/struts-example" :action: Loading
application resources from resource
org.apache.struts.example.ApplicationResources
2001-01-25 05:34:07 - path="/struts-example" :action: Cannot load
application resources bundle
org.apache.struts.example.ApplicationResources
 - java.util.MissingResourceException: Can't find resource for base name
org.apache.struts.example.ApplicationResources, locale en_US
at java.util.ResourceBundle.getBundle(ResourceBundle.java,
Compiled Code)
at java.util.ResourceBundle.getBundle(ResourceBundle.java,
Compiled Code)
at
org.apache.struts.util.MessageResources.(MessageResources.java,
Compiled Code)
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java,
Compiled Code)
at
org.apache.struts.action.ActionServlet.initApplication(ActionServlet.java,
Compiled Code)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java, Compiled
Code)
at javax.servlet.GenericServlet.init(GenericServlet.java,
Compiled Code)
at
org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java,
Compiled Code)
at org.apache.tomcat.core.Handler.init(Handler.java, Compiled
Code)
at
org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java, Compiled
Code)
at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java,
Compiled Code)
at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java,
Compiled Code)
at
org.apache.tomcat.core.ContextManager.init(ContextManager.java, Compiled
Code)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java,
Compiled Code)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java, Compiled
Code)

Any help appreciated!
Sincerely
Gael



Re: AW: JDBC Connection Pooling

2001-01-25 Thread Ted Husted

Depending on what you are trying to do, you may want to setup a new
servlet from scratch. The GenericDataSource is in the Utilities
package, and may also be used outside of Struts.

On the other hand, if you are using the GenericDataSource within
Struts, it's still not clear to me why you want to subclass the
ActionServlet for this. It should work fine out of the box.

-Ted.

*** REPLY SEPARATOR  ***

On 1/25/2001 at 11:30 AM Lind Jürgen wrote:

> -Ursprüngliche Nachricht-
> Von: Ted Husted [mailto:[EMAIL PROTECTED]]
> Gesendet am: Dienstag, 23. Januar 2001 12:17
> An: Struts List
> Betreff: Re: JDBC Connection Pooling
>
> You can access the pool this way:
>
>  GenericDataSource ds = (GenericDataSource)
> servlet.findDataSource(null);
>
> which I clipped from a working Action.perform method.
>
> -Ted.

The problem I'm facing is a bit diffrent as I want to access the
Connection Pool from a servlet that is started upon startup
of the servlet engine (similar to the struts example application).
In order to be able to access the DataSource, I tried to subclass
the ActionServlet class and to access the data source that way.
However, my servlet engine (Tomcat 3.2.1) complains that it is unable
to start this new Action servlet...

Any ideas how to solve this problem?

Best regards

Jürgen



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/





Examples in Code

2001-01-25 Thread Ted Husted

On 1/25/2001 at 12:48 PM [EMAIL PROTECTED] wrote:
>An example in code would be really nice :-), although I'm happy to
help out in that regard.

Thanks for mentioning that! I've been thinking of starting an
"examples" (plural) toolkit to demonstrate solutions to some common
problems. 

Conceptually, this would be somewhere between the Struts test
application and the current example application.

I may try to merge my simple login app with the Fruit Glaze MySQL
example to see how this might work.

If anyone has similar generic, working, standalone, textbook-grade
(note all four adjectives, please) examples of things they are doing,
please feel free to send  them to me, and I will try and put it all
together.

In the 1.1 timeframe, we would also like to look at forming some type
of user-contributed library of useful classes and tags. I believe it is
important to emphasize the type of code reuse a framework like Struts
allows.


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/





Re: AW: Antwort: AW: why struts-config.xml AND action.xml

2001-01-25 Thread Ted Husted

If you are spending any time in the documentation application, get the
latest version, since it the formatting is much bettter now.

*** REPLY SEPARATOR  ***

On 1/25/2001 at 11:51 AM [EMAIL PROTECTED] wrote:

See
http://jakarta.apache.org/struts/userGuide/building_controller.html#conf
ig

Oliver

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Gesendet am: Donnerstag, 25. Januar 2001 11:26
An: [EMAIL PROTECTED]
Betreff: Antwort: AW: why struts-config.xml AND action.xml





Hi,

so in fact I only  have to concentrate on on of these configuration
files?
Would be nice to read that in the documentation or have I missed
something?

Regards

Michael






[EMAIL PROTECTED] am 25.01.2001 11:30:41

Bitte antworten an [EMAIL PROTECTED]



 An:[EMAIL PROTECTED]

 Kopie: (Blindkopie: Michael Brohl/Lynx/DE)



 Thema: AW: why struts-config.xml AND action.xml








Hi,

those two, I guess, are more or less redundant while action.xml is
depreciated and has a different syntax and dtd.
I used struts-config.xml within the example and this one worked.

Oliver



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/





Re: why struts-config.xml AND action.xml

2001-01-25 Thread Matthias Bauer

Hi there,

I would say that in the example application the action.xml file is not used.
Just have a look at the web.xml file. There struts-config.xml is provided as the
config parameter to the ActionServlet:

>  
>   
> action
> org.apache.struts.action.ActionServlet
> 
>   application
>   org.apache.struts.example.ApplicationResources
> 
> 
>   config
>   /WEB-INF/struts-config.xml
> 
> ...

You can savely remove action.xml and the example application should still be
running ok. Maybe it is a good idea to delete it from the example application,
because it obviously leads to quite some confusion. I don't know who would take
care of removing it from the repository.

Have a nice day,

--- Matthias


Matthias Bauer +++ [EMAIL PROTECTED] +++ LivingLogic AG +++ www.livinglogic.de


Rob Leland wrote:
> 
> It is confusing. If you are starting a new application then use
> struts-config.xml and
> delete action.xml. The action.xml was originally used with struts 0.5, after
> that
> struts-config.xml was created which replaces action.xml.
> 
> It is only left in the example application since struts 1.0
> will still read from action.xml if it exists. Though I am not
> sure if the example application actually uses action.xml
> or not.
> 
> [EMAIL PROTECTED] wrote:
> 
> > Hello,
> >
> > going through the struts example I wonder why there is an action.xml and a
> > struts-config.xml
> > because there are many equal entries (action-mappings).
> >
> > Thank you for the explanation in advance.
> >
> > Regards
> >
> > Michael



Handling refresh in a web based application

2001-01-25 Thread ron talk

Hi all,

is there anyway to determine whether a repeated http request has been 
generated through a
  - click on the refresh button on a browser
  - through clicking the back button a the browser and re-clicking the 
link/button generating the initial request

I am working on a struts based application in which I must allow the request 
to be completed if it is though going back and re clicking the link, but if 
its a simple refresh, the request is ignored.



_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




re: FormTag problem

2001-01-25 Thread Chris Smith

The problem is because the action in the jsp form tag is being used for 
two purposes - for the generated HTML and for looking up the 
ActionMapping.

If you have the directory path in the form tag and modify FormTag.java so 
it doesn't strip it out, struts will generate the HTML page for you.  But 
when you come to submit the form, it fails because the browser submits 
relative to the directory in the URL, i.e. the browser submits to 
/execute/action/execute/action/logon (I think, I'm using *.do).

If you go the other way, without the directory in the form tag, you have 
to remove the directory from struts-config.xml.  Again, the HTML is 
generated ok, but when you try submitting the form, the browser submits 
it relative to the directory in the url, i.e. execute/action/logon, which 
isn't found in struts-config.xml.

My fix is to modify FormTag.java so it uses the action with a leading 
"/", all directories, but without ".do" to look up the action mapping, 
and uses a different version - one without the leading directories in the 
generated HTML.

I'm using *.do mapping, but I think this should work for the /execute 
type mapping too.

I've attached my modified FormTag.java and posted to struts-dev too.

Chris Smith


/*
 * $Header: 
/home/cvspublic/jakarta-struts/src/share/org/apache/struts/taglib/html/FormTag.java,v 
1.2 2001/01/07 04:37:06 craigmcc Exp $
 * $Revision: 1.2 $
 * $Date: 2001/01/07 04:37:06 $
 *
 * 
 *
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 1999 The Apache Software Foundation.  All rights
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *notice, this list of conditions and the following disclaimer in
 *the documentation and/or other materials provided with the
 *distribution.
 *
 * 3. The end-user documentation included with the redistribution, if
 *any, must include the following acknowlegement:
 *   "This product includes software developed by the
 *Apache Software Foundation (http://www.apache.org/)."
 *Alternately, this acknowlegement may appear in the software itself,
 *if and wherever such third-party acknowlegements normally appear.
 *
 * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
 *Foundation" must not be used to endorse or promote products derived
 *from this software without prior written permission. For written
 *permission, please contact [EMAIL PROTECTED]
 *
 * 5. Products derived from this software may not be called "Apache"
 *nor may "Apache" appear in their names without prior written
 *permission of the Apache Group.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * 
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * .
 *
 */


package org.apache.struts.taglib.html;


import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.tagext.TagSupport;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionFormBean;
import org.apache.struts.action.ActionFormBeans;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMappings;
import org.apache.struts.util.BeanUtils;
import org.apache.struts.util.MessageResources;


/**
 * Custom tag that represents an input form, associated with a bean whose
 * properties correspond to the various fields of the form.
 *
 * @author Craig R. McClanahan
 * @version $Revision: 1.2 $ $Date: 2001/01/07 04:37:06 $
 */


RE: unable to get validation on jsp

2001-01-25 Thread Byomakesh Parida

hi
 i am unable to rectify these error if it's known to u please let me know.
the error is
by which i am unable to get the validation part.

500 Internal Server Error
/mm/BoxAction.do:

javax.servlet.ServletException: Exception thrown processing JSP page.
java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.lang.ClassLoader.defineClass(ClassLoader.java:426)
at
allaire.jrun.servlet.JRunServletLoader.loadClass(JRunServletLoader.java:525)
at
allaire.jrun.servlet.JRunServletLoader.loadClass(JRunServletLoader.java:444)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at org.apache.struts.taglib.FormTag.doStartTag(FormTag.java:503)
at
jrun__advertiser__ClickMeManagement2ejsp21._jspService(jrun__advertiser__Cli
ckMeManagement2ejsp21.java:67)
at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java:40)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
at
allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:34
)
at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:174)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
va:1589)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1432)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:481)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
at allaire.jrun.WorkerThread.run(WorkerThread.java:74)



-Original Message-
From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
Sent: 25 January 2001 05:26
To: [EMAIL PROTECTED]
Subject: Re: unable to view jsp


I setup your web page in a web app and had the same
problem.  I finally noticed that your title tag isn't
closed off.  That was the problem.

Also, you only need to have the action specified for
the form () if you have
it defined under the struts-config.xml.  It will look
up the corresponding name and bean/form object that
goes with the form







David

--- Anand Raman <[EMAIL PROTECTED]> wrote:
> yes david
> I have all the tag libs properly intialized.. I am
> attaching thejsp file
> also with this mail..
> I am using Tomcat standalone mode on a linux
> machine.. Tomcat 3.2
> Anand
> On Wed, Jan 24, 2001 at 02:44:53PM -0800, David
> Winterfeldt wrote:
> >Are you are saying other JSPs compile and work
> fine?
> >When you look at the source, what do you see?
> Also,
> >what server are you running under?
> >
> >Do you have your tags defined at the top of the
> page?
> >
> ><%@ taglib uri="/WEB-INF/struts-bean.tld"
> >prefix="bean" %>
> >
> >
> >David
> >
> >--- Anand Raman <[EMAIL PROTECTED]> wrote:
> >> hi guys
> >> I am on my way to make my first struts
> application..
> >>
> >> The ActionForm, Action , ActionServlet and my jsp
> >> are all in proper
> >> places.
> >>
> >> However when i send a request for a jsp page i
> dont
> >> get to see any
> >> content on my browser. The server has serviced
> these
> >> requests and it is
> >> evident as i can see the html code in the view
> >> source menu of the
> >> browser.. Also no errors are thrown.. All other
> jsps
> >> are working just
> >> fine..
> >>
> >> Any idea how to solve this problem..
> >>
> >> Thanx
> >> Anand
> >
> >
> >__
> >Do You Yahoo!?
> >Yahoo! Auctions - Buy the things you want at great
> prices.
> >http://auctions.yahoo.com/
> > <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/struts.tld" prefix="struts"
> %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld"
> prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld"
> prefix="html" %>
> 
> 
>  
> 
> 
> 
>  method="post">
>   
>   
>   
>   
>   
>   
>   
>   
>   
>  

Re: why struts-config.xml AND action.xml

2001-01-25 Thread Rob Leland

It is confusing. If you are starting a new application then use
struts-config.xml and
delete action.xml. The action.xml was originally used with struts 0.5, after
that
struts-config.xml was created which replaces action.xml.

It is only left in the example application since struts 1.0
will still read from action.xml if it exists. Though I am not
sure if the example application actually uses action.xml
or not.

[EMAIL PROTECTED] wrote:

> Hello,
>
> going through the struts example I wonder why there is an action.xml and a
> struts-config.xml
> because there are many equal entries (action-mappings).
>
> Thank you for the explanation in advance.
>
> Regards
>
> Michael




Re: struts example Exception

2001-01-25 Thread Rob Leland



>
>
> java.lang.NoClassDefFoundError

My guess is that is unable to find one of your class referenced in
your jsp file. This could be a custom tag or a java class.
Double check your class paths.

-Rob





RE: RE: no 'application' init parameter for ActionServlet causes NullPoin terException in ??

2001-01-25 Thread perry . tew

Martin,
Thanks for the response.  That's sort of the same conclusion I came to.
If that's the way it needs to be, that's fine.  I like the design of the
resource file.   I just skipped it in the interest of getting my first
example working with as little as possible.

Craig & Company:  Prehaps it would be possible to modify the documentation
in such a way as to better explain this requirement?  I was thrown off by
the description in the javadoc.  It would also be cool if the ErrorsTag.java
source checked for a null messages object and threw a more descriptive error
message stating that an application parameter is required, or something.
Just a thought.

Again, thanks for the excellent tool.  I'm really excited about using it.

Perry Tew

> -Original Message-
> From: Martin Cooper [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, January 24, 2001 6:54 PM
> To:   [EMAIL PROTECTED]
> Subject:  Re: no 'application' init parameter for ActionServlet causes
> NullPoin terException in  ??
> 
> I think the default being specified as [NONE] means:
> 
> - If you *do not* use application messages in your code, and do not use
> any
> Struts tags which use them, then you do not need to specify a value for
> 'application' in your configuration.
> 
> - If you *do* use application messages directly, or use tags which use
> them,
> then there is no default value and you must specify a valid value.
> 
> The  tag needs to look up messages in the properties file,
> so you will need to specify a value for 'application' in your
> configuration
> if you want to use that tag.
> 
> Hope this helps.
> 
> --
> Martin Cooper
> Tumbleweed Communications
> 
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, January 24, 2001 1:10 PM
> Subject: no 'application' init parameter for ActionServlet causes NullPoin
> terException in  ??
> 
> 
> > Hello!  I'm just beginning to use struts, and I enjoy it very much.
> Thank
> > you to all who have contributed to it.  I have encountered a problem and
> > would like to ask about it.  I've searched the archives and couldn't
> find
> > anything on this.
> >
> > My problem:  When I configure my ActionServlet without specifiying an
> > 'application' init parameter, I receive a NullPointerException when I
> use
> > the  tag in my  jsp page.  Has anyone else seen this?
> >
> > The javadoc states the following:
> > The initialization parameters supported by the controller servlet are
> > described below, which is copied from the Javadocs for the ActionServlet
> > class. Square brackets describe the default values that are assumed if
> you
> > do not provide a value for that initialization parameter.
> >
> > application - Java class name of the application resources bundle base
> > class. [NONE]
> > bufferSize - The size of the input buffer used when processing file
> uploads.
> > [4096]
> > config - Context-relative path to the XML resource containing our
> > configuration information. [/WEB-INF/struts-config.xml]
> > ...
> >
> > so, it appears to me that if I don't specify an application parameter, I
> > should be okay.  However, I receive the following error:
> >
> > java.lang.NullPointerException at
> > org.apache.struts.taglib.ErrorsTag.doStartTag(ErrorsTag.java:201)
> > at
> >
> _0002flogon_0002ejsplogon_jsp_5._jspService(_0002flogon_0002ejsplogon_jsp_
> 5.
> > java:89)
> > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> >
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.
> ja
> > va:177)
> > at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:309)
> > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:382)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:387)
> > at org.apache.tomcat.core.Handler.service(Handler.java:263)
> > at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371)
> > at
> >
> org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherIm
> pl
> > .java:191)
> > at
> >
> org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.
> ja
> > va:1589)
> > at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1432)
> > at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:481)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:387)
> > at org.apache.tomcat.core.Handler.service(Handler.java:263)
> > at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371)
> > at
> >
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:
> 74
> > 9)
> > at
> org.apache.tomcat.core.ContextManager.service(ContextManage

RE: Where are the *.tlds ?

2001-01-25 Thread Hines, Bill

> I'm always pleasantly surprised when I look, and as of a few seconds ago
there
> are 909 subscribers to STRUTS-USER (!!).  There are 450 on STRUTS-DEV.

Yes, and the number of messages here daily often exceeds that of
JSP_INTEREST! And more importantly, the messages and discussions here tend
to be more focused and on-topic than other lists. Congratulations, Craig. 

And John, don't sweat the mistake, I hope my post wasn't considered a flame.
Most of us have made that mistake at one time or another, it's an easy one
to make.

Bill



type attribute in struts-config.xml

2001-01-25 Thread Howard Moore

I've noticed that the 'type' attribute of 'action-mappings', 'form-beans'
and 'global-forwards' elements in struts-config.xml is ignored (in the
2122 build).

Is this likely to be fixed for version 1.0? 

---
Howard Moore
Senior Software Engineer
Datapulse CTI
Tel : +44 (0)1491 418000
Fax : +44 (0)1491 411459
E-mail: [EMAIL PROTECTED]



Re: Tomcat reloading Struts app

2001-01-25 Thread William Jaynes


- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 24, 2001 1:20 PM
Subject: Re: Tomcat reloading Struts app


> Andreas Joseph Krogh wrote:
>
> > On Wednesday 24 January 2001 13:59, you wrote:
> > > The scenario is... while running a Struts app on Tomcat 3.2 with the
> > > nightly build from last night (20010123), recompile one of the classes in
> > > the WEB-INF/classes directory, try to continue running the app (that is,
> > > hit a button or link in the app)  The result, for me, is always a thrown
> > > exception of some kind. This happens regardless of whether there was any
> > > significant change to the recompiled class or not.
> > >
> > > Clearly Tomcat is detecting the changed class and is doing something,
> > > presumably reloading the app. I would expect that one would be able to
> > > continue with the app (presuming that the changes to the class were not
> > > drastic) But, instead, I must always stop and start Tomcat and reenter the
> > > app from the beginning.
> > >
> > > Craig has made it clear that Tomcat will reload the app if it detects
> > > changes, and that seems to be happening. I expected that this capability
> > > meant I could do hot reloads of the app, but this isn't the case. I could
> > > use some clarification of what might be going on here. Thanks.
> > >
> > > Will
> >
> > I have the same problem, it throws
> > javax.servlet.ServletException:
> > org.apache.struts.util.PropertyMessageResources
> >
> > It seems the classloader has problems reloading the struts.jar for some
> > reason. I would really appreciate an answer to this so I can go on being
> > productive again:-)
> >
>
> This morning I applied a patch that may help ... the PropertyMessageResources
> object was not completely serializable.  Please try it again with tonight's
> nightly build.
>
> There may well be other issues with Tomcat 3.2 not always detecting changes in
> non-servlet classes, and possibly not cleanly restarting the app.  These are
> among the reasons that the internal approach to reloading used in Tomcat 4.0 is
> totally different.

I just tried this whole reloading an app thing with the 20010124 build. I still get an 
exception
thrown. Tomcat3.2 detects the change to my non-servlet class, but something goes wrong 
with the
reloading. I get various exceptions depending on where I am in the app. Some of the 
ones I've seen
are

- javax.servlet.jsp.JspException: object is not an instance of declaring class
- javax.servlet.ServletException: org.apache.struts.action.ActionMappings
- javax.servlet.ServletException: org.apache.struts.util.PropertyMessageResources

I haven't moved to Tomcat4 yet. If anyone else is using it I'd like to know if the 
reloading of a
Struts app works. If Tomcat4 is stable enough to develop with Struts, the reloading 
feature would be
a big incentive to move to it.

Will




AW: Antwort: AW: why struts-config.xml AND action.xml

2001-01-25 Thread Oliver . Lauer

See
http://jakarta.apache.org/struts/userGuide/building_controller.html#config

Oliver

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Gesendet am: Donnerstag, 25. Januar 2001 11:26
An: [EMAIL PROTECTED]
Betreff: Antwort: AW: why struts-config.xml AND action.xml





Hi,

so in fact I only  have to concentrate on on of these configuration files?
Would be nice to read that in the documentation or have I missed something?

Regards

Michael






[EMAIL PROTECTED] am 25.01.2001 11:30:41

Bitte antworten an [EMAIL PROTECTED]



 An:[EMAIL PROTECTED]  

 Kopie: (Blindkopie: Michael Brohl/Lynx/DE) 



 Thema: AW: why struts-config.xml AND action.xml








Hi,

those two, I guess, are more or less redundant while action.xml is
depreciated and has a different syntax and dtd.
I used struts-config.xml within the example and this one worked.

Oliver








Antwort: AW: why struts-config.xml AND action.xml

2001-01-25 Thread michael . brohl





Hi,

so in fact I only  have to concentrate on on of these configuration files?
Would be nice to read that in the documentation or have I missed something?

Regards

Michael






[EMAIL PROTECTED] am 25.01.2001 11:30:41

Bitte antworten an [EMAIL PROTECTED]



 An:[EMAIL PROTECTED]  

 Kopie: (Blindkopie: Michael Brohl/Lynx/DE) 



 Thema: AW: why struts-config.xml AND action.xml








Hi,

those two, I guess, are more or less redundant while action.xml is
depreciated and has a different syntax and dtd.
I used struts-config.xml within the example and this one worked.

Oliver









i18n and weblogic 6.0

2001-01-25 Thread Van der Auwera Koen


hello

I developped a struts-application (using i18n) on tomcat 3.2 and it works
fine.

Now I got it running on Weblogic 6.0 but I got a problem though:
In the jsp's I use the struts-tag   
So I should get on my screen "Search" but instead I get "\nSearch".

Any ideas, I really don't know where the "\n" comes from. I don't have
that problem on tomcat.

thanks

Koen Van der Auwera




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
The Capital Markets Company.

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




AW: why struts-config.xml AND action.xml

2001-01-25 Thread Oliver . Lauer

Hi, 

those two, I guess, are more or less redundant while action.xml is
depreciated and has a different syntax and dtd. 
I used struts-config.xml within the example and this one worked. 

Oliver 

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Gesendet am: Donnerstag, 25. Januar 2001 11:11
An: [EMAIL PROTECTED]
Betreff: why struts-config.xml AND action.xml




Hello,

going through the struts example I wonder why there is an action.xml and a
struts-config.xml
because there are many equal entries (action-mappings).

Thank you for the explanation in advance.

Regards

Michael




why struts-config.xml AND action.xml

2001-01-25 Thread michael . brohl




Hello,

going through the struts example I wonder why there is an action.xml and a
struts-config.xml
because there are many equal entries (action-mappings).

Thank you for the explanation in advance.

Regards

Michael





AW: JDBC Connection Pooling

2001-01-25 Thread Lind Jürgen


> -Ursprüngliche Nachricht-
> Von: Ted Husted [mailto:[EMAIL PROTECTED]]
> Gesendet am: Dienstag, 23. Januar 2001 12:17
> An: Struts List
> Betreff: Re: JDBC Connection Pooling
> 
> You can access the pool this way:
> 
>  GenericDataSource ds = (GenericDataSource)
> servlet.findDataSource(null);
> 
> which I clipped from a working Action.perform method.
> 
> -Ted.

The problem I'm facing is a bit diffrent as I want to access the
Connection Pool from a servlet that is started upon startup
of the servlet engine (similar to the struts example application).
In order to be able to access the DataSource, I tried to subclass
the ActionServlet class and to access the data source that way.
However, my servlet engine (Tomcat 3.2.1) complains that it is unable
to start this new Action servlet...

Any ideas how to solve this problem?

Best regards

Jürgen





AW: Struts V1.0 and JRun 3.0

2001-01-25 Thread Oliver . Lauer

Hi, 

you have to fix several changes in your sources see
http://jakarta.apache.org/struts/release.html or 
http://jakarta.apache.org/struts/userGuide/index.html concerning 1.0.

Oliver

-Ursprüngliche Nachricht-
Von: Santschi Oliver [mailto:[EMAIL PROTECTED]]
Gesendet am: Donnerstag, 25. Januar 2001 10:28
An: '[EMAIL PROTECTED]'
Betreff: Struts V1.0 and JRun 3.0

Does anybody has (bad) experience with JRun 3.0. The struts example 0.5
worked properly. And now, the example 1.0 is not working anymore...

Regards

Oliver



Struts V1.0 and JRun 3.0

2001-01-25 Thread Santschi Oliver

Does anybody has (bad) experience with JRun 3.0. The struts example 0.5
worked properly. And now, the example 1.0 is not working anymore...

Regards

Oliver




Antwort: Re: unsafe path error

2001-01-25 Thread michael . brohl




Hello Joshua,

the path shown in the error message must be constructed by Tomcat/Struts itself.
There isn't any explicit drive in any of the configuration files.

I got a hint from Daniel Bauert who tells me to check the path and folder names
bacause they are case sensitive. In fact, my WEB-INF folder was not completely
in capitals. Changing that the whole thing works fine.

Regards


Michael






Joshua Hill <[EMAIL PROTECTED]> am 24.01.2001 19:26:32

Bitte antworten an [EMAIL PROTECTED]



 An:[EMAIL PROTECTED]  

 Kopie: (Blindkopie: Michael Brohl/Lynx/DE) 



 Thema: Re: unsafe path error   








This is a security error. Using D:\ type links is considered unsafe(and
should be!) instead try using a relative link with \ being the root of your
webapp. As for a list of errors i don't know of one, but it is usually
doing a text search of the tomcat source will reveal the answer. grep -rl
on a unix system or I believe you can use the Find file command on windows.
This shows that "Unsafe path" errors only happen when getResource is called
with a "unsafe url" in Context.java.

On 2001.01.24 04:55:08 -0600 [EMAIL PROTECTED] wrote:
>
>
>
> Hello,
>
> I got the following problem when trying to get my own application
> running under Struts 1.0 and Tomcat 3.2:
>
> Starting Tomcat, the following error message appears:
>
> [...]
> Pop org.apache.struts.action.ActionMapping
> 2001-01-24 11:48:04 - Ctx( /vip-gallery ): Unsafe path
> D:\tomcat\webapps\vip-gallery /WEB-INF/struts-config.xml
> cannot load servlet name: action
> 2001-01-24 11:48:04 - PoolTcpConnector: Starting HttpConnectionHandler on
> 80
> 2001-01-24 11:48:04 - PoolTcpConnector: Starting Ajp12ConnectionHandler
> on 8007
>
>
> Any suggestions, what the unsafe path... statement means?
> I think the cannotload servlet name... error is a follow-up to that
> error.
>
> Is there something like a FAQ  or an error message list available?
>
> Regards
>
> Michael
>
>


abcdef