dynamic help html:links 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:

 html:link page=%=request.getServletPath()%?help=trueHilfe/html:link

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 ---:

[...]

 logic:equal name=request property=help value=false
   html:link page=%= request.getServletPath() + \?help=true\ %help
   /html:link
 /logic:equal
 logic:notEqual name=request property=help value=false
   html:link page=%= request.getServletPath() + \?help=false\ %no help
   /html:link
 logic:notEqual

[...]

---

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 html:link 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.



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 app:checkLogon/.
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 app:checkLogon/
is enclosed within a logic:equal 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
%
html:errors/
app:checkLogon/
Logon with username test and password test.br
/br /











html:form action=logon.do












Username: html:text property=username /br
/

Password: html:password property=password
/br /


html:submit value=Logon /

/html:form











**
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
* http://www.apache.org/.
*
*/












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 

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]



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 dilwch bob copi.



URL encoding in html:image and html:img tags

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





Hi all,


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


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


I am using :

html:image tag with html:form
html:img tag with html:link
html:img standalone

in my JSP's pages.


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

In the third case (html:img 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







Build fails on style

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
style task doesn't work with xerces.

Fine, so I tried it with JAXP, but I get sealing violations. I tried different 
combinations of crimson.jar, jaxp.jar, and xalan.jar in my classpath; I put 
all 3 in, as instructed by JAXP's install.html, and then tried each by itself 
to see what happens. 

Anything that didn't include xalan.jar failed due to lack of the
org.apache.xalan.processor.TransformerFactoryImpl class. Anything that
did include xalan.jar failed with a sealing violation.

WITHOUT XALAN.JAR (partial):

javax.xml.transform.TransformerFactoryConfigurationError: 
java.lang.ClassNotFoundException: org.apache.xalan.processor.TransformerFactoryImpl
at 
javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:121)
at 
org.apache.tools.ant.taskdefs.optional.TraXLiaison.init(TraXLiaison.java:87)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at org.apache.tools.ant.taskdefs.XSLTProcess.setProcessor(XSLTProcess.java:231)

WITH XALAN.JAR:

compile.library:
[javac] Compiling 132 source files to C:\src\oss\struts\target\library\classes
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -deprecation for details.
 [copy] Copying 7 files to C:\src\oss\struts\target\library\classes
 [copy] Copying 3 files to C:\src\oss\struts\target\library
[style] Transforming into C:\src\oss\struts\target\library

BUILD FAILED

C:\src\oss\STRUTS\build.xml:186: java.lang.SecurityException: sealing violation
--- Nested Exception ---
java.lang.SecurityException: sealing violation
at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at 
javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:117)
at 
org.apache.tools.ant.taskdefs.optional.TraXLiaison.init(TraXLiaison.java:87)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at org.apache.tools.ant.taskdefs.XSLTProcess.setProcessor(XSLTProcess.java:231)
at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:137)
at org.apache.tools.ant.Target.execute(Target.java:153)
at org.apache.tools.ant.Project.runTarget(Project.java:898)
at org.apache.tools.ant.Project.executeTarget(Project.java:536)
at org.apache.tools.ant.Project.executeTargets(Project.java:510)
at org.apache.tools.ant.Main.runBuild(Main.java:421)

Does anybody have a spare clue?

Thanks,
Kief




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





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:
elemA
elemB attr=amp;amp;amp;lt;amp;quot;/
/elemA


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


After parsing the result of the attr is:
amp;lt;quot;

Why? - I expect the following result:
amp;amp;amp;lt;amp;quot;


Please Help!
Hartmut



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?OpenDocumentSubMast

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: 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?OpenDocumentSubMast

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,

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:

!-- logout --
action path=/logout
type=com.netmill.servicedatabase.bean.actions.LogoutAction
name=logoutForm
scope=request
input=/servicedatabase/logout.jsp
forward name=success  path=/servicedatabase/loggedOut.jsp
redirect=true/
/action
 

 


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.




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



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: Running Tomcat+Struts w/o internet connection

2001-06-22 Thread Liang Li

Open the struts-config.xml, change the head

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
  http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

To:

!DOCTYPE struts-config PUBLIC
  -//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: 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




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:

  logic:iterate id=user name=SearchForm property=result
  tr
html:form action=/usermodify
td align=center
bean:write name=user property=username/
/td
td align=center
html:submit property=usernameModify
/html:submit
/td
/html:form
  /tr
  /logic:iterate

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:

html:submit property=usernameModify bean:write
property=username//html:submit

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: html action links

2001-06-22 Thread DHarty

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

html:submitModify/html:submit

instead of:
html:submit property=usernameModify
/html:submit

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:

  logic:iterate id=user name=SearchForm property=result
  tr
html:form action=/usermodify
td align=center
bean:write name=user property=username/
/td
td align=center
html:submit property=usernameModify
/html:submit
/td
/html:form
  /tr
  /logic:iterate

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:

html:submit property=usernameModify bean:write
property=username//html:submit

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 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
( !DOCTYPE root SYSTEM xy.dtd ) 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
 
 !DOCTYPE struts-config PUBLIC
   -//Apache Software Foundation//DTD Struts Configuration
1.0//EN
   http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;
 
 To:
 
 !DOCTYPE struts-config PUBLIC
   -//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 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. 

html:form action=/stub/Insert focus=property0 onsubmit=return
submitForm(this);

...

script language=javascript
!--
function submitForm(form) {
  if (validateStubForm(form)) {
form.submit.value= ...; 
return true;
  } 
  else return false;
};
// --


ihin wrote:
 
 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  html:form action=/logon focus=userID
 onsubmit=CheckLogOn(this); return false;
 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

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



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.

logic:iterate name=result property=rows id=row
p
  html:link forward=donor paramName=row paramId=key
paramProperty=donor
bean:write name=row property=donor filter=true/
  /html:link 
/p
/logic:iterate

When the page renders, it generates links like this:

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

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:
 
   logic:iterate id=user name=SearchForm property=result
   tr
 html:form action=/usermodify
 td align=center
 bean:write name=user property=username/
 /td
 td align=center
 html:submit property=usernameModify
 /html:submit
 /td
 /html:form
   /tr
   /logic:iterate
 
 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:
 
 html:submit property=usernameModify bean:write
 property=username//html:submit
 
 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 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
( !DOCTYPE root SYSTEM xy.dtd ) 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

 !DOCTYPE struts-config PUBLIC
   -//Apache Software Foundation//DTD Struts Configuration
1.0//EN
   http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

 To:

 !DOCTYPE struts-config PUBLIC
   -//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: 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

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
  http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

To:

!DOCTYPE struts-config PUBLIC
  -//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 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. 
 
 html:form action=/stub/Insert focus=property0 onsubmit=return
 submitForm(this);
 
 ...
 
 script language=javascript
 !--
 function submitForm(form) {
   if (validateStubForm(form)) {
 form.submit.value= ...; 
 return true;
   } 
   else return false;
 };
 // --
 
 
 ihin wrote:
  
  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  html:form action=/logon focus=userID
  onsubmit=CheckLogOn(this); return false;
  and in the CheckLoOn fuction i declare frmxx.submit();
  the browser give erorr alert.
  

If your form has a submit button there can be a naming conflict between the
button and the javascript submit() function which might be the cause of your
problem. This has been discussed quite a bit recently. The simplest solution
appears to be to make sure any submit buttons are given a name that is not
'submit'. 

  how can i inplement the javascript in jsp+struts..?
  
  thank's in advace
  for all of response
  
  regards
  
  gohin
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Custom Software ~ Technical Services.
 -- Tel 716 737-3463.
 -- http://www.husted.com/about/struts/
 



RE: html action links

2001-06-22 Thread DHarty

Okay, I changed my page to look like this.

logic:iterate  name=SearchForm property=result id=user
tr
  td align=centerbean:write name=user
property=username/nbsp;/td
  td align=center
html:link forward=modifyUser paramName=user paramId=UserForm 
Modify
/html:link
/td
/tr
/logic:iterate

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 /path/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 bean:(define,include and parameter)../ 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.

logic:iterate name=result property=rows id=row
p
  html:link forward=donor paramName=row paramId=key
paramProperty=donor
bean:write name=row property=donor filter=true/
  /html:link
/p
/logic:iterate

When the page renders, it generates links like this:

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

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:

   logic:iterate id=user name=SearchForm property=result
   tr
 html:form action=/usermodify
 td align=center
 bean:write name=user property=username/
 /td
 td align=center
 html:submit property=usernameModify
 /html:submit
 /td
 /html:form
   /tr
   /logic:iterate

 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:

 html:submit property=usernameModify bean:write
 property=username//html:submit

 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: Build fails on style

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 style
  tag in it.

* Download and install JAXP 1.1's three jar files, and add them to
  the CLASSPATH environment variable used when you execute Ant.

* Make sure there are no other XML parsers on your CLASSPATH, or in
  your $JAVA_HOME/jre/lib/ext directory

I've never tried Ant's style task with Xerces, but would not be
surprised by problems.  You might try it with the Apache version of Xalan
(rather than the one that comes with JAXP).

Craig McClanahan




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: 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: 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: 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.
 
 logic:iterate  name=SearchForm property=result id=user
 tr
   td align=centerbean:write name=user
 property=username/nbsp;/td
   td align=center
 html:link forward=modifyUser paramName=user paramId=UserForm 
 Modify
 /html:link
 /td
 /tr
 /logic:iterate
 
 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 /path/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 bean:(define,include and parameter)../ 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.
 
 logic:iterate name=result property=rows id=row
 p
   html:link forward=donor paramName=row paramId=key
 paramProperty=donor
 bean:write name=row property=donor filter=true/
   /html:link
 /p
 /logic:iterate
 
 When the page renders, it generates links like this:
 
 a
 href=http://localhost/struts-stub/donor/View.do?key=123456;123456/a
 
 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:
 
logic:iterate id=user name=SearchForm property=result
tr
  html:form action=/usermodify
  td align=center
  bean:write name=user property=username/
  /td
  td align=center
  html:submit property=usernameModify
  /html:submit
  /td
  /html:form
/tr
/logic:iterate
 
  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:
 
  html:submit property=usernameModify bean:write
  property=username//html:submit
 
  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: 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%
html:html locale=false
html:errors/
html:form action=processNewEmployee.do
*First Name: html:text  property=firstName/BR
*Last Name: html:text  property=lastName/BR
*Phone Number: html:text  property=phoneNumber/BR
Office Number: html:text  property=officeNumber/BR
Backup: html:text  property=backup/BR
Backup Phone Number: html:text  property=backupPhoneNumber/BR
html:submit /
/html:form
/html:html

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




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: 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

 !DOCTYPE struts-config PUBLIC
   -//Apache Software Foundation//DTD Struts Configuration
1.0//EN
   http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

 To:

 !DOCTYPE struts-config PUBLIC
   -//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: 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 action entries in two respects:
   - Tell Struts to use your ActionMapping subclass instead of the
 standard one.
   - Configure the extra parameters with set-property elements
 
 action path=/myaction
className=com.mycompany.MyActionMapping
 type=com.mycompany.MyAction
 ... 
   set-property property=foo value=Value for property foo/
   set-property property=bar value=Value for property bar/
 /action
 
 * 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:
  
  init-param
param-name
  parameter
/param-name
param-value
  value
/param-value
  /init-param
  
  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/



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. 







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



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





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




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:

bean:message key=%= myBean.getLabel() %.label.header /

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: 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





Re: Dynamic label

2001-06-22 Thread Peter Alfors

try

bean:message key='%= myBean.getLabel() + .label.header %' /

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:

 bean:message key=%= myBean.getLabel() %.label.header /

 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




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: 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 action entries in two respects:
- Tell Struts to use your ActionMapping subclass instead of the
  standard one.
- Configure the extra parameters with set-property elements
  
  action path=/myaction
 className=com.mycompany.MyActionMapping
  type=com.mycompany.MyAction
  ... 
set-property property=foo value=Value for property foo/
set-property property=bar value=Value for property bar/
  /action
  
  * 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:
   
   init-param
 param-name
   parameter
 /param-name
 param-value
   value
 /param-value
   /init-param
   
   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/
 




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 action to tell Struts where
to send control back to after a validation failure?  See the action
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.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: 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
 
 



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





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.



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: 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





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