Please unsubscribe me... ARGH!

2001-06-22 Thread Aaron Tavistock

unsubscribe me please!

FYI - the apache.org maillist manager is not very cooperative for doing 
unsubscribes -- from two attempts to unsubscribe via bot, i got one 
response saying it didn't support commands in the subject line (*isn't 
that the standard way of sending commands?*), and the other rejecting my 
message because it had an empty subject line.




Image as a cancel button?

2001-06-22 Thread Ryan Cornia

Is there any way to use the html:image tag in place of form:cancel? I'd like all my 
buttons to be images, but have not found a way to make the cancel button an image 
without causing struts to validate the form even on a cancel. 

Thanks,
Ryan





Re: single quote in the application properties file don't works onStruts like any other java app?

2001-06-22 Thread Craig R. McClanahan



On Sat, 23 Jun 2001, Matteo Di Giovinazzo wrote:

> 
> When I want to insert a single quote, I write in the properties file's
> key " \' " (traditional escaping) to obtain a single quote as output. Indeed
> I obtain that the single quote disappear. Using the '' (double single quote
> escaping) my file don't works with any other java app (a not-Struts app,
> like swin, awt or console...)
> 
> My main question is: this works fine on all other java application, why not
> with Struts? Where is the problem?
> 
> Matteo Di Giovinazzo
> 
> 
> 

Deep down inside org.apache.struts.util.PropertyMessageResources, Struts
is using the load() method from the java.util.Properties class to load the
message resources files.  Therefore, the files should correspond to the
same syntax as any other use of Properties.load() in your applications.

Note that, according to the JDK 1.3 Javadocs, a backslash is the
appropriate escape character for properties files, so a single quote would
be represented as "\'".

Craig McClanahan





RE: newbie - requesting example of working build.xml, build.properties files

2001-06-22 Thread Craig R. McClanahan



On Fri, 22 Jun 2001, Cook, Levi wrote:

> I haven't taken time to account for the variation, but walking through this
> process on a fresh RedHat 7.1 installation required an additional step.
> 
> Basically, to prevent ant from failing on some jar sealing Security
> exception that I don't remember the details of, I had to remove
> $ANT_HOME/lib/parser.jar & $ANT_HOME/lib/jaxp.jar. (I think ant 1.3 carries
> jaxp 1.0 with it, and the presence of Jaxp 1.1 caused the fit)
> 

Hmm.  You're right about Ant including JAXP 1.0.  The interesting thing is
that I've still got them in $ANT_HOME/lib, and I'm running on RedHat 7.1
(with JDK 1.3.1).  And I'm not getting sealing violations.

> -- Levi
> 

Craig




RE: initial population of html form from database --- ActionForm or A ctionClass

2001-06-22 Thread Anthony Martin

The answer: Action.perform() should invoke population the form.  That's what
I do, anyway.  Once, I even had all of the methods that performed the actual
population coded in the ActionForm and invoked by the Action.  This allowed
validate to do queries if it needed to, but it wasn't pretty.

When I want to pre-populate a form with information from the database, I
direct the browser to the action mapping URL instead of the jsp URL.  Your
message doesn't say one way or the other, so I thought I'd mention that
first.

No matter what you tell perform() to do, it won't fire if the browser goes
directly to the myPage.jsp url.  The browser needs to query myPage.do even
if no parameters are supplied.

So, I hope that's all it was.

As far as the reset method goes, my understanding is that reset is not
supposed to reset dynamic data.  It's for resetting to a blank form, pretty
much ... or ... that's what I use it for ... anyway.


Anthony

-Original Message-
From: Smith Chris [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 1:33 PM
To: '[EMAIL PROTECTED]'
Subject: initial population of html form from database --- ActionForm or
A ctionClass


I am trying to setup an html form that needs to be initially
populated from a database.  Should I do this in the perform() method
of the action class (which gets passed the actionform bean), or somewhere in
the actionform bean??  I'm assuming it should be done from the action class
since the actionform should just be a data repository by my understanding.
If so, how do I do this from the action class?  I've tried calling my setter
methods on the actionform object (after casting to my extended class) from
within the action class and the form comes up blank.

If the forms are supposed to be populated from the action classes,
why is there a reset method in the actionform (which doesn't seem to do
anything for me by the way -- it never seems to get called), and why is it
suggested to set the default values from there?

thank you for any help you can offer.



single quote in the application properties file don't works on Struts like any other java app?

2001-06-22 Thread Matteo Di Giovinazzo


When I want to insert a single quote, I write in the properties file's
key " \' " (traditional escaping) to obtain a single quote as output. Indeed
I obtain that the single quote disappear. Using the '' (double single quote
escaping) my file don't works with any other java app (a not-Struts app,
like swin, awt or console...)

My main question is: this works fine on all other java application, why not
with Struts? Where is the problem?

Matteo Di Giovinazzo





Problem solved - Re: newbie - requesting example of working build.xml, build.propertiesfiles

2001-06-22 Thread Michael McCafferty



"Craig R. McClanahan" wrote:
> 

[ snipped ]

> You should not have to modify *anything* in build.xml, build-webapp.xml,
> or build-webapps.xml in order to build Struts from source.  All of the
> necessary values are inherited from properties you set inside your
> build.properties file.
> 

Many thanks for the prompt responses from this list. I'm impressed. 

I don't know if I accidentally deleted the file yesterday (more likely,
also more embarrasing, than an unreported error while checking the files
out from CVS), but the set of files I was working with did not contain a
"build.xml" file, which was the ultimate source of my confusion and
failure.

I had checked out the files via anonymous CVS and was using the
resulting directory as a clean template. I'd copy the tamplate to a work
space, try a build, analyze the problem, blow away and recopy the
template, and repeat. But since the template did not contain a copy of
build.xml, I was under the impression that I needed to create/modify my
own, and spent a great deal of time on that. Learned a lot about "ant,"
though, so I guess it was a Learning Experience ;-)

Thanks again for the assistance,

-- 
Michael McCafferty 
Senior Server Engineer
Enterprise Applications, Organic
415-581-5785 [EMAIL PROTECTED]



Re: Struts Question

2001-06-22 Thread Rick Smith

Charles, 

I ran into the same problem trying to run struts on Tomcat 3.1. Removing
attributes isn't supported in the older jsp specification or something
like that. Try running the test page using Tomcat 3.2 if you can. 

Rick 

Charles Baker wrote:
> 
> Quick question,
> I?m using VA ?s Web Test  Env and I?m getting an error using a simple test
> page from the IBM web site. I?m still new to Struts so can someone let me
> know if this is a simple mistake that I?m making? The single page JSP and
> full error message are following.
> Message: Server caught unhandled exception from servlet [jsp]: cant remove
> Attributes from request scope
> 
> Thanks in advance for any help.
> CEB
> 
> JSP Page
> %@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%
> 
> 
> 
> *First Name: 
> *Last Name: 
> *Phone Number: 
> Office Number: 
> Backup: 
> Backup Phone Number: 
> 
> 
> 
> 
> Error 500
> An error has occured while processing
> request:http://localhost:8080/employeelist/processNewEmployee.do
> Message: Server caught unhandled exception from servlet [action]: Server
> caught unhandled exception from servlet [jsp]: cant remove Attributes from
> request scope
> 
> Target Servlet: action
> StackTrace:
> 
> Root Error-1: cant remove Attributes from request scope
> java.lang.IllegalArgumentException: cant remove Attributes from request
> scope java.lang.Throwable(java.lang.String)
> java.lang.Exception(java.lang.String)
> java.lang.RuntimeException(java.lang.String)
> java.lang.IllegalArgumentException(java.lang.String) void
> org.apache.jasper.runtime.PageContextImpl.removeAttribute(java.lang.String,
> int) int org.apache.struts.taglib.html.FormTag.doEndTag() void
> jsp._employeeEdit_xjsp._jspService(javax.servlet.http.HttpServletRequest,
> javax.servlet.http.HttpServletResponse) void
> org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRequest,
> javax.servlet.http.HttpServletResponse) void
> javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
> javax.servlet.ServletResponse) void
> 
>org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest,
> javax.servlet.http.HttpServletResponse, boolean) void
> 
>org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest,
> javax.servlet.http.HttpServletResponse, java.lang.String,
> java.lang.Throwable, boolean) void
> org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletRequest,
> javax.servlet.http.HttpServletResponse) void
> javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
> javax.servlet.ServletResponse) void
> 
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.ServletRequest,
> javax.servlet.ServletResponse) void
> 
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(javax.servlet.ServletRequest,
> javax.servlet.ServletResponse) void
> 
>com.ibm.servlet.engine.webapp.ServicingServletState.service(com.ibm.servlet.engine.webapp.StrictLifecycleServlet,
> javax.servlet.ServletRequest, javax.servlet.ServletResponse) void
> com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service
> 
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com



RE: newbie - requesting example of working build.xml, build.properties files

2001-06-22 Thread Cook, Levi

I haven't taken time to account for the variation, but walking through this
process on a fresh RedHat 7.1 installation required an additional step.

Basically, to prevent ant from failing on some jar sealing Security
exception that I don't remember the details of, I had to remove
$ANT_HOME/lib/parser.jar & $ANT_HOME/lib/jaxp.jar. (I think ant 1.3 carries
jaxp 1.0 with it, and the presence of Jaxp 1.1 caused the fit)

-- Levi

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 22, 2001 5:20 PM
> To: [EMAIL PROTECTED]
> Subject: Re: newbie - requesting example of working build.xml,
> build.properties files
> 
> 
> 
> 
> On Fri, 22 Jun 2001, Michael McCafferty wrote:
> 
> > Hi all,
> > 
> > I am trying to build struts from source, and having an unexpectedly
> > difficult time of it. I have downloaded the source code 
> from CVS, and
> > followed the directions listed on
> > http://jakarta.apache.org/struts/installation.html without success.
> > 
> > I have copied the $STRUTS/build.properties.sample to 
> build.properties
> > and edited existing entries accordingly. I have also copied
> > $STRUTS/build-webapp.xml to build.xml and edited existing values
> > accordingly.  For all prerequesite properties listed in 
> build-webapp.xml
> > (lines 29-86) I am specifying a command line option to "ant." 
> > 
> > I'm probably missing something obvious, but I'm coming to 
> the conclusion
> > that the sample configuration files require a LOT of 
> customization in
> > order to build a vanilla version of struts from source. I'd 
> love to see
> > copies of build.xml and build.properties that someone has used to
> > successfully compile the software.
> > 
> 
> You should not have to modify *anything* in build.xml, 
> build-webapp.xml,
> or build-webapps.xml in order to build Struts from source.  All of the
> necessary values are inherited from properties you set inside your
> build.properties file.
> 
> The minimal set of properties you need to set in your
> "build.properties" file are:
> 
>   jdbc20ext.jar - Set this to the full pathname to your
>   "jdbc2_0-stdext.jar" file (download the
>   JDBC 2.0 Optional Package).
> 
>   servlet.jar   - Set this to the full pathname to your
>   "servlet.jar" file (normally the one you
>   got with your servlet container).
> 
> For the rest of my setup, here's what I did:
> 
> * Downloaded Ant 1.3 and installed it (and placed $ANT_HOME/bin
>   on my PATH)
> 
> * From the same place, grab Ant's "optional.jar" file and
>   place it in $ANT_HOME/lib.
> 
> * Download JAXP/1.1 and put all three JAR files on my CLASSPATH.
> 
> * Type "ant" to compile Struts, or "ant dist" to create a mirror
>   of the binary distribution.
> 
> If you are having to change other properties, then we should try to
> simplify the build scripts so that you don't have to.
> 
> > Thanks in advance,
> > 
> > Michael McCafferty
> > [EMAIL PROTECTED]
> > 
> 
> Craig McClanahan
> 
> 



Re: newbie - requesting example of working build.xml, build.propertiesfiles

2001-06-22 Thread Craig R. McClanahan



On Fri, 22 Jun 2001, Michael McCafferty wrote:

> Hi all,
> 
> I am trying to build struts from source, and having an unexpectedly
> difficult time of it. I have downloaded the source code from CVS, and
> followed the directions listed on
> http://jakarta.apache.org/struts/installation.html without success.
> 
> I have copied the $STRUTS/build.properties.sample to build.properties
> and edited existing entries accordingly. I have also copied
> $STRUTS/build-webapp.xml to build.xml and edited existing values
> accordingly.  For all prerequesite properties listed in build-webapp.xml
> (lines 29-86) I am specifying a command line option to "ant." 
> 
> I'm probably missing something obvious, but I'm coming to the conclusion
> that the sample configuration files require a LOT of customization in
> order to build a vanilla version of struts from source. I'd love to see
> copies of build.xml and build.properties that someone has used to
> successfully compile the software.
> 

You should not have to modify *anything* in build.xml, build-webapp.xml,
or build-webapps.xml in order to build Struts from source.  All of the
necessary values are inherited from properties you set inside your
build.properties file.

The minimal set of properties you need to set in your
"build.properties" file are:

  jdbc20ext.jar - Set this to the full pathname to your
  "jdbc2_0-stdext.jar" file (download the
  JDBC 2.0 Optional Package).

  servlet.jar   - Set this to the full pathname to your
  "servlet.jar" file (normally the one you
  got with your servlet container).

For the rest of my setup, here's what I did:

* Downloaded Ant 1.3 and installed it (and placed $ANT_HOME/bin
  on my PATH)

* From the same place, grab Ant's "optional.jar" file and
  place it in $ANT_HOME/lib.

* Download JAXP/1.1 and put all three JAR files on my CLASSPATH.

* Type "ant" to compile Struts, or "ant dist" to create a mirror
  of the binary distribution.

If you are having to change other properties, then we should try to
simplify the build scripts so that you don't have to.

> Thanks in advance,
> 
> Michael McCafferty
> [EMAIL PROTECTED]
> 

Craig McClanahan





Re: Lost Request information after form validation.

2001-06-22 Thread Craig R. McClanahan



On Fri, 22 Jun 2001, See Yam Lim wrote:

> Hey guys,
> 
>   I have form class populate my detail JSP page which associated with
> my action classes and everytime after the form's validation failed and the
> request is gone. so does any body know how can i avoid it. could i at the
> validation. forward the reqest back to where i came from.
> 

Are you using an "input" attribute on your  to tell Struts where
to send control back to after a validation failure?  See the 
entry for "/saveRegistration" in the example application for an example of
how this works.

> See-Yam Lim
> Software Engineer
> Netvendor Inc.
> http://www.netvendor.com
> mailto:[EMAIL PROTECTED]
> Sell more profitably. 
> 
> 
> 
> 

Craig





Re: newbie - requesting example of working build.xml, build.properties files

2001-06-22 Thread dhay



I had some trouble, mainly with security exception.  The following worked fine
though:

build.properties:


# -
# build.properties.sample
#
# This is an example "build.properties" file, used to customize building Struts
# for your local environment.  Make any changes you need, and rename this file
# to "build.properties" in the same directory that contains the Struts
# "build.xml" file.
#
# $Id: build.properties.sample,v 1.4 2001/05/06 12:07:31 vmassol Exp $
# -

# WARNING:  The relative paths below assume that the build.xml file is in the
# top-level directory of the jakarta-struts source distribution (as it still
# is at the moment).  If build.xml moves to under the "build" subdirectory,
# we will need to add an extra level of "../" to each of these paths.

# The directory containing your binary distribution of Tomcat 4.0 ("Catalina"
# is the servlet container part of this distribution), from CVS module
# "jakarta-tomcat-4.0" at jakarta.apache.org).  This is only required
# if you are going to execute the "deploy.catalina" target.
catalina.home=../jakarta-tomcat-4.0/build

# The JAR file containing the JDBC 2.0 Optional Package extensions API
# (javax.sql).  This file will automatically be added to your class path
# when you compile Struts
jdbc20ext.jar=../jdbc20/jdbc2_0-stdext.jar

# The JAR file containing the Servlet API classes to compile against (either
# version 2.2 or 2.3)
servlet.jar=../tomcat/lib/common/servlet.jar

# The directory containing your binary distribution of Tomcat 3.2, from CVS
# module "jakarta-tomcat" (and branch "TOMCAT_32") at jakarta.apache.org.
# This is only required if you are going to execute the "deploy.tomcat" target.
tomcat.home=../tomcat

# The JAR file containing the Xerces parser.  This is only required if you are
# going to execute the "deploy.catalina" target.
xerces.jar=../xml-xerces/xerces.jar

# Properties related to Struts unit testing
# -

# Cactus jar for the Servlet API corresponding to the servlet.jar file
# selected above (either 2.2 or 2.3)
cactus.jar = ../jakarta-commons/cactus/out/servlet22/dist/lib/commons-cactus.jar


# Cactus Ant custom tasks jar
cactus.ant.jar =
../jakarta-commons/cactus/out/servlet22/dist/lib/commons-cactus-ant.jar

# JUnit jar file
junit.jar = f:/applis/jakarta-ant-1.4alpha/lib/junit.jar

# Servlet engine locations for the tests

# Note: If you don't want to run the test on a given servlet engine, just
#   comment it's home property. For example, if you don't want to run the
#   tests on Tomcat 4.0, comment the "tomcat.home.40" property.

tomcat.home.32 = f:/applis/jakarta-tomcat-3.2.1
tomcat.home.40 = f:/applis/jakarta-tomcat-4.0-b1


build.xml:














































































  
  





































  






























































































































































































=

Re: Configuration for Action

2001-06-22 Thread Craig R. McClanahan



On Fri, 22 Jun 2001, Yuriy Zubarev wrote:

> Hello Craig,
> 
> First option turns out to be a great way to store
> initialization parameters that are shared by many
> actions. In this case what name convention should
> be adopted?
> 

For options that are specific to a particular Action class (say,
com.mycompany.mypackage.MyAction), I would use names like:

  com.mycompany.mypackage.MyAction.foo

for the "foo" parameter.

For initialization parameters shared by a number of different actions,
presumably the actions are related to each other.  Therefore, you might
place them all in the same Java package, and use the package name as the
prefix (so the "foo" parameter shared by all actions in the package might 
be named "com.mycompany.mypackage.foo" instead).

>From a technical perspective, it really does not matter what convention
you adopt.  However, using rules like this accomplish two good things:
* Avoids the potential for name clashes where more than one Action
  has a parameter named "foo".
* Makes the complete parameter name predictable, to reduce
  mistakes.

> Best of luck,
> Yuriy Zubarev
> 
> 

Craig


> --- "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
> > First, one approach is to use servlet initialization parameters, and
> > adopt
> > the convention that the names of parameters for a specific action start
> > with the fully qualified class name of that action.
> > 
> > Second, if you only need *one* configuration parameter, there is a
> > general
> > purpose property of an ActionMapping called "parameter" (with accessor
> > methods getParameter() and setParameter()) that you can use for this
> > purpose.
> > 
> > Third, there is a way to store Action-specific configuration information
> > in struts-config.xml.  It's a little involved, but goes basically like
> > this:
> > 
> > * Write your own subclass of ActionMapping that includes the extra
> >   properties you are interested in.  You can do individual subclasses
> >   for each different action, or a class that includes all the custom
> >   properties you might want for any action.
> > 
> > * Modify your  entries in two respects:
> >   - Tell Struts to use your ActionMapping subclass instead of the
> > standard one.
> >   - Configure the extra parameters with  elements>
> > 
> >  >className="com.mycompany.MyActionMapping"
> > type="com.mycompany.MyAction"
> > ... >
> >   
> >   
> > 
> > 
> > * In your Action, cast the mapping you receive to your own class
> >   so you can access these extra properties:
> > 
> > public ActionForward perform(...) {
> > 
> >   MyActionMapping myMapping = (MyActionMapping) mapping;
> >   String foo = myMapping.getFoo();
> >   String bar = myMapping.getBar();
> >   ... use foo and bar to modify the behavior ...
> > 
> > }
> > 
> > Craig McClanahan
> > 
> > 
> > On Thu, 21 Jun 2001, Yuriy Zubarev wrote:
> > 
> > > Hello everybody,
> > > 
> > > While working directly with servlets, in configuration
> > > file you can specify initial valus of parameters for a servlet
> > > in the following way:
> > > 
> > > 
> > >   
> > > parameter
> > >   
> > >   
> > > value
> > >   
> > > 
> > > 
> > > And you can easily get those values without resorting to
> > > parse information on your own.
> > > 
> > > So I was wondering if it's possible to make such a
> > > thing with actions in struts-config.xml file.
> > > In another words I would like to have some custom
> > > parameters for some actions with handy means of
> > > extracting those parameters.
> > > 
> > > Thank you for your time.
> > > 
> > > Best of luck,
> > > Yuriy Zubarev
> > > 
> > > 
> > > __
> > > Do You Yahoo!?
> > > Get personalized email addresses from Yahoo! Mail
> > > http://personal.mail.yahoo.com/
> > > 
> > 
> 
> 
> __
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
> 




newbie - requesting example of working build.xml, build.properties files

2001-06-22 Thread Michael McCafferty

Hi all,

I am trying to build struts from source, and having an unexpectedly
difficult time of it. I have downloaded the source code from CVS, and
followed the directions listed on
http://jakarta.apache.org/struts/installation.html without success.

I have copied the $STRUTS/build.properties.sample to build.properties
and edited existing entries accordingly. I have also copied
$STRUTS/build-webapp.xml to build.xml and edited existing values
accordingly.  For all prerequesite properties listed in build-webapp.xml
(lines 29-86) I am specifying a command line option to "ant." 

I'm probably missing something obvious, but I'm coming to the conclusion
that the sample configuration files require a LOT of customization in
order to build a vanilla version of struts from source. I'd love to see
copies of build.xml and build.properties that someone has used to
successfully compile the software.

Thanks in advance,

Michael McCafferty
[EMAIL PROTECTED]



Re: Dynamic label

2001-06-22 Thread Peter Alfors

try



HTH,
Pete


"Pal, Gaurav" wrote:

> Hi,
>
> I am trying to create a dynamic label HTML form through the bean:message
> tag. What I want to do is as follows:
>
> 
>
> It gives a compilation error that the key string is unenclosed, anybody have
> any ideas how to do this?
>
> Thanks in advance for your help,
> Gaurav




Re: Dynamic label

2001-06-22 Thread David Winterfeldt

" />

Or better still make a method that will concatenate
this for you and use bean:define to get the value into
scope.

David

--- "Pal, Gaurav" <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I am trying to create a dynamic label HTML form
> through the bean:message
> tag. What I want to do is as follows:
> 
> 
> 
> It gives a compilation error that the key string is
> unenclosed, anybody have
> any ideas how to do this?
> 
> Thanks in advance for your help,
> Gaurav


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: HP Bluestone Struts Trailmap

2001-06-22 Thread Jeff Trent

This page did not display for me.  Not a 404, but no content shown.


- Original Message -
From: "BONAIUTO,JAMES (HP-NewJersey,ex1)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 22, 2001 4:46 PM
Subject: HP Bluestone Struts Trailmap


> I will be adding to HP Bluestone's Struts trailmap:
>
http://gallery2.bluestone.com/scripts/SaISAPI.dll/Gallery.class/demos/trailM
> aps/index.jsp
> New trails on the trailmap will include Database connections (returning a
> resultset and connection pooling) and Templates. Does anyone have any
other
> topics that they would like to see added?
>
> James Bonaiuto
> HP Bluestone
>




Dynamic label

2001-06-22 Thread Pal, Gaurav

Hi,

I am trying to create a dynamic label HTML form through the bean:message
tag. What I want to do is as follows:



It gives a compilation error that the key string is unenclosed, anybody have
any ideas how to do this?

Thanks in advance for your help,
Gaurav



Re: Running Tomcat+Struts w/o internet connection

2001-06-22 Thread James W. Howe

I believe we are using Tomcat 3.2.1.

At 11:04 AM 06/22/2001 -0700, you wrote:


>On Fri, 22 Jun 2001, James Howe wrote:
>
> > We are trying to run Tomcat + Struts to run our web application without an
> > external internet connection.  We are running into a problem because our
> > struts-config.xml has an external reference to the struts-config 
> DTD.  What
> > is the proper way to modify struts-config.xml to reference a locally
> > defined DTD and where would that file normally reside in a standard Tomcat
> > installation?
> >
> > Thanks.
> >
> >
>
>Which version of Tomcat?  Which XML parser?
>
>This works for me (with Tomcat 4 and JAXP/1.1) all the time on my laptop
>when I am disconnected from the net.
>
>Craig


James Howe  internet: mailto:[EMAIL PROTECTED]
Allen Creek Software, Inc.pgpkey: 
http://ic.net/~jwh/pgpkey.html
Ann Arbor, MI  48103




RE: HP Bluestone Struts Trailmap

2001-06-22 Thread Wasetis, Ken
Title: RE: HP Bluestone Struts Trailmap





I know there is a snippet in the docs for IO tags, but I'd like to see more on SOAP use within JSPs in a Struts framework.

Thanks!  I thought the HP Bluestone Trail Map was helpful.


-Ken


-Original Message-
From: BONAIUTO,JAMES (HP-NewJersey,ex1) [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 3:47 PM
To: '[EMAIL PROTECTED]'
Subject: HP Bluestone Struts Trailmap



I will be adding to HP Bluestone's Struts trailmap:
http://gallery2.bluestone.com/scripts/SaISAPI.dll/Gallery.class/demos/trailM
aps/index.jsp
New trails on the trailmap will include Database connections (returning a
resultset and connection pooling) and Templates. Does anyone have any other
topics that they would like to see added?


James Bonaiuto
HP Bluestone





HP Bluestone Struts Trailmap

2001-06-22 Thread BONAIUTO,JAMES (HP-NewJersey,ex1)

I will be adding to HP Bluestone's Struts trailmap:
http://gallery2.bluestone.com/scripts/SaISAPI.dll/Gallery.class/demos/trailM
aps/index.jsp
New trails on the trailmap will include Database connections (returning a
resultset and connection pooling) and Templates. Does anyone have any other
topics that they would like to see added?

James Bonaiuto
HP Bluestone



Lost Request information after form validation.

2001-06-22 Thread See Yam Lim
Title: Lost Request information after form validation.





Hey guys,


    I have form class populate my detail JSP page which associated with my action classes and everytime after the form's validation failed and the request is gone. so does any body know how can i avoid it. could i at the validation. forward the reqest back to where i came from.

See-Yam Lim
Software Engineer
Netvendor Inc.
http://www.netvendor.com
mailto:[EMAIL PROTECTED]
Sell more profitably. 







Re: Configuration for Action

2001-06-22 Thread Yuriy Zubarev

Hello Craig,

First option turns out to be a great way to store
initialization parameters that are shared by many
actions. In this case what name convention should
be adopted?

Best of luck,
Yuriy Zubarev


--- "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
> First, one approach is to use servlet initialization parameters, and
> adopt
> the convention that the names of parameters for a specific action start
> with the fully qualified class name of that action.
> 
> Second, if you only need *one* configuration parameter, there is a
> general
> purpose property of an ActionMapping called "parameter" (with accessor
> methods getParameter() and setParameter()) that you can use for this
> purpose.
> 
> Third, there is a way to store Action-specific configuration information
> in struts-config.xml.  It's a little involved, but goes basically like
> this:
> 
> * Write your own subclass of ActionMapping that includes the extra
>   properties you are interested in.  You can do individual subclasses
>   for each different action, or a class that includes all the custom
>   properties you might want for any action.
> 
> * Modify your  entries in two respects:
>   - Tell Struts to use your ActionMapping subclass instead of the
> standard one.
>   - Configure the extra parameters with  elements>
> 
> className="com.mycompany.MyActionMapping"
> type="com.mycompany.MyAction"
> ... >
>   
>   
> 
> 
> * In your Action, cast the mapping you receive to your own class
>   so you can access these extra properties:
> 
> public ActionForward perform(...) {
> 
>   MyActionMapping myMapping = (MyActionMapping) mapping;
>   String foo = myMapping.getFoo();
>   String bar = myMapping.getBar();
>   ... use foo and bar to modify the behavior ...
> 
> }
> 
> Craig McClanahan
> 
> 
> On Thu, 21 Jun 2001, Yuriy Zubarev wrote:
> 
> > Hello everybody,
> > 
> > While working directly with servlets, in configuration
> > file you can specify initial valus of parameters for a servlet
> > in the following way:
> > 
> > 
> >   
> > parameter
> >   
> >   
> > value
> >   
> > 
> > 
> > And you can easily get those values without resorting to
> > parse information on your own.
> > 
> > So I was wondering if it's possible to make such a
> > thing with actions in struts-config.xml file.
> > In another words I would like to have some custom
> > parameters for some actions with handy means of
> > extracting those parameters.
> > 
> > Thank you for your time.
> > 
> > Best of luck,
> > Yuriy Zubarev
> > 
> > 
> > __
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail
> > http://personal.mail.yahoo.com/
> > 
> 


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



initial population of html form from database --- ActionForm or ActionClass

2001-06-22 Thread Smith Chris

I am trying to setup an html form that needs to be initially
populated from a database.  Should I do this in the perform() method
of the action class (which gets passed the actionform bean), or somewhere in
the actionform bean??  I'm assuming it should be done from the action class
since the actionform should just be a data repository by my understanding.
If so, how do I do this from the action class?  I've tried calling my setter
methods on the actionform object (after casting to my extended class) from
within the action class and the form comes up blank.

If the forms are supposed to be populated from the action classes,
why is there a reset method in the actionform (which doesn't seem to do
anything for me by the way -- it never seems to get called), and why is it
suggested to set the default values from there?

thank you for any help you can offer.




Re: Running Tomcat+Struts w/o internet connection

2001-06-22 Thread Dan Miser

You shouldn't have to change the XML. There are local copies of the DTD in
struts.jar, and should be registered and loaded when you start Tomcat up.
Which build are you using (source vs binary, and release vs beta)? This
should be working just fine in the later builds.
--
Dan Miser
http://www.distribucon.com

- Original Message -
From: "Liang Li" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 22, 2001 10:02 AM
Subject: RE: Running Tomcat+Struts w/o internet connection


> Open the struts-config.xml, change the head
>
>"-//Apache Software Foundation//DTD Struts Configuration
1.0//EN"
>   "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
>
> To:
>
>"-//Apache Software Foundation//DTD Struts Configuration
1.0//EN"
>   "file://c:/{where_your_DTD_is}/struts-config_1_0.dtd">
>
> I think that will work.
>
> -Original Message-
> From: James Howe [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 22, 2001 10:30 AM
> To: [EMAIL PROTECTED]
> Subject: Running Tomcat+Struts w/o internet connection
>
>
> We are trying to run Tomcat + Struts to run our web application without an
> external internet connection.  We are running into a problem because our
> struts-config.xml has an external reference to the struts-config DTD.
What
> is the proper way to modify struts-config.xml to reference a locally
> defined DTD and where would that file normally reside in a standard Tomcat
> installation?
>
> Thanks.




workflow?

2001-06-22 Thread Ronel Sumibcay


I've seen some talk about this in the struts-dev group can somebody point me
to where i can read more about it.

I'm working on a framework that allows a struts developer to reuse certain
wizard based pages where the wizard doesn't change, but the start and end
points do i.e. Basically a way to plug in a use case into other use cases.
The result of the wizard would be a bean (foreign key) that would be
assigned to a bean that requested the service of the wizard.

I would like to find out if the 'workflow' stuff is for this situation

Thanks.

-ronel
 



Re: Struts Question

2001-06-22 Thread Charles Baker


Quick question,
I’m using VA ‘s Web Test  Env and I’m getting an error using a simple test 
page from the IBM web site. I’m still new to Struts so can someone let me 
know if this is a simple mistake that I’m making? The single page JSP and 
full error message are following.
Message: Server caught unhandled exception from servlet [jsp]: cant remove 
Attributes from request scope

Thanks in advance for any help.
CEB


JSP Page
%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%



*First Name: 
*Last Name: 
*Phone Number: 
Office Number: 
Backup: 
Backup Phone Number: 




Error 500
An error has occured while processing 
request:http://localhost:8080/employeelist/processNewEmployee.do
Message: Server caught unhandled exception from servlet [action]: Server 
caught unhandled exception from servlet [jsp]: cant remove Attributes from 
request scope

Target Servlet: action
StackTrace:

Root Error-1: cant remove Attributes from request scope
java.lang.IllegalArgumentException: cant remove Attributes from request 
scope java.lang.Throwable(java.lang.String) 
java.lang.Exception(java.lang.String) 
java.lang.RuntimeException(java.lang.String) 
java.lang.IllegalArgumentException(java.lang.String) void 
org.apache.jasper.runtime.PageContextImpl.removeAttribute(java.lang.String, 
int) int org.apache.struts.taglib.html.FormTag.doEndTag() void 
jsp._employeeEdit_xjsp._jspService(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse) void 
org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse) void 
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse) void 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest,
 
javax.servlet.http.HttpServletResponse, boolean) void 
org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest,
 
javax.servlet.http.HttpServletResponse, java.lang.String, 
java.lang.Throwable, boolean) void 
org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse) void 
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse) void 
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.ServletRequest,
 
javax.servlet.ServletResponse) void 
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(javax.servlet.ServletRequest,
 
javax.servlet.ServletResponse) void 
com.ibm.servlet.engine.webapp.ServicingServletState.service(com.ibm.servlet.engine.webapp.StrictLifecycleServlet,
 
javax.servlet.ServletRequest, javax.servlet.ServletResponse) void 
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service


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




Re: html action links

2001-06-22 Thread Ted Husted

In can be used other ways, but Struts is designed to be a Model 2/MVC
framework. This means you should avoid linking to JSP's directly.
Generally, everything should go through a server-side Action first,
where you can collect whatever data you need for the JSP, and then
forward it through the request context for the JSP to display. The *.do
files are mapped to Struts controller, which calls the server-side
Action. The controller consults the Action Mappings, loaded from
struts-config.xml, to determine which Action to call.

A re-reading of the Users Guide might help you get the big picture. 

DHarty wrote:
> 
> Okay, I changed my page to look like this.
> 
> 
> 
>property="username"/> 
>   
> 
> Modify
> 
> 
> 
> 
> 
> this produces a link like
> :http://.../user_mod.jsp?UserForm=edu.erau...form.UserForm%40ff5bdefc
> 
> I have a global action "modifyUser" with a path to //user_mod.jsp.
> I am able to pick up the UserForm parameter in ModifyUser, but I am unable
> to use it as the UserForm bean.  Am I passing a reference to the UserForm
> Bean, or just a name?  how do I reconstruct the UserForm bean in ModifyUser?
> I experimented with  with no
> success.
> 
> I'm sorry if these questions are simplistic, but I am new to jsp, and
> especially struts.
> 
> Also, in the origional example, the global path is to a .do file.  I was
> under the impression that the ".do" files were generated by the server.  Do
> I need to have a generated page waiting to receive my request?  How is this
> done?
> 
> thnxs again,
> David
> 
> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 22, 2001 12:10 PM
> To: [EMAIL PROTECTED]
> Subject: Re: html action links
> 
> If you just want to use html:link, you don't necessarily have to use an
> ActionForm class (though you can, if you want).
> 
> Here's some code for generating a list with links. Result is a bean that
> exposes a collection named rows.
> 
> 
> 
>paramProperty="donor">
> 
>   
> 
> 
> 
> When the page renders, it generates links like this:
> 
>  href="http://localhost/struts-stub/donor/View.do?key=123456";>123456
> 
> where there is a global forward "donor" with the path "/donor/View.do"
> 
> and row.getDonor() returns 123456
> 
> DHarty wrote:
> >
> > This is really a two part question.
> >
> > I have an iterative loop that displays a list users that are stored in
> > Action Forms.  The idea is that when the button (or link) next to the item
> > is selected, the user will be allowed to make modifications to the
> selected
> > form:
> >
> >   
> >   
> > 
> > 
> > 
> > 
> > 
> > Modify
> > 
> > 
> > 
> >   
> >   
> >
> > Where "result" is a vector of ActionForms.
> >
> > Currently, when the "Modify" button is selected, the appropriate action
> > class is called, but the ActionForm is reset.
> >
> > I know I could add a field to the submit button, i.e:
> >
> > Modify  > property="username"/>
> >
> > and then have the action class look up the user in hte database again, but
> I
> > would rather not.
> >
> > I was considering using an html link instead of a button, but was unsure
> how
> > to proceed.
> > Ideally, I would like to use an html link, while retaining the existing
> form
> > (without having to look it up again).
> >
> > Any thoughts or comments would be appreciated.
> >
> > Thnxs
> >
> > David

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/



Re: Running Tomcat+Struts w/o internet connection

2001-06-22 Thread Craig R. McClanahan



On Fri, 22 Jun 2001, James Howe wrote:

> We are trying to run Tomcat + Struts to run our web application without an 
> external internet connection.  We are running into a problem because our 
> struts-config.xml has an external reference to the struts-config DTD.  What 
> is the proper way to modify struts-config.xml to reference a locally 
> defined DTD and where would that file normally reside in a standard Tomcat 
> installation?
> 
> Thanks.
> 
> 

Which version of Tomcat?  Which XML parser?

This works for me (with Tomcat 4 and JAXP/1.1) all the time on my laptop
when I am disconnected from the net.

Craig





Re: set Servlet.log file

2001-06-22 Thread Craig R. McClanahan



On 22 Jun 2001 [EMAIL PROTECTED] wrote:

> Is there any way to specify the servlet.log file without having to access the 
> servlet container's configuration files? One might need this because if one 
> hosts ones site on a commercial server, one does not usually have access to log 
> files or configuration files.
> 

Nope -- how logging works (at least for ServletContext.log() calls) is
totally up to the container.

You might consider doing your own logging to files (perhaps with a package
like Log4J).  But I'd be pretty surprised by a commercial server that
would not make available the option of a per-customer log file for their
web applications.

> Pranav
> 
> -- 
> Get your firstname@lastname email for FREE at http://Nameplanet.com/?su
> 

Craig





Re: Setting target dynamically

2001-06-22 Thread Craig R. McClanahan



On Fri, 22 Jun 2001, Torsten Terp wrote:

> Hi,
> 
> Im sorry if this has been asked before (i think it has but i cant find it)
> 
> Is it possible to set the target of a form, based on the result of the
> processing in the Action, i.e., search went well target=bodyCenter,
> search was empty target=inputSearch?
> 

Since "target" is a client-side thing, the only standard way to set the
target is to ask for it on the original link (i.e. before you know what
the results are).  I read somewhere that there might be some non-standard
HTTP header that you could set to choose the target dynamically, but don't
know the details, or how widely supported it might be.

> Thanks...
> 
> ^terp
> 
> 
> 
> 
Craig





Re: Build fails on

2001-06-22 Thread Craig R. McClanahan



On Fri, 22 Jun 2001, Kief Morris wrote:

> Howdy, I'm trying to compile the struts build from CVS, and am
> having major xml parser headaches. My base system is:
> 
> Win2000 SP2
> Sun JDK 1.3.0-C
> Ant 1.3.0 (bin)
> 
> For XML parser libraries I've tried JAXP 1.1 and Xerces 1.4.0, but I
> can't seem to get Struts to compile with either one. In either case
> it fails in line 186 of build.xml, which is the style task.
> 

I build Struts on both Linux and Windows.  Here is what I did:

* Download and install Ant 1.3 as an application (i.e. put
  $ANT_HOME/bin on your PATH variable so you can say "ant dist"
  and things like that)

* Copy the "optional.jar" file from the same place you downloaded
  Ant, and place it in $ANT_HOME/lib.  This code has the 

RE: html action links

2001-06-22 Thread DHarty

Okay, I changed my page to look like this.



   
  

Modify





this produces a link like
:http://.../user_mod.jsp?UserForm=edu.erau...form.UserForm%40ff5bdefc

I have a global action "modifyUser" with a path to //user_mod.jsp.
I am able to pick up the UserForm parameter in ModifyUser, but I am unable
to use it as the UserForm bean.  Am I passing a reference to the UserForm
Bean, or just a name?  how do I reconstruct the UserForm bean in ModifyUser?
I experimented with  with no
success.

I'm sorry if these questions are simplistic, but I am new to jsp, and
especially struts.

Also, in the origional example, the global path is to a .do file.  I was
under the impression that the ".do" files were generated by the server.  Do
I need to have a generated page waiting to receive my request?  How is this
done?

thnxs again,
David


-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 12:10 PM
To: [EMAIL PROTECTED]
Subject: Re: html action links


If you just want to use html:link, you don't necessarily have to use an
ActionForm class (though you can, if you want).

Here's some code for generating a list with links. Result is a bean that
exposes a collection named rows.



  

  



When the page renders, it generates links like this:

http://localhost/struts-stub/donor/View.do?key=123456";>123456

where there is a global forward "donor" with the path "/donor/View.do"

and row.getDonor() returns 123456

DHarty wrote:
>
> This is really a two part question.
>
> I have an iterative loop that displays a list users that are stored in
> Action Forms.  The idea is that when the button (or link) next to the item
> is selected, the user will be allowed to make modifications to the
selected
> form:
>
>   
>   
> 
> 
> 
> 
> 
> Modify
> 
> 
> 
>   
>   
>
> Where "result" is a vector of ActionForms.
>
> Currently, when the "Modify" button is selected, the appropriate action
> class is called, but the ActionForm is reset.
>
> I know I could add a field to the submit button, i.e:
>
> Modify  property="username"/>
>
> and then have the action class look up the user in hte database again, but
I
> would rather not.
>
> I was considering using an html link instead of a button, but was unsure
how
> to proceed.
> Ideally, I would like to use an html link, while retaining the existing
form
> (without having to look it up again).
>
> Any thoughts or comments would be appreciated.
>
> Thnxs
>
> David




RE: running struts in other application server

2001-06-22 Thread Howard Moore

See intermixed comments.

> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: 22 June 2001 16:58
> To: [EMAIL PROTECTED]
> Subject: Re: running struts in other application server
> 
> 
> There are additional instructions when required for several 
> application
> servers, but there should not be any general compatibility issues. I
> have heard that Oracle9IAS is a repackaging of Orion. 

It does appear to be. I managed to get both the struts-example application
and my own struts based application running under it simply by following the
Orion instructions (http://jakarta.apache.org/struts/installation-oas.html).
Also, the Orion 1.0.3 problems with ServletContext.getResource() appear to
have been fixed so the last part of the instructions are not necessary. 


> 
> < http://jakarta.apache.org/struts/installation.html >
> 
> Here's a Javascript that I use when submitting my forms, in case it
> helps you with yours. 
> 
> 
> 
> ...
> 
> 

re: problems with building Struts

2001-06-22 Thread dhay



Hi.  Not sure who posted a message on this earlier (or exact title of it) -
deleted it by mistake before I could reply!  (and mailing-list page seems to be
well behind on messages posted).

I had similar problem, and fixed it by downloading xalan, and using BOTH the
xerces.jar and xalan.jar as follows:

set classpath=%classpath%;d:\xalan-j_1_2_2\xerces.jar
set classpath=%classpath%;d:\xalan-j_1_2_2\xalan.jar
set classpath=%classpath%;d:\tomcat\lib\common\parser.jar

Hope that helps,

Dave






Liang Li <[EMAIL PROTECTED]> on 06/22/2001 11:02:50 AM

Please respond to [EMAIL PROTECTED]

To:   "'[EMAIL PROTECTED]'"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: Running Tomcat+Struts w/o internet connection



Open the struts-config.xml, change the head

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

To:



I think that will work.

-Original Message-
From: James Howe [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 10:30 AM
To: [EMAIL PROTECTED]
Subject: Running Tomcat+Struts w/o internet connection


We are trying to run Tomcat + Struts to run our web application without an
external internet connection.  We are running into a problem because our
struts-config.xml has an external reference to the struts-config DTD.  What
is the proper way to modify struts-config.xml to reference a locally
defined DTD and where would that file normally reside in a standard Tomcat
installation?

Thanks.









RE: Running Tomcat+Struts w/o internet connection

2001-06-22 Thread DHarty

I was following this thread, and I tried to use a relative directory of the
type:
file://./struts-config_1_0.dtd"

When I attempted to start tomcat I got the following message:

resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN', 'file://.')  Resolving to alternate DTD
'jar:file:/C:/dev/jbproject/TMate/tmate/WEB-INF/lib/struts.jar!/org/apache/s
truts/resources/struts-config_1_0.dtd'

and then my app worked correctly.  Simarly, you could change the http path
to point to a null object. ex:
"http://this.domain.does.not.exist.org/struts/dtds/struts-config_1_0.dtd";

It seems that if the file can't be found where specified, struts resorts to
a struts-config_1_0.dtd file embedded within struts jar. This may only work
in struts_1.0.

David




-Original Message-
From: Liang Li [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 11:43 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Running Tomcat+Struts w/o internet connection


Of course you can use relative directory, and put the DTD file into your
war.

-Original Message-
From: Hartmut Bernecker [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 11:52 AM
To: [EMAIL PROTECTED]
Subject: Re: Running Tomcat+Struts w/o internet connection


Hi,

I think that problem has been fixed since Struts 1.0, but I'm not sure.
Do you have a new release from Struts?

The solution with "file://c:/..." is IMHO a problem if you want to
deploy your Application (e.g. in a war-File).
Who guarantees you, Tomcat or JRun or ... will be installed on Drive C?

Currently I have a similar problem: I have a XML-File (retrieved by
SOAP) and do parse it with Digester.
That is no problem. If I want to validate that Document, I do it by
writing the DTD-Reference into the XML-File
(  ) and by calling
digester.validate(true).
The Drawback is, that I must put that DTD in the tomcat/bin Directory,
otherwise it would **not** be found.

Then I tried to use the digester.register method. But it seems, I does
not work, as I want.
What I want is: To put the DTD file in some custom directory and use it
to validate the XML-File (that I get wrapped in in a SOAP Document).

Who knows, how to do that?

Cheers
Hartmut



Liang Li schrieb:
>
> Open the struts-config.xml, change the head
>
>"-//Apache Software Foundation//DTD Struts Configuration
1.0//EN"
>   "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
>
> To:
>
>"-//Apache Software Foundation//DTD Struts Configuration
1.0//EN"
>   "file://c:/{where_your_DTD_is}/struts-config_1_0.dtd">
>
> I think that will work.
>
> -Original Message-
> From: James Howe [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 22, 2001 10:30 AM
> To: [EMAIL PROTECTED]
> Subject: Running Tomcat+Struts w/o internet connection
>
> We are trying to run Tomcat + Struts to run our web application without an
> external internet connection.  We are running into a problem because our
> struts-config.xml has an external reference to the struts-config DTD.
What
> is the proper way to modify struts-config.xml to reference a locally
> defined DTD and where would that file normally reside in a standard Tomcat
> installation?
>
> Thanks.




Re: html action links

2001-06-22 Thread Ted Husted

If you just want to use html:link, you don't necessarily have to use an
ActionForm class (though you can, if you want). 

Here's some code for generating a list with links. Result is a bean that
exposes a collection named rows.



  

   



When the page renders, it generates links like this:

http://localhost/struts-stub/donor/View.do?key=123456";>123456

where there is a global forward "donor" with the path "/donor/View.do"

and row.getDonor() returns 123456

DHarty wrote:
> 
> This is really a two part question.
> 
> I have an iterative loop that displays a list users that are stored in
> Action Forms.  The idea is that when the button (or link) next to the item
> is selected, the user will be allowed to make modifications to the selected
> form:
> 
>   
>   
> 
> 
> 
> 
> 
> Modify
> 
> 
> 
>   
>   
> 
> Where "result" is a vector of ActionForms.
> 
> Currently, when the "Modify" button is selected, the appropriate action
> class is called, but the ActionForm is reset.
> 
> I know I could add a field to the submit button, i.e:
> 
> Modify  property="username"/>
> 
> and then have the action class look up the user in hte database again, but I
> would rather not.
> 
> I was considering using an html link instead of a button, but was unsure how
> to proceed.
> Ideally, I would like to use an html link, while retaining the existing form
> (without having to look it up again).
> 
> Any thoughts or comments would be appreciated.
> 
> Thnxs
> 
> David



Re: running struts in other application server

2001-06-22 Thread Ted Husted

There are additional instructions when required for several application
servers, but there should not be any general compatibility issues. I
have heard that Oracle9IAS is a repackaging of Orion. 

< http://jakarta.apache.org/struts/installation.html >

Here's a Javascript that I use when submitting my forms, in case it
helps you with yours. 



...


RE: Running Tomcat+Struts w/o internet connection

2001-06-22 Thread Liang Li

Of course you can use relative directory, and put the DTD file into your
war.

-Original Message-
From: Hartmut Bernecker [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 11:52 AM
To: [EMAIL PROTECTED]
Subject: Re: Running Tomcat+Struts w/o internet connection


Hi,

I think that problem has been fixed since Struts 1.0, but I'm not sure.
Do you have a new release from Struts?

The solution with "file://c:/..." is IMHO a problem if you want to
deploy your Application (e.g. in a war-File).
Who guarantees you, Tomcat or JRun or ... will be installed on Drive C?

Currently I have a similar problem: I have a XML-File (retrieved by
SOAP) and do parse it with Digester.
That is no problem. If I want to validate that Document, I do it by
writing the DTD-Reference into the XML-File
(  ) and by calling
digester.validate(true).
The Drawback is, that I must put that DTD in the tomcat/bin Directory,
otherwise it would **not** be found.

Then I tried to use the digester.register method. But it seems, I does
not work, as I want.
What I want is: To put the DTD file in some custom directory and use it
to validate the XML-File (that I get wrapped in in a SOAP Document).

Who knows, how to do that?

Cheers
Hartmut



Liang Li schrieb:
> 
> Open the struts-config.xml, change the head
> 
>"-//Apache Software Foundation//DTD Struts Configuration
1.0//EN"
>   "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
> 
> To:
> 
>"-//Apache Software Foundation//DTD Struts Configuration
1.0//EN"
>   "file://c:/{where_your_DTD_is}/struts-config_1_0.dtd">
> 
> I think that will work.
> 
> -Original Message-
> From: James Howe [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 22, 2001 10:30 AM
> To: [EMAIL PROTECTED]
> Subject: Running Tomcat+Struts w/o internet connection
> 
> We are trying to run Tomcat + Struts to run our web application without an
> external internet connection.  We are running into a problem because our
> struts-config.xml has an external reference to the struts-config DTD.
What
> is the proper way to modify struts-config.xml to reference a locally
> defined DTD and where would that file normally reside in a standard Tomcat
> installation?
> 
> Thanks.



Re: Running Tomcat+Struts w/o internet connection

2001-06-22 Thread Hartmut Bernecker

Hi,

I think that problem has been fixed since Struts 1.0, but I'm not sure.
Do you have a new release from Struts?

The solution with "file://c:/..." is IMHO a problem if you want to
deploy your Application (e.g. in a war-File).
Who guarantees you, Tomcat or JRun or ... will be installed on Drive C?

Currently I have a similar problem: I have a XML-File (retrieved by
SOAP) and do parse it with Digester.
That is no problem. If I want to validate that Document, I do it by
writing the DTD-Reference into the XML-File
(  ) and by calling
digester.validate(true).
The Drawback is, that I must put that DTD in the tomcat/bin Directory,
otherwise it would **not** be found.

Then I tried to use the digester.register method. But it seems, I does
not work, as I want.
What I want is: To put the DTD file in some custom directory and use it
to validate the XML-File (that I get wrapped in in a SOAP Document).

Who knows, how to do that?

Cheers
Hartmut



Liang Li schrieb:
> 
> Open the struts-config.xml, change the head
> 
>"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
>   "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
> 
> To:
> 
>"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
>   "file://c:/{where_your_DTD_is}/struts-config_1_0.dtd">
> 
> I think that will work.
> 
> -Original Message-
> From: James Howe [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 22, 2001 10:30 AM
> To: [EMAIL PROTECTED]
> Subject: Running Tomcat+Struts w/o internet connection
> 
> We are trying to run Tomcat + Struts to run our web application without an
> external internet connection.  We are running into a problem because our
> struts-config.xml has an external reference to the struts-config DTD.  What
> is the proper way to modify struts-config.xml to reference a locally
> defined DTD and where would that file normally reside in a standard Tomcat
> installation?
> 
> Thanks.



running struts in other application server

2001-06-22 Thread ihin

hi all

i have trouble in struts implementation

if i running my struts with tomcat, it's no error apear
but if i tray to running my struts using other application server like 
Oracle9IAS or J2EE
it's not running well.

is there any special setting to running struts in other aplication server 
specially in Oracle9IAS and J2EE ..? what is that...?

in other case i have trouble to implement java script in jsp tag that 
include struts
if i using  
and in the CheckLoOn fuction i declare "frmxx.submit();"
the browser give erorr alert.

how can i inplement the javascript in jsp+struts..?

thank's in advace
for all of response

regards

gohin 




RE: html action links

2001-06-22 Thread DHarty

The submit button in the first code snippet I posted should have read:

Modify

instead of:
Modify


I had used the "property" attribute when experimenting with usernames in the
button.

David

-Original Message-
From: DHarty [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 11:25 AM
To: [EMAIL PROTECTED]
Subject: html action links


This is really a two part question.

I have an iterative loop that displays a list users that are stored in
Action Forms.  The idea is that when the button (or link) next to the item
is selected, the user will be allowed to make modifications to the selected
form:

  
  





Modify



  
  

Where "result" is a vector of ActionForms.

Currently, when the "Modify" button is selected, the appropriate action
class is called, but the ActionForm is reset.

I know I could add a field to the submit button, i.e:

Modify 

and then have the action class look up the user in hte database again, but I
would rather not.

I was considering using an html link instead of a button, but was unsure how
to proceed.
Ideally, I would like to use an html link, while retaining the existing form
(without having to look it up again).

Any thoughts or comments would be appreciated.

Thnxs

David




html action links

2001-06-22 Thread DHarty

This is really a two part question.

I have an iterative loop that displays a list users that are stored in
Action Forms.  The idea is that when the button (or link) next to the item
is selected, the user will be allowed to make modifications to the selected
form:

  
  





Modify



  
  

Where "result" is a vector of ActionForms.

Currently, when the "Modify" button is selected, the appropriate action
class is called, but the ActionForm is reset.

I know I could add a field to the submit button, i.e:

Modify 

and then have the action class look up the user in hte database again, but I
would rather not.

I was considering using an html link instead of a button, but was unsure how
to proceed.
Ideally, I would like to use an html link, while retaining the existing form
(without having to look it up again).

Any thoughts or comments would be appreciated.

Thnxs

David




Re: Multibox confusion after reading Struts mail-archive

2001-06-22 Thread Becky Moyer

Steve!!! Thanks!!!
I just got it working!  I got my form working in the same fashion you had 
yours.  One of my problems had been with not importing the bean taglibs 
properly (as my face turns slightly red) and I had tried to put the empty 
values of one of the arrays in my form to be null when a box shouldn't get 
checked, and that was causing a null pointer.  Anyway, thanks SO MUCH for 
your replies, they helped a lot.
   Thanks again,
Becky


Original Message Follows
From: Steve A Drake <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: <[EMAIL PROTECTED]>
Subject: Re: Multibox confusion after reading Struts mail-archive
Date: Thu, 21 Jun 2001 15:05:38 -0600 (MDT)

On Thu, 21 Jun 2001, Becky Moyer wrote:

 > Steve,
 >Thanks so much for your reply, it gave me some more leads to follow.  
I
 > have been playing with this for the last 2 days...I have tried to change 
my
 > webapp to be similar to yours.

That could get ugly. =:]

 >  I made my form have 2 string arrays, but
 > when I try to iterate over my form as you have done in the example you 
gave,
 > I either had to iterate over one string array or the other, and when I 
tried
 > to specify the property in the multibox tag, it couldn't find the 
getter...I
 > am assuming that, in step with the example you gave, Struts is trying to 
do
 > a advancedQueryForm.getFindAssets().getSelectedAssets() for the multibox,
 > when I think you are saying it should be doing an
 > advancedQueryForm.getSelectedAssets().
 >I am still plodding along, but haven't made much progress.  Is there
 > something I'm missing?
 >Thanks,
 >Becky

  It sounds like you are getting close to what I'm using. I'm only
iterating over the String[] that contains all the possible values.
Values in the other String[] that match the array you are iterating
over will cause the checkboxes to be set to checked (but you don't need
to iterate over this second String[]). Also make sure the array you are
iterating over always contains all of the possible attributes, either by
saving it in session scope or repopulating it each time in request scope
(i.e., don't set it to null in reset()). In the ActionForm, I have:


 private String[] findAssets = null;
 private String[] selectedAssets = null;

/**
  * Get
  */
 public String[] getFindAssets() {
   return (this.findAssets);
 }
/**
  * Set
  *
  * @param
  */
 public void setFindAssets(String[] findAssets) {
   this.findAssets = findAssets;
 }


/**
  * Get
  */
 public String[] getSelectedAssets() {
   return (this.selectedAssets);
 }
/**
  * Set
  *
  * @param
  */
 public void setSelectedAssets(String[] selectedAssets) {
   this.selectedAssets = selectedAssets;
 }



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




RE: Running Tomcat+Struts w/o internet connection

2001-06-22 Thread Liang Li

Open the struts-config.xml, change the head

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

To:



I think that will work.

-Original Message-
From: James Howe [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 10:30 AM
To: [EMAIL PROTECTED]
Subject: Running Tomcat+Struts w/o internet connection


We are trying to run Tomcat + Struts to run our web application without an 
external internet connection.  We are running into a problem because our 
struts-config.xml has an external reference to the struts-config DTD.  What 
is the proper way to modify struts-config.xml to reference a locally 
defined DTD and where would that file normally reside in a standard Tomcat 
installation?

Thanks.



RE: Multiple Submit Buttons

2001-06-22 Thread DHarty

Yuri and John,

Thanks for your input.

I used the property method which is checked in the action class
successfully.

D

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 6:16 PM
To: [EMAIL PROTECTED]
Subject: Re: Multiple Submit Buttons


David,

Yes, it's possible, but unfortunately Struts won't help
you much in this case like it does with "cancel" or
single "submit" buttons. (please correct me, if I'm wrong)
Perform method of Action takes HttpServletRequest object as request and
you can execute its getParameter() method to find out which
button was pushed.

Best of luck,
Yuriy Zubarev


--- DHarty <[EMAIL PROTECTED]> wrote at 21 Jun 08:43 :

> Is it possible to use multiple  buttons in the same form,
and>
> provide a different action depending on which was hit?>
>
>   ex:>
>
>   Do something>
>   Do Something Else>
>   Do Yet Another Thing>
>
> I know you can check if the button is a cancel, but that only works if
you>
> have two alternatives.>
>
> I'm looking for a way in the Action class to see which button was hit.>
>
> Thnxs>
> David>




Running Tomcat+Struts w/o internet connection

2001-06-22 Thread James Howe

We are trying to run Tomcat + Struts to run our web application without an 
external internet connection.  We are running into a problem because our 
struts-config.xml has an external reference to the struts-config DTD.  What 
is the proper way to modify struts-config.xml to reference a locally 
defined DTD and where would that file normally reside in a standard Tomcat 
installation?

Thanks.




RE: set Servlet.log file

2001-06-22 Thread Jon.Ridgway

Hi Pranav,

I haven't seen anything in the API to programmatically set the servlet log
file. Nor is there anything in the web.xml. The file used and its location
will be container specific. 

I highly recommend the use of log4j
(http://jakarta.apache.org/log4j/docs/index.html) for logging (even with the
imminent inclusion of a logging API in the core of JDK/JRE 1.4). If you use
this API you have extensive control over where logging is sent and when.

Jon.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: 22 June 2001 14:58
To: [EMAIL PROTECTED]
Subject: set Servlet.log file

Is there any way to specify the servlet.log file without having to access
the 
servlet container's configuration files? One might need this because if one 
hosts ones site on a commercial server, one does not usually have access to
log 
files or configuration files.

Pranav

-- 
Get your firstname@lastname email for FREE at http://Nameplanet.com/?su



set Servlet.log file

2001-06-22 Thread pranav

Is there any way to specify the servlet.log file without having to access the 
servlet container's configuration files? One might need this because if one 
hosts ones site on a commercial server, one does not usually have access to log 
files or configuration files.

Pranav

-- 
Get your firstname@lastname email for FREE at http://Nameplanet.com/?su



RE: Invalidating sessions and container auth.

2001-06-22 Thread Jon.Ridgway

Hi,

I used the code below; the extra step may give the container a chance to
really invalidate the session before redirecting to the loggedOut.jsp. Your
action mapping looks the same(ish) as mine.

HttpSession session = request.getSession (false);

if (session != null)
{
session.invalidate();
}

Jon.

-Original Message-
From: Torsten Terp [mailto:[EMAIL PROTECTED]] 
Sent: 22 June 2001 14:37
To: [EMAIL PROTECTED]
Subject: RE: Invalidating sessions and container auth.

Hi,

I have the same problem (running Jetty as the servlet container)
Did you solve buy doing like below:





 

 


Unfurtunately this does not have any effect on my logout :-( All my logout
action does
is call session.invalidate(), is this how it works for you?

Thanks...

^terp

-Original Message-
From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 2:37 PM
To: [EMAIL PROTECTED]
Subject: RE: Invalidating sessions and container auth.


Hi All,

Just to let you know in case anyone ever has a similar problem, I found a
solution to the problem outlined below. Just had to add a
redirect="true" to the local forward in the ActionMapping for my
LogoutAction. I guess using a redirect forces the container auth
mechanism to check things.

Jon.

-Original Message-
From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
Sent: 21 June 2001 15:27
To: [EMAIL PROTECTED]
Subject: Invalidating sessions and container auth.

Hi All,

This isn't a struts specific question, but someone may have an answer...

I'm using form based auth in my Struts based app and I need an option to log
user out. Right now my LogoutAction perform method
calls request.getSession (false).invalidate(). The problem is that the
container (in this specific case Tomcat 3.2.1) doesn't
recognize that the user has been logged out. As no attempt is made to
re-auth them. Is there a standard Java way to log a user out
and force a container to re-auth ?

Jon.




RE: RE: WTE/Struts parser incompatibilities - pandoras box?

2001-06-22 Thread Jon.Ridgway

Hi,

It has been done both ways by various people on this list. Both seem to
work. So I guess it really doesn't matter. Juts a personal taste thing. 

Personally I have trodden all over IBM XML Parser ... project as I want the
latest versions of all org packages and I don't like the mix and match
implicit in bringing only some of the JAXP classes into VA.

Jon.

-Original Message-
From: dsf65b y b3763476b3 [mailto:[EMAIL PROTECTED]] 
Sent: 22 June 2001 12:41
To: [EMAIL PROTECTED]
Subject: RE: RE: WTE/Struts parser incompatibilities - pandoras box?

I'm aware that the actual name of the project doesn't matter!

What I tried to get across was that if I follow the instruction for 
installing a JAXP compatible parser found at:


http://www7.software.ibm.com/vad.nsf/Data/Document2558?OpenDocument&SubMast

I have to create open editions of the IBM's packages:

org.xml.sax
org.xml.sax.helpers

which are part of the project "IBM XML Parser for Java 2.0.15".

However, if I leave out *all* the packages starting with "org" when 
importing parser.jar
I don't have to do that and it still works! What are the ramifications, if 
any, of doing that?

Respectfully,
S. Bro

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



RE: Invalidating sessions and container auth.

2001-06-22 Thread Jon.Ridgway








Hi All,

 

Just to let you know in case anyone ever
has a similar problem, I found a solution to the problem outlined below. Just
had to add a redirect="true" to the local forward in the ActionMapping for my LogoutAction.
I guess using a redirect forces the container auth mechanism to check things.

 

Jon.

 

-Original Message-
From: Jon.Ridgway
[mailto:[EMAIL PROTECTED]] 
Sent: 21 June 2001 15:27
To: [EMAIL PROTECTED]
Subject: Invalidating sessions and
container auth.

 

Hi All,

 

This isn't a struts specific
question, but someone may have an answer...

 

I'm using form based auth in my
Struts based app and I need an option to log user out. Right now my
LogoutAction perform method calls request.getSession (false).invalidate(). The
problem is that the container (in this specific case Tomcat 3.2.1) doesn't
recognize that the user has been logged out. As no attempt is made to re-auth
them. Is there a standard Java way to log a user out and force a container to
re-auth ?

 

Jon.








Re: digester.addSetProperties("elemA/elemB");

2001-06-22 Thread Jonathan Asbell

Because it parsed it:

this
&<"
parsed becomes
&<"
after parsing. And the parser WILL parse it because it is an attribute. So,
if you want to end up with
&<"
use this
&amp;&lt;&quot;


- Original Message -
From: "Hartmut Bernecker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 22, 2001 6:14 AM
Subject: digester.addSetProperties("elemA/elemB");


> Hello,
>
>
> I want to use the Digester Class of STRUTS. The orignial XML-Document
> (here a snippet) is:
> 
> 
> 
>
>
> Now I call the folloging method:
> digester.addSetProperties("elemA/elemB");
>
>
> After parsing the result of the attr is:
> &<"
>
> Why? - I expect the following result:
> &<"
>
>
> Please Help!
> Hartmut
>




Re: IAS 6.0 SP2 and struts TAGLIB error

2001-06-22 Thread Matt Raible

It looks like you might be running iPlanet, if so,
make sure struts.jar is in your classpath in kregedit.
 Also, if you have any ActionClass or FormClasses that
you're calling from action, you'll need to make sure
the full path to
\iPlanet\ias6\...\APPS\...\WEB-INF\classes is in your
classpath.  It's a bug in iPlanet, but this workaround
works like a charm.  Let me know if you have any other
iPlanet issues, as I have spent a fair amount of time
getting struts to work on iPlanet.

Hope this helps,

Matt


--- "Brandon, Raymond"
<[EMAIL PROTECTED]> wrote:
> Hi everyone,
> 
> Does anyone recognize the error message below? It
> happens at runtime.
> 
> [20/Jun/2001 11:33:18:2] info:
> --
> [20/Jun/2001 11:33:22:2] info:
> --
> [20/Jun/2001 11:33:22:2] info: action: Setting
> locale 'en_US'
> [20/Jun/2001 11:33:22:2] info:
> --
> [20/Jun/2001 11:33:22:2] info:
> --
> [20/Jun/2001 11:33:22:2] info: action:  Looking for
> Action instance for
> class OrderSample.web.MyOrderSetProfileAction
> [20/Jun/2001 11:33:22:2] info:
> --
> [20/Jun/2001 11:33:22:2] info:
> --
> [20/Jun/2001 11:33:22:2] info: action:   Double
> checking for Action instance
> already there
> [20/Jun/2001 11:33:22:2] info:
> --
> [20/Jun/2001 11:33:22:2] info:
> --
> [20/Jun/2001 11:33:22:2] info: action:   Creating
> new Action instance
> [20/Jun/2001 11:33:22:2] info:
> --
> [20/Jun/2001 11:33:28:7] error: Exception:
> SERVLET-compile_failed: Failed in
> compiling template: /web/MyOrderQuery.jsp, JSP
> Error: Class was not found
> for :html 
> Exception Stack Trace: 
> java.lang.Exception: JSP Error: Class was not found
> for :html
>   at com.netscape.jsp.JSP.addTagdata(Unknown Source)
>   at com.netscape.jsp.JSP.parseUserTag(Unknown
> Source)
>   at com.netscape.jsp.JSP.parseTag(Unknown Source)
>   at com.netscape.jsp.JSP.parseNext(Unknown Source)
>   at com.netscape.jsp.JSP.parseBlock(Unknown Source)
>   at com.netscape.jsp.JSP.parse(Unknown Source)
>   at com.netscape.jsp.JSP.compile(Unknown Source)
>   at
>
com.netscape.server.servlet.jsp.JSPCompiler.JSPtoJava(Unknown
> Source)
>   at
>
com.netscape.server.servlet.jsp.JSPCompiler.compileJSP(Unknown
> Source)
>   at
>
com.netscape.server.servlet.jsp.JSPCompiler.compileOrLoadJSP(Unknown
> Source)
>   at
>
com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown
> Source)
>   at
>
com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown
> Source)
>   at
>
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callJsp
> Compiler(Unknown Source)
>   at
>
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callUri
> (Unknown Source)
>   at
>
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callUri
> RestrictOutput(Unknown Source)
>   at
>
com.netscape.server.servlet.platformhttp.PlatformRequestDispatcher.forward(U
> nknown Source)
>   at
>
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
> va:1697)
>   at
>
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1540)
>   at
>
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
>   at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>   at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
>   at
>
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
> Source)
>   at
>
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
> Source)
>   at com.kivasoft.applogic.AppLogic.execute(Unknown
> Source)
>   at com.kivasoft.applogic.AppLogic.execute(Unknown
> Source)
>   at com.kivasoft.thread.ThreadBasic.run(Native
> Method)
>   at java.lang.Thread.run(Thread.java:479)
> 
> 
> 
> Regards,
> 
> Raymond P. Brandon
>

> Software EngineerCompuware
> Europe BV
> Product Development 
> Hoogoorddreef 5
> Uniface Technology   P.O.Box
> 12933
> Mailto:[EMAIL PROTECTED]  1100 AX
> Amsterdam
>  The
> Netherlands
>  Tel: +31 -
> 20 - 3126510
>  Fax: +31 -
> 20 - 3116364
> 
> 


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE: RE: WTE/Struts parser incompatibilities - pandoras box?

2001-06-22 Thread dsf65b y b3763476b3

I'm aware that the actual name of the project doesn't matter!

What I tried to get across was that if I follow the instruction for 
installing a JAXP compatible parser found at:

http://www7.software.ibm.com/vad.nsf/Data/Document2558?OpenDocument&SubMast

I have to create open editions of the IBM's packages:

org.xml.sax
org.xml.sax.helpers

which are part of the project "IBM XML Parser for Java 2.0.15".

However, if I leave out *all* the packages starting with "org" when 
importing parser.jar
I don't have to do that and it still works! What are the ramifications, if 
any, of doing that?

Respectfully,
S. Bro

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




Setting target dynamically

2001-06-22 Thread Torsten Terp

Hi,

Im sorry if this has been asked before (i think it has but i cant find it)

Is it possible to set the target of a form, based on the result of the
processing in the Action, i.e., search went well target=bodyCenter,
search was empty target=inputSearch?

Thanks...

^terp






Re: URL encoding in and tags

2001-06-22 Thread Kief Morris

DUBOIS Fabrice typed the following on 11:34 AM 6/22/2001 +0200
>I don't understand why Struts's  and  tags encodes GIF's names 
>with session's ID ? 
>
>I am using : 
>*  tag with   
>*  tag with   
>*  standalone 
>in my JSP's pages. 
>
>For me, it seems to be useless to encode SRC attribute for those two tags since 
> and  encodes ACTION and PAGE attribute with session's ID.
>
>In the third case ( standalone), I really don't understand why session's ID 
>is added to image path ??? 

The session ID is encoded into a URL so that, when the URL is loaded
by the client, the servlet engine knows which session the client belongs
to. 

The action encoding of the form is used when the form is submitted.
The URL encoding of the image is used when the image is loaded.
These happen at different times, on different requests, so having the form 
action URL encoded doesn't help the image URL. The same presumably
goes for the link - the image is loaded as a different request from the
one where the user clicks the link, so each needs to have the session
ID encoded separately.

So then the question may be, why does an image URL need to have
the session ID encoded into it - since images are static content, the
server shouldn't care what session it belongs to. The answer is that
not all images are static, some images are generated by servlets,
so struts needs to support encoding the URL.

Disclaimer: I'm a struts newbie, I may be missing something.

Kief




digester.addSetProperties("elemA/elemB");

2001-06-22 Thread Hartmut Bernecker

Hello,


I want to use the Digester Class of STRUTS. The orignial XML-Document
(here a snippet) is:





Now I call the folloging method:
digester.addSetProperties("elemA/elemB");


After parsing the result of the attr is:
&<"

Why? - I expect the following result:
&<"


Please Help!
Hartmut



IAS 6.0 SP2 and struts TAGLIB error

2001-06-22 Thread Brandon, Raymond

Hi everyone,

Does anyone recognize the error message below? It happens at runtime.

[20/Jun/2001 11:33:18:2] info: --
[20/Jun/2001 11:33:22:2] info: --
[20/Jun/2001 11:33:22:2] info: action: Setting locale 'en_US'
[20/Jun/2001 11:33:22:2] info: --
[20/Jun/2001 11:33:22:2] info: --
[20/Jun/2001 11:33:22:2] info: action:  Looking for Action instance for
class OrderSample.web.MyOrderSetProfileAction
[20/Jun/2001 11:33:22:2] info: --
[20/Jun/2001 11:33:22:2] info: --
[20/Jun/2001 11:33:22:2] info: action:   Double checking for Action instance
already there
[20/Jun/2001 11:33:22:2] info: --
[20/Jun/2001 11:33:22:2] info: --
[20/Jun/2001 11:33:22:2] info: action:   Creating new Action instance
[20/Jun/2001 11:33:22:2] info: --
[20/Jun/2001 11:33:28:7] error: Exception: SERVLET-compile_failed: Failed in
compiling template: /web/MyOrderQuery.jsp, JSP Error: Class was not found
for :html 
Exception Stack Trace: 
java.lang.Exception: JSP Error: Class was not found for :html
at com.netscape.jsp.JSP.addTagdata(Unknown Source)
at com.netscape.jsp.JSP.parseUserTag(Unknown Source)
at com.netscape.jsp.JSP.parseTag(Unknown Source)
at com.netscape.jsp.JSP.parseNext(Unknown Source)
at com.netscape.jsp.JSP.parseBlock(Unknown Source)
at com.netscape.jsp.JSP.parse(Unknown Source)
at com.netscape.jsp.JSP.compile(Unknown Source)
at com.netscape.server.servlet.jsp.JSPCompiler.JSPtoJava(Unknown
Source)
at com.netscape.server.servlet.jsp.JSPCompiler.compileJSP(Unknown
Source)
at
com.netscape.server.servlet.jsp.JSPCompiler.compileOrLoadJSP(Unknown Source)
at
com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown Source)
at
com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown Source)
at
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callJsp
Compiler(Unknown Source)
at
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callUri
(Unknown Source)
at
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callUri
RestrictOutput(Unknown Source)
at
com.netscape.server.servlet.platformhttp.PlatformRequestDispatcher.forward(U
nknown Source)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
va:1697)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1540)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)



Regards,

Raymond P. Brandon

Software EngineerCompuware Europe BV
Product Development  Hoogoorddreef 5
Uniface Technology   P.O.Box 12933
Mailto:[EMAIL PROTECTED]  1100 AX Amsterdam
 The Netherlands
 Tel: +31 - 20 - 3126510
 Fax: +31 - 20 - 3116364





Build fails on

2001-06-22 Thread Kief Morris

Howdy, I'm trying to compile the struts build from CVS, and am
having major xml parser headaches. My base system is:

Win2000 SP2
Sun JDK 1.3.0-C
Ant 1.3.0 (bin)

For XML parser libraries I've tried JAXP 1.1 and Xerces 1.4.0, but I
can't seem to get Struts to compile with either one. In either case
it fails in line 186 of build.xml, which is the style task.

With Xerces I get a NoClassDefFoundError: javax/xml/transform/Source,
which is logical since xerces.jar doesn't contain this class. I gather Ant's

URL encoding in and tags

2001-06-22 Thread DUBOIS Fabrice
Title: URL encoding in  and  tags





Hi all,


First of all, I'm French so sorry for my English


I don't understand why Struts's  and  tags encodes GIF's names with session's ID ?


I am using :

 tag with 
 tag with 
 standalone

in my JSP's pages.


For me, it seems to be useless to encode SRC attribute for those two tags since  and  encodes ACTION and PAGE attribute with session's ID.

In the third case ( standalone), I really don't understand why session's ID is added to image path ???


Can someone explain me the goal of this ?


Thanks a lot
Fabrice







editable/view data within a JSP TABLE

2001-06-22 Thread Chuck Amadi


Hi , Can any one advice me on the following.
I am currently using ArgoUML for my object orientated design( deployment
and class diagram)
Firstly i have exstablished a connection (datasource URI) betweeen
PostgreSQL and Jakarta-tomcat (Container).Thus the identified data 
(UML Model) that has to be exchanged (Ms Access data source program) via
Ms Excel using the (comma separated values extension) thus data transfer
to PostgreSQL the destination program.The PostgreSql has been loaded to
our Server ( testing only).Hence the data is to be viewed within a table
format on JSP. So i need a JSP table that will sit on a white background
but we would HAVE a blue feel within the table though.
Any suggestions on the type of table format
Cheers Chuck
 
 
--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal â rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
 


RE: Struts & WebSphere Commerce Suite 5.1

2001-06-22 Thread Jon.Ridgway

Hi Chris,

Several people including myself have got Struts working with WebSphere
3.5.3. There are a number of things that need to be configured. Search the
archive for full details. See
http://www.mail-archive.com/struts-user@jakarta.apache.org/. Not sure about
Commerce Suite.

Jon.

-Original Message-
From: Christopher Benson [mailto:[EMAIL PROTECTED]] 
Sent: 22 June 2001 05:33
To: [EMAIL PROTECTED]
Subject: Struts & WebSphere Commerce Suite 5.1

Has anyone tried integrating Struts with WebSphere Application Server +
WebSphere Commerce Suite 5.1?  If so, what have your results been?  Success?
Failure?  Mixed?  I'm trying to talk the management of the company I work
for into going with Struts since it works on WebSphere, but it would have to
integrate with the Commerce Suite 5.1 as well.

Thanks,
Chris
[EMAIL PROTECTED]



RE: checkLogonTag question

2001-06-22 Thread Jon.Ridgway









Hi John,

 

You seem to have a number of problems.
Firstly, you are checking for a logon on the logon page. As you want yet have a
logon you will simply be returned to the same page. Not what you want ! Remove the checkLogon tag
from your logon page ! 

 

Jon

 

-Original Message-
From: John McClain
[mailto:[EMAIL PROTECTED]] 
Sent: 21 June 2001 19:05
To: [EMAIL PROTECTED]
Subject: checkLogonTag question

 



Howdy,





I took the example app, gutted it,
and am trying to piece it all together manually so that I understand what is
going on. All was going well till I got to the tag .
When I tried to bring up logon.jsp, I got into an infinite error loop. I am
enclosing the jsp page, the checklogontag.java AND the error output. Without
the checklogontag, the app works fine. It really is very simple at this point. 





Is there anyone out there that can
explain why the error AND, in the example app, why the 
is enclosed within a  tag? - does it have to be??? - the
code doesn't seem to suggest that, but I am getting this error...





help!





 





**  
logon.jsp   
<%@ page language="java" %>





 





<%@ taglib
uri="/WEB-INF/app.tld" prefix="app" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"
%>


 Logon with username "test" and password "test".





 





 





 






  Username: 
 
  Password: 
 
  
  
 
 





 





**  
CheckLogonTag.java    
/*
 * $Header:
/home/cvspublic/jakarta-struts/src/example/org/apache/struts/example/CheckLogonTag.java,v
1.5 2001/02/02 02:26:06 craigmcc Exp $
 * $Revision: 1.5 $
 * $Date: 2001/02/02 02:26: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 logon;





 






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





 






/**
 * Check for a valid User logged on in the current session.  If there
is no
 * such user, forward control to the logon page.
 *
 * @author Craig R. McClanahan
 * @author Marius Barduta
 * @version $Revision: 1.5 $ $Date: 2001/02/02 02:26:06 $
 */





 





dynamic help s for every page

2001-06-22 Thread Jakob Flierl

Hi,

Im trying to dynamically include some help messages in my JSP pages, e.g. I
want to write:

 Hilfe

on every page, so I can include the parameter "help = true" in my current
request. Therefore I've put this into my footer template JSP:

--- "include/footer.jsp" ---:

[...]

 
   ">help
   
 
 
   ">no help
   
 

[...]

---

But there's one problem with that solution: I've there's e.g. a registration
form, and the user presses the "help" link, the currently filled in form field
data get lost.

I know, that there's a solution to pass all currently set page parameters with
the  tag. However I wasn't able to get that work.

Could someone give me a short JSP code snippet on how to get all parameters
of the JSP into a Hashmap and additionally pass the "help=true" param to the
same JSP?

Thanks

 Jakob F.