RE: Anyone have the Struts Validator example working?

2001-06-06 Thread DeVincentiis Giustino

Hi, 
The Orion documentation about the load-on-startup states that the optional
contents of these element must be an integer indicating the order in which
the servlet should be loaded.
Then if you use values like 1 (ActionServlet) and 2 (ValidatorServlet) or
any different values you want, it should work fine.

Anyway you better update to Orion 1.5.2: the new stable release.

Giustino De Vincentiis 

-Messaggio originale-
Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Inviato: martedì 5 giugno 2001 23.05
A: [EMAIL PROTECTED]
Oggetto: RE: Anyone have the Struts Validator example working?


My findings with the following settings:

==
load-on-startup=0 or 1
web.xml's setting definition sequence:
  1. validator servlet 
  2. strut action servlet
==
All registration example - javax.servlet.jsp.JspException: Cannot find
message resources under key org.apache.struts.action.MESSAGE
both change language example - javax.servlet.jsp.JspException: Cannot find
global ActionForward for name registration

==
load-on-startup=0 or 1
web.xml's servlet definition sequence:
  1. strut action servlet
  2. validator servlet 
==
Registration Example - input form can be displayed - error when save
java.lang.NullPointerException
at
com.wintecinc.struts.action.ValidatorForm.validate(ValidatorForm.java:123)

Registration with Javascript Validation and Server Validation - 
java.lang.NullPointerException
at
com.wintecinc.struts.taglib.html.JavascriptValidatorTag.doStartTag(Javascrip
tValidatorTag.java:174)

Multi-Part Registration Example with Javascript Validation and Server
Validation
java.lang.NullPointerException
at
com.wintecinc.struts.taglib.html.JavascriptValidatorTag.doStartTag(Javascrip
tValidatorTag.java:174)

Type Example validating some primitive numbers, a range on the integer, and
a date.  - input form can be displayed - error when save
java.lang.NullPointerException
at
com.wintecinc.struts.action.ValidatorForm.validate(ValidatorForm.java:123)

Both change language example - input from with correct lang. can be
displayed - error when save
java.lang.NullPointerException
at
com.wintecinc.struts.action.ValidatorForm.validate(ValidatorForm.java:123)

==
web.xml's servlet definition sequence:
  1. validator servletwith load-on-startup = 2
  2. strut action servlet with load-on-startup = 1
==

Everything works Fine 

Chris
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: June 5, 2001 2:32 PM
To: [EMAIL PROTECTED]
Subject: RE: Anyone have the Struts Validator example working?


I still have the following error when I tried to access
http://localhost/share/validator/registration.jsp:

500 Internal Server Error
javax.servlet.jsp.JspException: Cannot find message resources under key
org.apache.struts.action.MESSAGE
at
org.apache.struts.util.RequestUtils.message(RequestUtils.java:292)
at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:239)
at /registration.jsp._jspService(/registration.jsp.java:72) (JSP
page line 9)
at com.orionserver[Orion/1.5.2 (build
10460)].http.OrionHttpJspPage.service(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._ah._rad(Unknown Source)
at com.evermind[Orion/1.5.2 (build
10460)].server.http.JSPServlet.service(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._cxb._abe(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._cxb._uec(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._io._twc(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._io._gc(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._if.run(Unknown Source)

==
My Settings are as follow:
==
Orion: 1.5.2
[application.xml]
  web-module id=validator
path=../../../../dev/share/struts-validator/validator//
[default-web-site.xml]
  web-app application=default name=validator root=/share/validator/

validator.war: extracted from validator20010510.zip 
this war file is extracted and put in directory
../../../../dev/share/struts-validator/validator/

modify web.xml for load-on-startup value to 1 from 2 (already tried 0 too -
same error) as follows:
  !-- Validator Initialization Servlet Configuration --
  servlet
servlet-namevalidator/servlet-name
 
servlet-classcom.wintecinc.struts.action.ValidatorServlet/servlet-class
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/validation.xml/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
load-on-startup1/load-on-startup
  /servlet

  !-- Action Servlet Configuration --
  

Displaying the jsp forwarded by actionforward with the struts-form.tld

2001-06-06 Thread ameer



Im facing problem in displaying a forwarded jsp where in the form values 
are coming from the request attributes set in action class. im getting the 
attribute values but the struts-form tags are not getting converted to what it 
is supposed to. my jsp is like this .. the tag works fine for the first input 
jsp file . since it is just a submit form. but in my forwarded form i have 
submitted to the same servlet. can you suggest soln here . my jsp code goes like 
this for the forwarded page. 
**
%@ page language="java" %%@ taglib 
uri="/WEB-INF/struts-form.tld" prefix="form" %

htmltitleMusicCD 
Display/titlebody%out.println(request.getAttribute("ejbUpc"));out.println(request.getAttribute("ejbTitle"));out.println(request.getAttribute("ejbArtist"));out.println(request.getAttribute("ejbType"));out.println(request.getAttribute("ejbPrice"));%

form:form action="musiccd.do"table border="0" 
align="center" bgcolor="brown" 
tr td 
align="center" colspan="2"font face="Comic Sans 
MS" size="3" color="yellow"Music CD 
Details/font/td/trtrtdfont 
face="Comic Sans MS" size="3" color="white"CD 
#/font/tdtdform:text 
property="upc" value=%= request.getAttribute("ejbUpc") % maxlength="30" 
size="30" 
//td/trtrtdfont 
face="Comic Sans MS" size="3" 
color="white"Title/font/tdtdform:text 
property="title" value=%= request.getAttribute("ejbTitle") % 
maxlength="30" 
size="30"//td/trtrtdfont 
face="Comic Sans MS" size="3" 
color="white"Artist/font/tdtdform:text 
property="artist" value=%= request.getAttribute("ejbArtist") % 
maxlength="30" 
size="30"//td/trtrtdfont 
face="Comic Sans MS" size="3" 
color="white"Type/font/tdtdform:text 
property="type" value=%= request.getAttribute("ejbType") % 
maxlength="30" 
size="30"//td/trtrtdfont 
face="Comic Sans MS" size="3" 
color="white"Price/font/tdtdform:text 
property="price" value=%= request.getAttribute("ejbPrice") % 
maxlength="30" 
size="30"//td/trtrtd 
align="left"form:submit property="submit" 
value="Submit"//tdtd 
align="right"form:reset 
//td/tr/table/form:form/body/html


thanx in adv.
Ameer Hussain SSs/w engineerYashaa Infotech Pvt.Ltd.#14 , 10th 
Main, HAL 3rd StageBangalore 560075phone: 5294430/53 http://www.yashaa.com


Form based authentication

2001-06-06 Thread Srinivas_A_Nagalli/Singapore/Netlife%NETLIFE


Hi,

Has anyone used Form based authentication? How does action
=j_security_check work?

Thanks,
Nagalli



   
ameer
ameer@yashaaTo: Struts  
.com[EMAIL PROTECTED]  
 cc:   
06/06/01 Subject: Displaying the jsp   
03:01 PM forwarded by actionforward with the   
Please   struts-form.tld   
respond to 
struts-user
   
   




 Im facing problem in displaying a forwarded jsp where in the form values
 are coming from the request attributes set in action class. im getting the
 attribute values but the struts-form tags are not getting converted to
 what it is supposed to. my jsp is like this .. the tag works fine for the
 first input jsp file . since it is just a submit form. but in my forwarded
 form i have submitted to the same servlet. can you suggest soln here . my
 jsp code goes like this for the forwarded page.
 **
 %@ page language=java %
 %@ taglib uri=/WEB-INF/struts-form.tld prefix=form %

 html
 titleMusicCD Display/title
 body
 %
  out.println(request.getAttribute(ejbUpc));
  out.println(request.getAttribute(ejbTitle));
  out.println(request.getAttribute(ejbArtist));
  out.println(request.getAttribute(ejbType));
  out.println(request.getAttribute(ejbPrice));
 %

 form:form action=musiccd.do
 table border=0 align=center bgcolor=brown 
   tr
   td align=center colspan=2
font face=Comic Sans MS size=3 color=yellowMusic CD
 Details/font
/td
   /tr
   tr
td
 font face=Comic Sans MS size=3 color=whiteCD #/font
/td
td
form:text property=upc value=%= request.getAttribute(ejbUpc) %
 maxlength=30 size=30 /
/td
   /tr
   tr
td
font face=Comic Sans MS size=3 color=whiteTitle/font
/td
td
form:text property=title value=%= request.getAttribute(ejbTitle)
 % maxlength=30 size=30/
/td
   /tr
   tr
td
font face=Comic Sans MS size=3 color=whiteArtist/font
/td
td
form:text property=artist value=%= request.getAttribute
 (ejbArtist) % maxlength=30 size=30/
/td
   /tr
   tr
td
font face=Comic Sans MS size=3 color=whiteType/font
/td
td
form:text property=type value=%= request.getAttribute(ejbType) %
 maxlength=30 size=30/
/td
   /tr
   tr
td
font face=Comic Sans MS size=3 color=whitePrice/font
/td
td
form:text property=price value=%= request.getAttribute(ejbPrice)
 % maxlength=30 size=30/
/td
   /tr
   tr
td align=left
form:submit property=submit value=Submit/
/td
td align=right
form:reset /
/td
   /tr
 /table
 /form:form
 /body
 /html
 

 thanx in adv.
 Ameer Hussain SS
 s/w engineer
 Yashaa Infotech Pvt.Ltd.
 #14 , 10th Main, HAL 3rd Stage
 Bangalore 560075
 phone: 5294430/53
 http://www.yashaa.com






RE: logic:iterate or bean:write ERROR !!!

2001-06-06 Thread Waumans, Jef

Geoffrey,

Your code should be working, see my working code of an iterate in an iterate
both with bean:write functionality.

Regardes,

jef



-Original Message-
From: Geoffrey Van Nuffelen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 05 June, 2001 11:28
To: Struts-User (E-Mail)
Subject: logic:iterate or bean:write ERROR !!!


Hi all,

I always have a problem with the iterate and write tag.

If I don't specify a bean:write tag into an logic:iterate tag, I don't
have any error... But If a specify a write tag I have an exception error :

The error :
---
javax.servlet.ServletException: Cannot find bean client in scope null
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)
 at _0002fClientList_0002ejspClientList_jsp_66._jspService


My JSP :
-
...
logic:iterate id=client name=test property=clients
TR
TDbean:write name=client property=pmclient//TD
/TR
/logic:iterate
...
test is an object wich has a property clients (array of client ) and a
method getClients().  pmclient is a property of client ( the method
getPmclient() exist).

Is someone has a working example... I would be really happy !!!

Thanks,
Geoffrey...




 personList.jsp


a struts tag within another struts tag ...

2001-06-06 Thread Charlesworth, Chico


does anyone know a way of doing something like so, so that it works:

logic:iterate id=listElement name=myList
html:radio property=selectedListElement value=bean:write
name=listElement//
/logic:iterate

i always get a error saying that listElement has no value in that scope ...

i get around this problem using jsp, like so:

logic:iterate id=listElement name=myList
% String myListElement = (String)
pageContext.findAttribute(listElement);%
html:radio property=selectedListElement
value=%=myListElement%/
/logic:iterate

But I really don't want to be mixing jsp with struts ...

any ideas?

chico

-- 
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you receive this
in error, please notify Software AG immediately and delete this e-mail.

Software AG (UK) Limited
Registered in England  Wales 1310740
Registered Office: Hudson House, Hudson Way,
Pride Park, Derby DE24 8HS



RE: a struts tag within another struts tag ...

2001-06-06 Thread Jon.Ridgway

Hi Chico,

Not sure if it will work but try...

logic:iterate id=listElement name=myList
html:radio property=selectedListElement
bean:write name=listElement/
/html:radio
/logic:iterate

if this doesn't work a more elegant way to achieve your scriplet code would
be to use a bean:define.

Jon.

-Original Message-
From: Charlesworth, Chico [mailto:[EMAIL PROTECTED]] 
Sent: 06 June 2001 09:09
To: '[EMAIL PROTECTED]'
Subject: a struts tag within another struts tag ...


does anyone know a way of doing something like so, so that it works:

logic:iterate id=listElement name=myList
html:radio property=selectedListElement value=bean:write
name=listElement//
/logic:iterate

i always get a error saying that listElement has no value in that scope ...

i get around this problem using jsp, like so:

logic:iterate id=listElement name=myList
% String myListElement = (String)
pageContext.findAttribute(listElement);%
html:radio property=selectedListElement
value=%=myListElement%/
/logic:iterate

But I really don't want to be mixing jsp with struts ...

any ideas?

chico

-- 
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you receive this
in error, please notify Software AG immediately and delete this e-mail.

Software AG (UK) Limited
Registered in England  Wales 1310740
Registered Office: Hudson House, Hudson Way,
Pride Park, Derby DE24 8HS



RE: Form based authentication

2001-06-06 Thread Jon.Ridgway

Hi,

When using form based auth the web container will under take the auth using
the j_password  j_username supplied. So it all depends on which container
you are using. Tomcat for example allows you to map to a database containing
user and role info in the web.xml. You also have to specify a login and
error page in the web.xml. 

Jon.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] 
Sent: 06 June 2001 08:17
To: [EMAIL PROTECTED]
Subject: Form based authentication


Hi,

Has anyone used Form based authentication? How does action
=j_security_check work?

Thanks,
Nagalli




RE: Need help with Can't remove attributes from request scope probl em.

2001-06-06 Thread Jon.Ridgway

Hi Steve,

Try editing org.apache.struts.taglib.FormTag.doEndTag as follows : 

 
// Remove the page scope attributes we created
pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
pageContext.getRequest().removeAttribute(Constants.FORM_KEY);

Jon.

-Original Message-
From: Ritter, Steve [mailto:[EMAIL PROTECTED]] 
Sent: 05 June 2001 20:03
To: '[EMAIL PROTECTED]'
Subject: Need help with Can't remove attributes from request scope probl
em.

Hi everyone,

We ran into a problem running b2/b3 on Servletmill that others seem to have
hit with WTE.  It occurs when trying to access the login page from
struts-example, you get an IllegalArgumentException with message Can't
remove attributes from request scope.  It seems this thread discusses a
potential HACK to fix the issue.

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

The top-most posting in this thread indicates bugzilla id 932 which I
checked into:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=932

So, according to Craig the bug is really in the servlet container and it
would seem that my servlet container has the very same prolem.  What is
suggested work around for this?  Can someone help me with some more details
in the event that I need to speak with my container vendor?

--Steve



RE: a struts tag within another struts tag ...

2001-06-06 Thread Michael Mok

Hi Charlesworth

I think it should be more like this

logic:iterate id=listElement name=myList
html:radio name=listElement property=selectedListElement /
/logic:iterate

Regards

Michael Mok


-Original Message-
From: Charlesworth, Chico [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 6 June 2001 16:09
To: '[EMAIL PROTECTED]'
Subject: a struts tag within another struts tag ...



does anyone know a way of doing something like so, so that it works:

logic:iterate id=listElement name=myList
html:radio property=selectedListElement value=bean:write
name=listElement//
/logic:iterate

i always get a error saying that listElement has no value in that scope ...

i get around this problem using jsp, like so:

logic:iterate id=listElement name=myList
% String myListElement = (String)
pageContext.findAttribute(listElement);%
html:radio property=selectedListElement
value=%=myListElement%/
/logic:iterate

But I really don't want to be mixing jsp with struts ...

any ideas?

chico

--
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you receive this
in error, please notify Software AG immediately and delete this e-mail.

Software AG (UK) Limited
Registered in England  Wales 1310740
Registered Office: Hudson House, Hudson Way,
Pride Park, Derby DE24 8HS




RE: a struts tag within another struts tag ...

2001-06-06 Thread Charlesworth, Chico


Both suggestions don't work because the value attribute is mandatory, where
you get the error:

According to the TLD attribute value is mandatory for tag radio

what is really needed is a way of putting a struts bean value into the value
attribute of the radio tag without using jsp ...

any other suggestions?
chico

-Original Message-
From: Michael Mok [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 10:23 AM
To: [EMAIL PROTECTED]
Subject: RE: a struts tag within another struts tag ...


Hi Charlesworth

I think it should be more like this

logic:iterate id=listElement name=myList
html:radio name=listElement property=selectedListElement /
/logic:iterate

Regards

Michael Mok


-Original Message-
From: Charlesworth, Chico [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 6 June 2001 16:09
To: '[EMAIL PROTECTED]'
Subject: a struts tag within another struts tag ...



does anyone know a way of doing something like so, so that it works:

logic:iterate id=listElement name=myList
html:radio property=selectedListElement value=bean:write
name=listElement//
/logic:iterate

i always get a error saying that listElement has no value in that scope ...

i get around this problem using jsp, like so:

logic:iterate id=listElement name=myList
% String myListElement = (String)
pageContext.findAttribute(listElement);%
html:radio property=selectedListElement
value=%=myListElement%/
/logic:iterate

But I really don't want to be mixing jsp with struts ...

any ideas?

chico

--
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you receive this
in error, please notify Software AG immediately and delete this e-mail.

Software AG (UK) Limited
Registered in England  Wales 1310740
Registered Office: Hudson House, Hudson Way,
Pride Park, Derby DE24 8HS

-- 
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you receive this
in error, please notify Software AG immediately and delete this e-mail.

Software AG (UK) Limited
Registered in England  Wales 1310740
Registered Office: Hudson House, Hudson Way,
Pride Park, Derby DE24 8HS



Need your help -- Digester class

2001-06-06 Thread Hartmut Bernecker

Hi,

I want use the Digester class to populate some objects with XML-Data.
The Properties of the objects have not identical names to the
XML-Attributes.
Therefore I need a mapping.
Am I right, when I search for a solution with that statement:

**
digester.addSetProperty(test, email, mail);
**

Where test is the XML-element, email is the Property of my object on
top of the stack, and mail is the XML-attribute within the test-Tag
to be evaluated?

The XML-Source snippet is:


test mail=[EMAIL PROTECTED]/


Here is the debug-protocol when parsing the XML with the digester:

***
Set de.dhw.asim.components.benutzer.UserDaten property null to
[EMAIL PROTECTED]

***

Why is the property null?
What make I wrong??

_
Hartmut Bernecker
Druckhaus Waiblingen
Siemenstrasse 10
D-71332 Waiblingen, Germany
http://www.dhw.de/



Re: how does one invoke cascasde style sheets

2001-06-06 Thread William Jaynes

I put my style sheets in a directory at the top level of my web
application. For example in /tomcat/webapps/myapp/css. Then in the jsp I
reference it simply as

link rel=stylesheet href=css/templates.css charset=ISO-8859-1
type=text/css


- Original Message -
From: kuma.cra [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 05, 2001 8:00 PM
Subject: how does one invoke cascasde style sheets


 Hi ,folks thru struts i have been able to create / modify a taglib
from
 within netbeans v3.2 tomcat as the container (win98 OS )and connect to
a
 postgresql test database on lunix thanks all , anyway as a newbie
please
 could you point me in the right direction to how and where i set up my
 companies cascade style sheets for our look and feel on the jsp's as i
 preparing a project benchmark .

 1) do i create a resource directory beneath my webapps/WEB-INF dir.

 2) do i have to map it within the tld .

 Any suggestions welcomed as so far i have had excellant feedback from
 this community.

 Cheers all Chuck




Scratch RowSets

2001-06-06 Thread Ted Husted

The documentation for the Early Release of CachedRowSets mentions that 

Because both a CachedRowSet object and its metadata can be created from
scratch, a component
that acts as a factory for rowsets can use this capability to create a
rowset containing data from
non-SQL data sources.

has anyone here tried this yet?

The idea being I would like to transfer incoming properties from an
ActionForm into a scratch RowSet, and use that as the value object.
(Perhaps within a wrapper or a facade so business logic methods can be
added.)

There will be expanded support for RowSets in 1.1, and I wanted to get
started on some support utilities / design patterns before looking at
what other modifications will be needed. 

I put together a quick Iterate wrapper that works fine with a returned
RowSet, but also need to create a new RowSet from scratch to close the
loop. I guess the thing to try is to create a MetaDataRowSet object and
pass that to a new RowSet (instead of making the SQL call), and then see
if I can insert a row.

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



Please help with JDBC

2001-06-06 Thread Luna, Kat
Title: Please help with JDBC






Hi all, I'm having a lot of difficulty understanding the way Struts handles JDBC. I've got a MySQL database that I can access through JDBC from a standard Java class, so I know that my computer's configuration, classpath and drivers are all set properly, but as soon as I add the datasource to my struts-config.xml, I get the following error. When I run the DatabaseTest.java class from the command prompt it has no problem accessing the database, but obviously Struts or Tomcat or one of the parsers is not finding javax/sql/DataSource. Can anyone help me get this setup correct?

New org.apache.struts.util.GenericDataSource
java.lang.NoClassDefFoundError: javax/sql/DataSource
 at java.lang.ClassLoader.defineClass0(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
 at org.apache.tomcat.loader.AdaptiveClassLoader12.doDefineClass(AdaptiveClassLoader12.java:9
3)
 at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:509)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:120)
 at org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152)
 at org.apache.struts.digester.Digester.startElement(Digester.java:498)
 at org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.java:329)
 at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
 at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1170)


 at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1862)
 at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScan
ner.java:1238)
 at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
 at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:952)
 at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:143)
 at org.apache.struts.digester.Digester.parse(Digester.java:716)
 at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1301)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
 at javax.servlet.GenericServlet.init(GenericServlet.java:258)
 at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
 at org.apache.tomcat.core.Handler.init(Handler.java:215)
 at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
 at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.j
ava:130)
 at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
 at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
 at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
 at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
Begin event threw exception
java.lang.ClassNotFoundException: org/apache/struts/util/GenericDataSource
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:120)
 at org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152)
 at org.apache.struts.digester.Digester.startElement(Digester.java:498)
 at org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.java:329)
 at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
 at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1170)


 at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1862)
 at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScan
ner.java:1238)
 at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
 at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:952)
 at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
 at javax.xml.parsers.SAXParser.parse(SAXParser.java:143)
 at org.apache.struts.digester.Digester.parse(Digester.java:716)
 at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1301)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
 at javax.servlet.GenericServlet.init(GenericServlet.java:258)
 at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
 at org.apache.tomcat.core.Handler.init(Handler.java:215)
 at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
 at org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.j
ava:130)
 at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
 at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
 at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
 at 

RE: Please help with JDBC

2001-06-06 Thread Todd Story
Title: Please help with JDBC



Put 
jdbc2_0-stdext.jar in your %Tomcat%\lib directory and restart. That jar 
contains the appropriate DataSource class.

  -Original Message-From: Luna, Kat 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 06, 2001 8:42 
  AMTo: [EMAIL PROTECTED]Subject: Please help 
  with JDBC
  Hi all, I'm having a lot of difficulty understanding the way 
  Struts handles JDBC. I've got a MySQL database that I can access through 
  JDBC from a standard Java class, so I know that my computer's configuration, 
  classpath and drivers are all set properly, but as soon as I add the 
  datasource to my struts-config.xml, I get the following error. 
  When I run the DatabaseTest.java class from the command prompt it has no 
  problem accessing the database, but obviously Struts or Tomcat or one of the 
  parsers is not finding javax/sql/DataSource. Can anyone help me get this 
  setup correct?
  New org.apache.struts.util.GenericDataSource java.lang.NoClassDefFoundError: javax/sql/DataSource  at 
  java.lang.ClassLoader.defineClass0(Native Method)  at 
  java.lang.ClassLoader.defineClass(ClassLoader.java:486)  at 
  org.apache.tomcat.loader.AdaptiveClassLoader12.doDefineClass(AdaptiveClassLoader12.java:9 
  3)  at 
  org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:509) 
   at 
  java.lang.ClassLoader.loadClass(ClassLoader.java:253)  at 
  java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)  at 
  java.lang.Class.forName0(Native Method)  at 
  java.lang.Class.forName(Class.java:120)  at 
  org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152) 
   at 
  org.apache.struts.digester.Digester.startElement(Digester.java:498) 
   at 
  org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.java:329) 
   at 
  org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376) 
   at 
  org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1170) 
  
   at 
  org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1862) 
   at 
  org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScan 
  ner.java:1238)  at 
  org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381) 
   at 
  org.apache.xerces.framework.XMLParser.parse(XMLParser.java:952) 
   at 
  org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) 
   at 
  javax.xml.parsers.SAXParser.parse(SAXParser.java:345)  at 
  javax.xml.parsers.SAXParser.parse(SAXParser.java:143)  at 
  org.apache.struts.digester.Digester.parse(Digester.java:716)  at 
  org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1301) 
   at 
  org.apache.struts.action.ActionServlet.init(ActionServlet.java:465) 
   at 
  javax.servlet.GenericServlet.init(GenericServlet.java:258)  at 
  org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317) 
   at 
  org.apache.tomcat.core.Handler.init(Handler.java:215)  at 
  org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296) 
   at 
  org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.j 
  ava:130)  at 
  org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491) 
   at 
  org.apache.tomcat.core.ContextManager.init(ContextManager.java:453) 
   at 
  org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)  at 
  org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) Begin event threw exception java.lang.ClassNotFoundException: 
  org/apache/struts/util/GenericDataSource  at 
  java.lang.Class.forName0(Native Method)  at 
  java.lang.Class.forName(Class.java:120)  at 
  org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152) 
   at 
  org.apache.struts.digester.Digester.startElement(Digester.java:498) 
   at 
  org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.java:329) 
   at 
  org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376) 
   at 
  org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1170) 
  
   at 
  org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1862) 
   at 
  org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScan 
  ner.java:1238)  at 
  org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381) 
   at 
  org.apache.xerces.framework.XMLParser.parse(XMLParser.java:952) 
   at 
  org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) 
   at 
  javax.xml.parsers.SAXParser.parse(SAXParser.java:345)  at 
  javax.xml.parsers.SAXParser.parse(SAXParser.java:143)  at 
  org.apache.struts.digester.Digester.parse(Digester.java:716)  at 
  org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1301) 
   at 
  org.apache.struts.action.ActionServlet.init(ActionServlet.java:465) 
   at 
  

RE: Displaying the jsp forwarded by actionforward with the struts-form.tld

2001-06-06 Thread Nanduri, Amarnath






Replace the value=%= 
request.getAttribute("ejbTitle") % with value=' %= 
request.getAttribute("ejbTitle") % '

Note the use of single 
quotes. It should work.

cheers,
Amar..

  -Original Message-From: ameer 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 06, 2001 3:02 
  AMTo: StrutsSubject: Displaying the jsp forwarded by 
  actionforward with the struts-form.tld
  Im facing problem in displaying a forwarded jsp where in the form values 
  are coming from the request attributes set in action class. im getting the 
  attribute values but the struts-form tags are not getting converted to what it 
  is supposed to. my jsp is like this .. the tag works fine for the first input 
  jsp file . since it is just a submit form. but in my forwarded form i have 
  submitted to the same servlet. can you suggest soln here . my jsp code goes 
  like this for the forwarded page. 
  **
  %@ page language="java" %%@ taglib 
  uri="/WEB-INF/struts-form.tld" prefix="form" %
  
  htmltitleMusicCD 
  Display/titlebody%out.println(request.getAttribute("ejbUpc"));out.println(request.getAttribute("ejbTitle"));out.println(request.getAttribute("ejbArtist"));out.println(request.getAttribute("ejbType"));out.println(request.getAttribute("ejbPrice"));%
  
  form:form action="musiccd.do"table border="0" 
  align="center" bgcolor="brown" 
  tr td 
  align="center" colspan="2"font face="Comic Sans 
  MS" size="3" color="yellow"Music CD 
  Details/font/td/trtrtdfont 
  face="Comic Sans MS" size="3" color="white"CD 
  #/font/tdtdform:text 
  property="upc" value=%= request.getAttribute("ejbUpc") % 
  maxlength="30" size="30" 
  //td/trtrtdfont 
  face="Comic Sans MS" size="3" 
  color="white"Title/font/tdtdform:text 
  property="title" value=%= request.getAttribute("ejbTitle") % 
  maxlength="30" 
  size="30"//td/trtrtdfont 
  face="Comic Sans MS" size="3" 
  color="white"Artist/font/tdtdform:text 
  property="artist" value=%= request.getAttribute("ejbArtist") % 
  maxlength="30" 
  size="30"//td/trtrtdfont 
  face="Comic Sans MS" size="3" 
  color="white"Type/font/tdtdform:text 
  property="type" value=%= request.getAttribute("ejbType") % 
  maxlength="30" 
  size="30"//td/trtrtdfont 
  face="Comic Sans MS" size="3" 
  color="white"Price/font/tdtdform:text 
  property="price" value=%= request.getAttribute("ejbPrice") % 
  maxlength="30" 
  size="30"//td/trtrtd 
  align="left"form:submit property="submit" 
  value="Submit"//tdtd 
  align="right"form:reset 
  //td/tr/table/form:form/body/html
  
  
  thanx in adv.
  Ameer Hussain SSs/w engineerYashaa Infotech Pvt.Ltd.#14 , 
  10th Main, HAL 3rd StageBangalore 560075phone: 5294430/53 http://www.yashaa.com


Re: making src contributions

2001-06-06 Thread Jeff Trent

Thanks.  BTW, how does one achieve the envious title of commiter :^)?

- Original Message - 
From: Ted Husted [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 06, 2001 9:57 AM
Subject: Re: making src contributions


 Simple patches can be posted to Bugzilla and/or the Struts-Dev list.
 
 For an actual feature, you can open a thread on Struts-Dev about what
 you want to do. Based on what happens with that, you can submit a
 [PROPOSAL] message there detailing your plans, to see if anyone wants to
 help. Ultimately, post the source code to DEV or on a Web site someplace
 where others can try it out. 
 
 The committers can then [VOTE] as to whether it should be added to the
 public codebase. 
 
  Jeff Trent wrote:
  
  How does one go about proposing / making struts src contributions for
  next release?
 
 




template-taglib; nestes templates?

2001-06-06 Thread Pfingstl Gernot
Title: template-taglib; nestes templates?





Is it possible to use a template in a template?
I tried following:


I have a file /templates/main.jsp, which is the main layout for all pages
(header, content and footer area and a page title):


%-- main.jsp --%
%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %
html
head
 titletemplate:get name='title'//title
 meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
 link rel=stylesheet href="%=request.getContextPath()%/css/main.css" type=text/css
/head
body
table
tr valign='top' trtdtemplate:get name='header'//td/tr
   trtdtemplate:get name='content'//td/tr
   trtdtemplate:get name='footer'//td/tr
/table
/body
/html


Second step: I don't want to say all the time what header and footer to use, so I wrote other templates (which are based on /templates/main.jsp) which grouped some header and footer scenarios together. As an example I have /templates/layout1.jsp: 

%-- layout1.jsp --%
%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %
template:insert template='/templates/main.jsp'
 template:put name='header' content='/header.jsp'/
 template:put name='footer' content='/footer.jsp'/
 template:put name='title'template:get name='title1'//template:put
/template:insert


Third step: I have a JSP page, which uses layout1.jsp:


%-- page1.jsp --%
%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %
index1a
template:insert template='/templates/layout1.jsp'
 template:put name='title1' content='Templates/Layout1' direct='true'/ 
   %-- I use direct for testing only
 template:put name='content' content=/dok1.jsp direct='true' /
   %-- I use direct for testing only
/template:insert


If I call page1.jsp in the browser I get an exception (see below). 
If I change the line template:put name='title'template:get name='title1'//template:put
in layout1.jsp to template:put name='title'some static text/template:put everything goes right!
Can I use nested templates?
If yes, how can I use them?


The exception text:


500 Internal Server Error
/page1.jsp:


javax.servlet.ServletException: Exception thrown processing JSP page.
javax.servlet.jsp.JspException: Exception thrown processing JSP page.
 java.lang.Throwable(java.lang.String)
 java.lang.Exception(java.lang.String)
 javax.servlet.jsp.JspException(java.lang.String)
 int org.apache.struts.taglib.template.InsertTag.doEndTag()
 void jrun__index2ejspa._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

 void allaire.jrun.jsp.HttpJSPServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
 void allaire.jrun.servlet.JRunSE.service(javax.servlet.Servlet, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

 void allaire.jrun.servlet.JRunSE.runServlet(allaire.jrun.servlet.JRunChain, allaire.jrun.servlet.ForwardRequest, allaire.jrun.servlet.JRunResponse)

 void allaire.jrun.servlet.JRunNamedDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)

 void allaire.jrun.jsp.JSPServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
 void allaire.jrun.servlet.JRunSE.service(javax.servlet.Servlet, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

 void allaire.jrun.servlet.JRunSE.runServlet(allaire.jrun.servlet.JRunChain, allaire.jrun.servlet.ForwardRequest, allaire.jrun.servlet.JRunResponse)

 void allaire.jrun.servlet.JRunRequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)

 void allaire.jrun.servlet.JRunSE.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

 void allaire.jrun.servlet.JvmContext.dispatch(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

 void allaire.jrun.http.WebEndpoint.run()
 void allaire.jrun.ThreadPool.run(java.lang.Runnable)
 void allaire.jrun.WorkerThread.run()


Thank you,
Gernot





Fw: making src contributions

2001-06-06 Thread Jeff Trent

Nevermind, I found it.  Very anticlimatic.

- Original Message -
From: Jeff Trent [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 06, 2001 10:02 AM
Subject: Re: making src contributions


 Thanks.  BTW, how does one achieve the envious title of commiter :^)?

 - Original Message -
 From: Ted Husted [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, June 06, 2001 9:57 AM
 Subject: Re: making src contributions


  Simple patches can be posted to Bugzilla and/or the Struts-Dev list.
 
  For an actual feature, you can open a thread on Struts-Dev about what
  you want to do. Based on what happens with that, you can submit a
  [PROPOSAL] message there detailing your plans, to see if anyone wants to
  help. Ultimately, post the source code to DEV or on a Web site someplace
  where others can try it out.
 
  The committers can then [VOTE] as to whether it should be added to the
  public codebase.
 
   Jeff Trent wrote:
  
   How does one go about proposing / making struts src contributions for
   next release?
  
 





Q: How to add .props files to web.xml

2001-06-06 Thread Wes Bramhall

Sorry for being a complete newbie, but what is the XML for adding this file
to web.xml?

ApplicationResources.properties

Thanks much,
-Wes

-Original Message-
From: Manoj Deb [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 10:57 PM
To: [EMAIL PROTECTED]
Subject: RE: More help Plz: Exception thrown processing JSP page...


You can keep it in any dir in web tier, but there should be an entry in
web.xml.

Rgds,
Manoj




Compositing Actions

2001-06-06 Thread Andrew Jenkins

Is there a straightforward way to locate and invoke an Action from within
the perform() method of another Action?  The reason I would like to do this
is to create a composite Action from a number of other component
Actions--these component Actions must be available individually in the
Struts application, however I would like to provide a composite Action that
requires objects placed in the request attributes by the component Actions.

Thanks in advance,

--Andy

Andy Jenkins
Venetica Corporation (www.venetica.com)
Voice: 704.926.3080
[EMAIL PROTECTED]




Re: Q: How to add .props files to web.xml

2001-06-06 Thread Peter Alfors

To specify the application resources, you add the following to your web.xml
file...

servlet
...
  init-param
param-nameapplication/param-name
param-valuecom.myResources.ApplicationResources/param-value
  /init-param
...
/servlet

Pete

Wes Bramhall wrote:

 Sorry for being a complete newbie, but what is the XML for adding this file
 to web.xml?

 ApplicationResources.properties

 Thanks much,
 -Wes

 -Original Message-
 From: Manoj Deb [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 05, 2001 10:57 PM
 To: [EMAIL PROTECTED]
 Subject: RE: More help Plz: Exception thrown processing JSP page...

 You can keep it in any dir in web tier, but there should be an entry in
 web.xml.

 Rgds,
 Manoj




RE: How to add .props files to web.xml

2001-06-06 Thread Jon.Ridgway

Hi Manoj,

Note the application init-param below. So struts will look in
classes/net/itwa for the resource file in this example running under Tomcat.

Snip...

!-- Action Servlet Configuration --
  servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameapplication/param-name
  param-valuenet.itwa.ApplicationResources/param-value
/init-param
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
init-param
  param-namedetail/param-name
  param-value2/param-value
/init-param
init-param
  param-namevalidate/param-name
  param-valuetrue/param-value
/init-param
load-on-startup2/load-on-startup
  /servlet


  !-- Action Servlet Mapping --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping

Jon.

-Original Message-
From: Wes Bramhall [mailto:[EMAIL PROTECTED]] 
Sent: 06 June 2001 15:20
To: '[EMAIL PROTECTED]'
Subject: Q: How to add .props files to web.xml

Sorry for being a complete newbie, but what is the XML for adding this file
to web.xml?

ApplicationResources.properties

Thanks much,
-Wes

-Original Message-
From: Manoj Deb [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 10:57 PM
To: [EMAIL PROTECTED]
Subject: RE: More help Plz: Exception thrown processing JSP page...


You can keep it in any dir in web tier, but there should be an entry in
web.xml.

Rgds,
Manoj



RE: Need help with Can't remove attributes from request scope p robl em.

2001-06-06 Thread Ritter, Steve

Hi Jon, 

Thanks for the reply, I tried the recommended change to the source code and still I 
get the same error.

I've sent an email to my vendor's support group, in lieu of that is there anything 
else you would suggest?

--Steve

 -Original Message-
 From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 06, 2001 2:10 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Need help with Can't remove attributes from 
 request scope
 p robl em.
 
 
 Hi Steve,
 
 Try editing org.apache.struts.taglib.FormTag.doEndTag as follows : 
 
  
 // Remove the page scope attributes we created
 pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
 pageContext.getRequest().removeAttribute(Constants.FORM_KEY);
 
 Jon.
 
 -Original Message-
 From: Ritter, Steve [mailto:[EMAIL PROTECTED]] 
 Sent: 05 June 2001 20:03
 To: '[EMAIL PROTECTED]'
 Subject: Need help with Can't remove attributes from request 
 scope probl
 em.
 
 Hi everyone,
 
 We ran into a problem running b2/b3 on Servletmill that 
 others seem to have
 hit with WTE.  It occurs when trying to access the login page from
 struts-example, you get an IllegalArgumentException with 
 message Can't
 remove attributes from request scope.  It seems this thread 
 discusses a
 potential HACK to fix the issue.
 
 http://www.mail-archive.com/struts-user@jakarta.apache.org/msg
08663.html

The top-most posting in this thread indicates bugzilla id 932 which I
checked into:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=932

So, according to Craig the bug is really in the servlet container and it
would seem that my servlet container has the very same prolem.  What is
suggested work around for this?  Can someone help me with some more details
in the event that I need to speak with my container vendor?

--Steve



Nested logic:iterate tags

2001-06-06 Thread Marc S. Penner

Is it possible to nest logic:iterate tags?  I would prefer not to try to
spend too much time trying to do something that isn't possible.

Marc


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




invalid multipart request in beta 3

2001-06-06 Thread Peter Doyle

Hi,
 I recently changed from Struts b1 to b3. (I skipped b2) I have doe working
with b1 to handle uploading, based on the upload application that came with
struts. Since changed to b3 I get the following error:

javax.servlet.ServletException: MultipartIterator: invalid multipart request
data, doesn't start with boundary

I cannot find what has changed between struts b1 and b3 that would cause
this. I cannot find a way to resolve it. The code in my upload action
executes and finishes. Control is passed to the controller servlet where
this problem occurs.

I would appreciate any help

Thanks,
Peter



javax.servlet.ServletException: MultipartIterator: invalid multipart request
data, doesn't start with boundary
at
org.apache.struts.upload.MultipartIterator.parseRequest(MultipartIterator.ja
va:345)
at org.apache.struts.upload.MultipartIterator.(MultipartIterator.java:152)
at
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMulti
partRequestHandler.java:65)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
53)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
va:1758)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
at allaire.jrun.WorkerThread.run(WorkerThread.java:74)





--
__
Peter Doyle  TEO Media Ireland
[EMAIL PROTECTED] http://www.teomedia.com
Ph +353 1 888 1353  Fx +353 1 888 1354
Unit 8 Scotch Berth, North Wall, Dublin 1, Ireland
__




Re: Nested logic:iterate tags

2001-06-06 Thread Marc S. Penner

Apparently, it is.  I tried it and it worked quite easily.  Answered my own
question.

Marc

- Original Message -
From: Marc S. Penner [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 06, 2001 10:32 AM
Subject: Nested logic:iterate tags


 Is it possible to nest logic:iterate tags?  I would prefer not to try to
 spend too much time trying to do something that isn't possible.

 Marc


 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




RE: Nested logic:iterate tags

2001-06-06 Thread Charlesworth, Chico


yes it is possible, like so:

logic:iterate id=firstListElement name=firstList

logic:iterate id=secondListElement namesecondList

bean:write name=firstListElement
bean:write name=secondListElement

/logic:iterate

/logic:iterate

-Original Message-
From: Marc S. Penner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 3:33 PM
To: [EMAIL PROTECTED]
Subject: Nested logic:iterate tags


Is it possible to nest logic:iterate tags?  I would prefer not to try to
spend too much time trying to do something that isn't possible.

Marc


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

-- 
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you receive this
in error, please notify Software AG immediately and delete this e-mail.

Software AG (UK) Limited
Registered in England  Wales 1310740
Registered Office: Hudson House, Hudson Way,
Pride Park, Derby DE24 8HS



RE: Nested logic:iterate tags

2001-06-06 Thread Jon.Ridgway

Hi Marc,

Yes its possible, search the archive as I believe an example has been
posted. See http://www.mail-archive.com/struts-user@jakarta.apache.org/

Jon.

-Original Message-
From: Marc S. Penner [mailto:[EMAIL PROTECTED]] 
Sent: 06 June 2001 15:33
To: [EMAIL PROTECTED]
Subject: Nested logic:iterate tags

Is it possible to nest logic:iterate tags?  I would prefer not to try to
spend too much time trying to do something that isn't possible.

Marc


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



Re: Nested logic:iterate tags

2001-06-06 Thread jdware

Marc,
Here's a sample of nested iterate tags IterateForm.java and
TimeNavDblIter.jsp.
Thanks to Craig et al  it's a piece of cake.


john ware



/   TimeNavDblIter.jsp



!doctype html public -//w3c//dtd html 4.0 transitional//en
%@ page language=java import = com.jdware.beans.* %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
html:html


%
IterateForm instance = new IterateForm();
instance.setName( yeh baby );

 pageContext.setAttribute(instance, instance,
PageContext.PAGE_SCOPE);


%
html:form action=/time 


Name: bean:write name=instance property='%= name %' filter=true
/br/
Address  bean:write name=instance property='%= address %'
filter=true /br/
table border=1 width=100%
  trthType/ththSize/th
% int h = 0; %
logic:iterate name=instance property='%= foos[0].bars %'
id=anything
  th
bean:write name=instance property='%= foos[0].bars[ + h +
].date %' filter=true /
  /th
  % h++; %
/logic:iterate
  /tr
  tr
% int i = 0; %
  logic:iterate name=instance property=foos id=anything
  tr
td
  bean:write name=instance property='%= foos[ + i + ].type
%' filter=true /
/td
td
  bean:write name=instance property='%= foos[ + i + ].size
%' filter=true /
/td

  % int j = 0; %
  logic:iterate name=instance property='%= foos[ + i + ].bars
%'  id=anything
td
  html:text name=instance property='%= foos[ + i + ].bars[ +
j + ].hours %' filter=true /
/td
% j++; %
  /logic:iterate
  /tr
% i++; %
/logic:iterate

  /table
   html:submit/
/html:form
/html:html

//  end
TimeNavDblIter.jsp

// IterateForm.java

package com.jdware.beans;


import java.util.*;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
import com.jdware.util.Trace;


public class IterateForm  extends ActionForm {

public String name = TestMe;
public String address = Sischo Dr;
public IterateForm(){
foos = Foo.getFoosByMagic();
}

public static class Foo implements Comparable {
public String type;
public int size;
public Foo(){
type=foo;
size=0;
bars = Bar.getBarsByMagic();
}
public Foo( String type, int size ){
bars = Bar.getBarsByMagic();
this.type = type;
this.size = size;
}
public static ArrayList getFoosByMagic(){
ArrayList rtn = new ArrayList();
rtn.add( new Foo(typeA, 42));
rtn.add( new Foo(typeF, 2));
rtn.add( new Foo(typeW, 4));
rtn.add( new Foo(typeH, 0));
rtn.add( new Foo(typeX, 77));

return rtn;
}
public String getType(){return type;}
public void setType( String type ){ this.type = type; }

public int getSize(){ return size; }
public void setSize( int size ){ this.size = size; }
public int compareTo(Object o){
return type.compareTo( ((Foo)o).type );
}
public static class Bar implements Comparable{
/**
 *
 */
public String date;
public String getDate(){ return date; }
public void setDate( String date ){ this.date = date; }
/**
 *
 */
public String activity;
public String getActivity(){ return activity; }
public void setActivity( String activity ){ this.activity =
activity; }

/**
 *
 */
public double hours;
public double getHours(){ return hours; }
public void   setHours( double hours ) { this.hours = hours; }

public Bar(){
date = 8/5/50;
activity = nonsense;
hours = 8.5;
}
public Bar( String date, String activity, double hours ){
this.date = date;
this.activity = activity;
this.hours = hours;
}
public static ArrayList getBarsByMagic(){
ArrayList rtn = new ArrayList();
rtn.add( new Bar(4/3/54, chores, 8.5));
rtn.add( new Bar(2/5/85, hotguys, 0.5));
rtn.add( new Bar(6/4/88, battle, 3.5));
rtn.add( new Bar(8/5/50, fun, 18.5));
return rtn;
}
public int compareTo(Object o){
return date.compareTo( ((Bar)o).date );
}

RE: Need help with Can't remove attributes from request scope p robl em.

2001-06-06 Thread Jon.Ridgway

Hi Steve,

Do you have a stack trace for the error? It will tell us which Struts class
the exception is being thrown from, we can then figure out how to solve it
for your container.

Jon.

-Original Message-
From: Ritter, Steve [mailto:[EMAIL PROTECTED]] 
Sent: 06 June 2001 15:28
To: '[EMAIL PROTECTED]'
Subject: RE: Need help with Can't remove attributes from request scope p
robl em.

Hi Jon, 

Thanks for the reply, I tried the recommended change to the source code and
still I get the same error.

I've sent an email to my vendor's support group, in lieu of that is there
anything else you would suggest?

--Steve

 -Original Message-
 From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 06, 2001 2:10 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Need help with Can't remove attributes from 
 request scope
 p robl em.
 
 
 Hi Steve,
 
 Try editing org.apache.struts.taglib.FormTag.doEndTag as follows : 
 
  
 // Remove the page scope attributes we created
 pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
 pageContext.getRequest().removeAttribute(Constants.FORM_KEY);
 
 Jon.
 
 -Original Message-
 From: Ritter, Steve [mailto:[EMAIL PROTECTED]] 
 Sent: 05 June 2001 20:03
 To: '[EMAIL PROTECTED]'
 Subject: Need help with Can't remove attributes from request 
 scope probl
 em.
 
 Hi everyone,
 
 We ran into a problem running b2/b3 on Servletmill that 
 others seem to have
 hit with WTE.  It occurs when trying to access the login page from
 struts-example, you get an IllegalArgumentException with 
 message Can't
 remove attributes from request scope.  It seems this thread 
 discusses a
 potential HACK to fix the issue.
 
 http://www.mail-archive.com/struts-user@jakarta.apache.org/msg
08663.html

The top-most posting in this thread indicates bugzilla id 932 which I
checked into:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=932

So, according to Craig the bug is really in the servlet container and it
would seem that my servlet container has the very same prolem.  What is
suggested work around for this?  Can someone help me with some more details
in the event that I need to speak with my container vendor?

--Steve



setting boolean to yes/no

2001-06-06 Thread Alex Colic

Hi,

I have a form with a checkbox that sets a boolean property in one of my
classes. At a later page I display a msg if the user has selected the
checkbox and I get 'true' or 'false' displayed. What I am actually looking
for is a 'Yes' or 'No' to be displayed. Is there a clean way of getting the
boolean value and then converting it to the 'yes/no' and then displaying
them on a page?

Thanks for any help.

Alex

 Alex Colic.vcf


Re: Moving from Struts 1.0b1 to Struts 1.0b3

2001-06-06 Thread Biswas Amalendu

Graeme Miller,

As a solution you can have your controller do the validation instead of 
validating in the form bean. Let me know if you need any further help.

Thanks,
Amalendu Biswas.

From: Graeme Miller [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: Moving from Struts 1.0b1 to Struts 1.0b3
Date: Wed, 6 Jun 2001 18:07:59 +1200

As no-one has provided any thoughts on this one I thought I would repost 
and
give a bit more detail on how the error is being caused.

Problem: The validate(mapping, request) method on the ActionForm class is
not completing sucessfully in Struts 1.0b3 where it was in Struts 1.0b1.

Detail: This is a form that has a couple of struts file upload controls on
it (as well as text fields etc) so I suppose that might be related somehow.
The exception being thrown in the log is :-

java.lang.ClassCastException:
org.apache.struts.upload.MultipartRequestWrapper
 at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:144)
 at
org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:21
37)
 at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
 at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
 at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)

 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
 at java.lang.Thread.run(Thread.java:479)

Does anyone have any ideas?  This one has got me totally stumped and 
without
a solution we will have to remain on Struts 1.0b1.

Thanks in advance,

Graeme.

-Original Message-
From: Graeme Miller [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 5 June 2001 5:02 p.m.
To: '[EMAIL PROTECTED]'
Subject: Moving from Struts 1.0b1 to Struts 1.0b3


Currently having a problem with migrating code from using Struts 1.0b1 to
Struts 1.0b3

Everything seems to work fine apart from the fact that the validate methods
on our form beans (ie subclasses of org.apache.struts.action.ActionForm) no
longer get called successfully.  I have had a look through the release 
notes
and cannot find any reasons why these methods would no longer work.

Any ideas people?  The following error is what gets thrown in the tomcat
log.

java.lang.ClassCastException
 at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java, Compiled Code)
 at
org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java,
Compiled Code)
 at
org.apache.struts.action.ActionServlet.process(ActionServlet.java, Compiled
Code)
 at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java,
Compiled Code)
 at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
 at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java,
Compiled Code)
 at
org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled
Code)
 at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java, Com
piled Code)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
 at java.lang.Thread.run(Thread.java:479)

Thanks in advance.
Graeme.

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




RE: setting boolean to yes/no

2001-06-06 Thread Geddes, Mark (ANTS)

Write a tag.
I have a BooleanTag that displays an image (tick or cross).
You could modify it to show Yes/No

Here's the extract from the tld:

tag
nameboolean/name
tagclassants.servlets.taglib.BooleanTag/tagclass
bodycontentempty/bodycontent
attribute
namevalue/name
requiredtrue/required
rtexprvaluetrue/rtexprvalue
/attribute
attribute
nameshowFalse/name
requiredfalse/required
rtexprvaluefalse/rtexprvalue
/attribute
/tag

-Original Message-
From: Alex Colic [mailto:[EMAIL PROTECTED]]
Sent: 06 June 2001 16:11
To: Struts
Subject: setting boolean to yes/no


Hi,

I have a form with a checkbox that sets a boolean property in one of my
classes. At a later page I display a msg if the user has selected the
checkbox and I get 'true' or 'false' displayed. What I am actually looking
for is a 'Yes' or 'No' to be displayed. Is there a clean way of getting the
boolean value and then converting it to the 'yes/no' and then displaying
them on a page?

Thanks for any help.

Alex





***
This email message contains confidential information for the above addressee only.  If 
you are not the intended addressee you must not disclose or use the information in any 
manner whatsoever.

Any opinion or views contained in this email message are those of the sender, do not 
represent those of the Company in any way and reliance should not be placed upon its 
contents.

Unless otherwise stated this email message is not intended to be contractually 
binding.  Where an Agreement exists between our respective companies and there is 
conflict between the contents of this email message and the Agreement then the terms 
of that Agreement shall prevail.

Abbey National Treasury Services plc. Registered in England. Registered Office:  Abbey 
House, Baker Street, London NW1 6XL.  Company Registration No: 2338548.  Regulated by 
the SFA
***
 BooleanTag.java


RE: Need help with Can't remove attributes from request scope p robl em.

2001-06-06 Thread Ritter, Steve

Sure Jon, here is an excerpt from my servlet container log file -- I turned the 
verbocity way up and I'll give you all the context I can (a wide mail reader window 
works well here :) :

[06/06/2001 08:34:48 PDT] worker1::jsp: ServletPath: /registration.jsp
[06/06/2001 08:34:48 PDT] worker1::jsp: PathInfo: null
[06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path 
:/registration.jsp
[06/06/2001 08:34:48 PDT] worker1::jsp: RealPath: 
/u/sritter/powertier654/servletmill/contexts/struts-example/registration.jsp
[06/06/2001 08:34:48 PDT] worker1::jsp: RequestURI: /struts-example/registration.jsp
[06/06/2001 08:34:48 PDT] worker1::jsp: QueryString: action=Create
[06/06/2001 08:34:48 PDT] worker1::jsp: Request Params:
[06/06/2001 08:34:48 PDT] worker1::jsp:  action = Create
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = org.apache.tomcat.jsp_classpath
[06/06/2001 08:34:48 PDT] worker1:jsp: Classpath according to the init parameter is:
[06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path 
:/registration.jsp
[06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path 
:/registration.jsp
[06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path 
:/registration.jsp
[06/06/2001 08:34:48 PDT] worker1:jsp: Class name is: 
_0002fregistration_0002ejspregistration_jsp_0
[06/06/2001 08:34:48 PDT] worker1:getSession: session/sessionId  
null//struts-example.aak5b9008.1.3f8ec637463bb2c0
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = 
org.apache.struts.action.MAPPINGS
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = 
org.apache.struts.action.FORM_BEANS
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = 
org.apache.struts.action.SERVLET_MAPPING
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:49 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:49 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:49 PDT] worker1:getAttributes name = org.apache.struts.action.MESSAGE
[06/06/2001 08:34:49 PDT] worker1:ServletException was caught: cant remove Attributes 
from request scope
[06/06/2001 08:34:49 PDT] worker1:Dumping response headers
[06/06/2001 08:34:49 PDT] worker1:Dumping cookies
[06/06/2001 08:34:49 PDT] java.lang.IllegalArgumentException: cant remove Attributes 
from request scope
at 
org.apache.jasper.runtime.PageContextImpl.removeAttribute(PageContextImpl.java, 
Compiled Code)
at org.apache.struts.taglib.html.FormTag.doEndTag(FormTag.java, Compiled Code)
at 
_0002fregistration_0002ejspregistration_jsp_0._jspService(_0002fregistration_0002ejspregistration_jsp_0.java,
 Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java, Compiled 
Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java, 
Compiled Code)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java, 
Compiled Code)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at com.tenbasej.jmill.JMillConnection.run(JMillConnection.java, Compiled Code)
at com.tenbasej.jmill.JMillConnection.run(JMillConnection.java, Compiled Code)
at com.tenbasej.jmill.JMillThreadPool$WorkerThread.run(JMillThreadPool.java, 
Compiled Code)
[06/06/2001 08:34:49 PDT] worker2:Dumping response headers
[06/06/2001 08:34:49 PDT] worker2:Dumping cookies


Let me know if this helps.  Atleast I know my container is using Jasper!  I suppose I 
could look into updating my version of Jasper?

--Steve


 -Original Message-
 From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 06, 2001 8:05 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Need help with Can't remove attributes from 
 request scope
 p robl em.
 
 
 Hi Steve,
 
 Do you have a stack trace for the error? It will tell us 
 which Struts class
 the exception is being thrown from, we can then figure out 
 how to solve it
 for your container.
 
 Jon.
 
 -Original Message-
 From: Ritter, Steve [mailto:[EMAIL PROTECTED]] 
 Sent: 06 June 2001 15:28
 To: '[EMAIL PROTECTED]'
 Subject: RE: Need help with Can't remove attributes from 
 request scope p
 robl em.

Re: invalid multipart request in beta 3

2001-06-06 Thread Biswas Amalendu

Hi Peter,

I have a file upload program and I am using b3 and everything is working 
just fine. Would you make sure that you set the enctype to 
multipart/form-data on your form tag.

Thanks,
Amalendu Biswas.


From: Peter Doyle [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: invalid multipart request in beta 3
Date: Wed, 6 Jun 2001 15:44:58 +0100

Hi,
  I recently changed from Struts b1 to b3. (I skipped b2) I have doe 
working
with b1 to handle uploading, based on the upload application that came with
struts. Since changed to b3 I get the following error:

javax.servlet.ServletException: MultipartIterator: invalid multipart 
request
data, doesn't start with boundary

I cannot find what has changed between struts b1 and b3 that would cause
this. I cannot find a way to resolve it. The code in my upload action
executes and finishes. Control is passed to the controller servlet where
this problem occurs.

I would appreciate any help

Thanks,
Peter



javax.servlet.ServletException: MultipartIterator: invalid multipart 
request
data, doesn't start with boundary
   at
org.apache.struts.upload.MultipartIterator.parseRequest(MultipartIterator.ja
va:345)
   at org.apache.struts.upload.MultipartIterator.(MultipartIterator.java:152)
   at
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMulti
partRequestHandler.java:65)
   at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
   at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
53)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
   at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
   at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
   at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
   at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
   at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
va:1758)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
   at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
   at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
   at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
   at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
   at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
   at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
   at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
   at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
   at allaire.jrun.WorkerThread.run(WorkerThread.java:74)





--
__
Peter Doyle  TEO Media Ireland
[EMAIL PROTECTED] http://www.teomedia.com
Ph +353 1 888 1353  Fx +353 1 888 1354
Unit 8 Scotch Berth, North Wall, Dublin 1, Ireland
__


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




RE: setting boolean to yes/no

2001-06-06 Thread Jon.Ridgway

Hi Alex,

You can use a logic:equal tag to check result stored in your form. Then a
bean:message to display the appropriate Yes or No message.

Jon.



-Original Message-
From: Alex Colic [mailto:[EMAIL PROTECTED]] 
Sent: 06 June 2001 16:11
To: Struts
Subject: setting boolean to yes/no

Hi,

I have a form with a checkbox that sets a boolean property in one of my
classes. At a later page I display a msg if the user has selected the
checkbox and I get 'true' or 'false' displayed. What I am actually looking
for is a 'Yes' or 'No' to be displayed. Is there a clean way of getting the
boolean value and then converting it to the 'yes/no' and then displaying
them on a page?

Thanks for any help.

Alex



Re: setting boolean to yes/no

2001-06-06 Thread Biswas Amalendu

Hi Alex,

You may add an extra attribute(displayProperty) in your form bean and have 
it's get(getDisplayProperty) method generate the YES/NO based on the value 
of the checkbox property attribute that you already have and then use this 
new attribute (displayProperty) in your jsp to render YES/NO. Let me know if 
you need any further help.

Thanks,
Amalendu Biswas


From: Alex Colic [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Struts [EMAIL PROTECTED]
Subject: setting boolean to yes/no
Date: Wed, 6 Jun 2001 11:10:44 -0400

Hi,

I have a form with a checkbox that sets a boolean property in one of my
classes. At a later page I display a msg if the user has selected the
checkbox and I get 'true' or 'false' displayed. What I am actually looking
for is a 'Yes' or 'No' to be displayed. Is there a clean way of getting the
boolean value and then converting it to the 'yes/no' and then displaying
them on a page?

Thanks for any help.

Alex
 AlexColic.vcf 

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




RE: Nested logic:iterate tags

2001-06-06 Thread Amos Shapira

Hi,

I just had bad experience with ServletExec 3.0E and nested
iterate tags.  When I changed the inner iterate tag back to
scriptlets things startted working again (the code worked fine
under Tomcat 3.2.1).

Is anyone aware of problems with NewAtlanta's handling of custom
tags in general or Struts in particular?

My env:

1. Sun JDK 1.2.2_5/6
2. New Atlanta ServletExec 3.0E
3. Windows 2000 Professional or Sparc Solaris 2.6
4. Jakarta Struts and Jakarta Taglib

Thanks,

--Amos

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 5:59 PM
To: [EMAIL PROTECTED]
Subject: Re: Nested logic:iterate tags


Marc,
Here's a sample of nested iterate tags IterateForm.java and
TimeNavDblIter.jsp.
Thanks to Craig et al  it's a piece of cake.


john ware



/   TimeNavDblIter.jsp



!doctype html public -//w3c//dtd html 4.0 transitional//en
%@ page language=java import = com.jdware.beans.* %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
html:html


%
IterateForm instance = new IterateForm();
instance.setName( yeh baby );

 pageContext.setAttribute(instance, instance,
PageContext.PAGE_SCOPE);


%
html:form action=/time 


Name: bean:write name=instance property='%= name %' filter=true
/br/
Address  bean:write name=instance property='%= address %'
filter=true /br/
table border=1 width=100%
  trthType/ththSize/th
% int h = 0; %
logic:iterate name=instance property='%= foos[0].bars %'
id=anything
  th
bean:write name=instance property='%= foos[0].bars[ + h +
].date %' filter=true /
  /th
  % h++; %
/logic:iterate
  /tr
  tr
% int i = 0; %
  logic:iterate name=instance property=foos id=anything
  tr
td
  bean:write name=instance property='%= foos[ + i + ].type
%' filter=true /
/td
td
  bean:write name=instance property='%= foos[ + i + ].size
%' filter=true /
/td

  % int j = 0; %
  logic:iterate name=instance property='%= foos[ + i + ].bars
%'  id=anything
td
  html:text name=instance property='%= foos[ + i + ].bars[ +
j + ].hours %' filter=true /
/td
% j++; %
  /logic:iterate
  /tr
% i++; %
/logic:iterate

  /table
   html:submit/
/html:form
/html:html

//  end
TimeNavDblIter.jsp

// IterateForm.java

package com.jdware.beans;


import java.util.*;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
import com.jdware.util.Trace;


public class IterateForm  extends ActionForm {

public String name = TestMe;
public String address = Sischo Dr;
public IterateForm(){
foos = Foo.getFoosByMagic();
}

public static class Foo implements Comparable {
public String type;
public int size;
public Foo(){
type=foo;
size=0;
bars = Bar.getBarsByMagic();
}
public Foo( String type, int size ){
bars = Bar.getBarsByMagic();
this.type = type;
this.size = size;
}
public static ArrayList getFoosByMagic(){
ArrayList rtn = new ArrayList();
rtn.add( new Foo(typeA, 42));
rtn.add( new Foo(typeF, 2));
rtn.add( new Foo(typeW, 4));
rtn.add( new Foo(typeH, 0));
rtn.add( new Foo(typeX, 77));

return rtn;
}
public String getType(){return type;}
public void setType( String type ){ this.type = type; }

public int getSize(){ return size; }
public void setSize( int size ){ this.size = size; }
public int compareTo(Object o){
return type.compareTo( ((Foo)o).type );
}
public static class Bar implements Comparable{
/**
 *
 */
public String date;
public String getDate(){ return date; }
public void setDate( String date ){ this.date = date; }
/**
 *
 */
public String activity;
public String getActivity(){ return activity; }
public void setActivity( String activity ){ this.activity =
activity; }

/**
 *
 */
public double hours;
public double getHours(){ return hours; }
public void   setHours( double hours ) { this.hours = hours; }

public Bar(){
date = 8/5/50;
activity = nonsense;
hours = 8.5;
}
public Bar( 

RE: Need help with Can't remove attributes from request scope p robl em.

2001-06-06 Thread Jon.Ridgway

Hi Steve,

It has been suggested on this group before that updating Jasper is a more
elegant solution to this problem. So yes you might want to try this. As to
the stack trace; it confirms that the error occurs in FormTag.doEngTag. Are
you sure you are picking up the edited class? You might want to add some
debug to doEndTag.

Jon.

-Original Message-
From: Ritter, Steve [mailto:[EMAIL PROTECTED]] 
Sent: 06 June 2001 16:40
To: '[EMAIL PROTECTED]'
Subject: RE: Need help with Can't remove attributes from request scope p
robl em.

Sure Jon, here is an excerpt from my servlet container log file -- I turned
the verbocity way up and I'll give you all the context I can (a wide mail
reader window works well here :) :

[06/06/2001 08:34:48 PDT] worker1::jsp: ServletPath: /registration.jsp
[06/06/2001 08:34:48 PDT] worker1::jsp: PathInfo: null
[06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
:/registration.jsp
[06/06/2001 08:34:48 PDT] worker1::jsp: RealPath:
/u/sritter/powertier654/servletmill/contexts/struts-example/registration.jsp
[06/06/2001 08:34:48 PDT] worker1::jsp: RequestURI:
/struts-example/registration.jsp
[06/06/2001 08:34:48 PDT] worker1::jsp: QueryString: action=Create
[06/06/2001 08:34:48 PDT] worker1::jsp: Request Params:
[06/06/2001 08:34:48 PDT] worker1::jsp:  action = Create
[06/06/2001 08:34:48 PDT] worker1:getAttributes name =
org.apache.tomcat.jsp_classpath
[06/06/2001 08:34:48 PDT] worker1:jsp: Classpath according to the init
parameter is:
[06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
:/registration.jsp
[06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
:/registration.jsp
[06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
:/registration.jsp
[06/06/2001 08:34:48 PDT] worker1:jsp: Class name is:
_0002fregistration_0002ejspregistration_jsp_0
[06/06/2001 08:34:48 PDT] worker1:getSession: session/sessionId
null//struts-example.aak5b9008.1.3f8ec637463bb2c0
[06/06/2001 08:34:48 PDT] worker1:getAttributes name =
org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name =
org.apache.struts.action.MAPPINGS
[06/06/2001 08:34:48 PDT] worker1:getAttributes name =
org.apache.struts.action.FORM_BEANS
[06/06/2001 08:34:48 PDT] worker1:getAttributes name =
org.apache.struts.action.SERVLET_MAPPING
[06/06/2001 08:34:48 PDT] worker1:getAttributes name =
org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name =
org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name =
org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name =
org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name =
org.apache.struts.action.MESSAGE
[06/06/2001 08:34:48 PDT] worker1:getAttributes name =
org.apache.struts.action.MESSAGE
[06/06/2001 08:34:49 PDT] worker1:getAttributes name =
org.apache.struts.action.MESSAGE
[06/06/2001 08:34:49 PDT] worker1:getAttributes name =
org.apache.struts.action.MESSAGE
[06/06/2001 08:34:49 PDT] worker1:getAttributes name =
org.apache.struts.action.MESSAGE
[06/06/2001 08:34:49 PDT] worker1:ServletException was caught: cant remove
Attributes from request scope
[06/06/2001 08:34:49 PDT] worker1:Dumping response headers
[06/06/2001 08:34:49 PDT] worker1:Dumping cookies
[06/06/2001 08:34:49 PDT] java.lang.IllegalArgumentException: cant remove
Attributes from request scope
at
org.apache.jasper.runtime.PageContextImpl.removeAttribute(PageContextImpl.ja
va, Compiled Code)
at org.apache.struts.taglib.html.FormTag.doEndTag(FormTag.java,
Compiled Code)
at
_0002fregistration_0002ejspregistration_jsp_0._jspService(_0002fregistration
_0002ejspregistration_jsp_0.java, Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java,
Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled
Code)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va, Compiled Code)
at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java,
Compiled Code)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java,
Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled
Code)
at com.tenbasej.jmill.JMillConnection.run(JMillConnection.java,
Compiled Code)
at com.tenbasej.jmill.JMillConnection.run(JMillConnection.java,
Compiled Code)
at
com.tenbasej.jmill.JMillThreadPool$WorkerThread.run(JMillThreadPool.java,
Compiled Code)
[06/06/2001 08:34:49 PDT] worker2:Dumping response headers
[06/06/2001 08:34:49 PDT] worker2:Dumping cookies


Let me know if this helps.  Atleast I know my container is using Jasper!  I
suppose I could look into updating my version of Jasper?

--Steve


 -Original Message-
 From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 06, 2001 8:05 AM
 To: 

Re: template-taglib; nestes templates?

2001-06-06 Thread Cedric Dumoulin


  Check the Components proposal, you will certainly find what you need.

  Cedric

Components sites :
  http://www.lifl.fr/~dumoulin/components/
  (mirror) : http://www.geocities.com/cedricdumoulin/components/


Pfingstl Gernot wrote:



 Is it possible to use a template in a template?
 I tried following:

 I have a file /templates/main.jsp, which is the main layout for all
 pages
 (header, content and footer area and a page title):

 %-- main.jsp --%
 %@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template'
 %
 html
 head
 titletemplate:get name='title'//title
 meta http-equiv=Content-Type content=text/html;
 charset=iso-8859-1
 link rel=stylesheet
 href=%=request.getContextPath()%/css/main.css type=text/css
 /head
 body
 table
 tr valign='top'   trtdtemplate:get
 name='header'//td/tr
 trtdtemplate:get
 name='content'//td/tr
 trtdtemplate:get
 name='footer'//td/tr
 /table
 /body
 /html

 Second step: I don't want to say all the time what header and footer
 to use, so I wrote other templates (which are based on
 /templates/main.jsp) which grouped some header and footer scenarios
 together. As an example I have /templates/layout1.jsp:

 %-- layout1.jsp --%
 %@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template'
 %
 template:insert template='/templates/main.jsp'
 template:put name='header' content='/header.jsp'/
 template:put name='footer' content='/footer.jsp'/
 template:put name='title'template:get
 name='title1'//template:put
 /template:insert

 Third step: I have a JSP page, which uses layout1.jsp:

 %-- page1.jsp --%
 %@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template'
 %
 index1a
 template:insert template='/templates/layout1.jsp'
 template:put name='title1' content='Templates/Layout1'
 direct='true'/
 %-- I use
 direct for testing only
 template:put name='content' content=/dok1.jsp direct='true'
 /
 %-- I use
 direct for testing only
 /template:insert

 If I call page1.jsp in the browser I get an exception (see below).
 If I change the line template:put name='title'template:get
 name='title1'//template:put
 in layout1.jsp to template:put name='title'some static
 text/template:put everything goes right!
 Can I use nested templates?
 If yes, how can I use them?

 The exception text:

 500 Internal Server Error
 /page1.jsp:

 javax.servlet.ServletException: Exception thrown processing JSP page.
 javax.servlet.jsp.JspException: Exception thrown processing JSP page.
 java.lang.Throwable(java.lang.String)
 java.lang.Exception(java.lang.String)
 javax.servlet.jsp.JspException(java.lang.String)
 int org.apache.struts.taglib.template.InsertTag.doEndTag()
 void
 jrun__index2ejspa._jspService(javax.servlet.http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse)

 void
 allaire.jrun.jsp.HttpJSPServlet.service(javax.servlet.ServletRequest,
 javax.servlet.ServletResponse)
 void
 allaire.jrun.servlet.JRunSE.service(javax.servlet.Servlet,
 javax.servlet.http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse)

 void
 allaire.jrun.servlet.JRunSE.runServlet(allaire.jrun.servlet.JRunChain,
 allaire.jrun.servlet.ForwardRequest,
 allaire.jrun.servlet.JRunResponse)

 void
 allaire.jrun.servlet.JRunNamedDispatcher.forward(javax.servlet.ServletRequest,
 javax.servlet.ServletResponse)

 void
 allaire.jrun.jsp.JSPServlet.service(javax.servlet.ServletRequest,
 javax.servlet.ServletResponse)
 void
 allaire.jrun.servlet.JRunSE.service(javax.servlet.Servlet,
 javax.servlet.http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse)

 void
 allaire.jrun.servlet.JRunSE.runServlet(allaire.jrun.servlet.JRunChain,
 allaire.jrun.servlet.ForwardRequest,
 allaire.jrun.servlet.JRunResponse)

 void
 allaire.jrun.servlet.JRunRequestDispatcher.forward(javax.servlet.ServletRequest,
 javax.servlet.ServletResponse)

 void
 allaire.jrun.servlet.JRunSE.service(javax.servlet.http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse)

 void
 allaire.jrun.servlet.JvmContext.dispatch(javax.servlet.http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse)

 void allaire.jrun.http.WebEndpoint.run()
 void allaire.jrun.ThreadPool.run(java.lang.Runnable)
 void allaire.jrun.WorkerThread.run()

 Thank you,
 Gernot




html:file tag question

2001-06-06 Thread dhay



Hi everyone.

I was wondering if anyone know what will be submitted if I use the html:file tag
WITHOUT setting the enctype to multipart/form-data on my form tag?  A string?

I do not want to actually upload the file, just get the filename requested.

Many thanks,

Dave





RE: invalid multipart request in beta 3

2001-06-06 Thread Peter Doyle

The form tag uses enctype multipart/form-data. Uploading is not the
problem. The file uploads okay. When I forward to the next action I get the
error. I'm wondering if the request is wrapped in a Mulitpart request of
some kind.

Peter


-Original Message-
From: Biswas Amalendu [mailto:[EMAIL PROTECTED]]
Sent: 06 June 2001 16:42
To: [EMAIL PROTECTED]
Subject: Re: invalid multipart request in beta 3


Hi Peter,

I have a file upload program and I am using b3 and everything is working
just fine. Would you make sure that you set the enctype to
multipart/form-data on your form tag.

Thanks,
Amalendu Biswas.


From: Peter Doyle [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: invalid multipart request in beta 3
Date: Wed, 6 Jun 2001 15:44:58 +0100

Hi,
  I recently changed from Struts b1 to b3. (I skipped b2) I have doe
working
with b1 to handle uploading, based on the upload application that came with
struts. Since changed to b3 I get the following error:

javax.servlet.ServletException: MultipartIterator: invalid multipart
request
data, doesn't start with boundary

I cannot find what has changed between struts b1 and b3 that would cause
this. I cannot find a way to resolve it. The code in my upload action
executes and finishes. Control is passed to the controller servlet where
this problem occurs.

I would appreciate any help

Thanks,
Peter



javax.servlet.ServletException: MultipartIterator: invalid multipart
request
data, doesn't start with boundary
   at
org.apache.struts.upload.MultipartIterator.parseRequest(MultipartIterator.j
a
va:345)
   at org.apache.struts.upload.MultipartIterator.(MultipartIterator.java:152)
   at
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMult
i
partRequestHandler.java:65)
   at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
   at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:2
0
53)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
   at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
   at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
   at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
   at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.ja
v
a:88)
   at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.j
a
va:1758)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
   at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
   at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
   at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
   at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.ja
v
a:88)
   at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
   at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
   at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
   at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
   at allaire.jrun.WorkerThread.run(WorkerThread.java:74)





--
__
Peter Doyle  TEO Media Ireland
[EMAIL PROTECTED] http://www.teomedia.com
Ph +353 1 888 1353  Fx +353 1 888 1354
Unit 8 Scotch Berth, North Wall, Dublin 1, Ireland
__


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




RE: Need help with Can't remove attributes from request scope p robl em.

2001-06-06 Thread Roxie Rochat

Steve,
Daniel sent me the following instructions which helped get me over the
hurdle.
Hope it helps you too.
Roxie

-Original Message-
From: Daniel Benzimra-Ceuppens [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 6:38 PM
To: Roxie Rochat
Subject: RE: Form tag problem in VAJ 3.5.3 WTE with 1.0b2


I have:
 
1) both ...\WAS\struts-example\servlets AND ...\WAS\struts-example\web
are specified in my webapp's classpath;
 
2) my struts.jar, parser.jar  jaxp.jar files under
...\WAS\struts-example\servlets\;
 
3) I did not change the jar-file, but put the corrected class-file in
directory ..\WAS\struts-example\servlets\org\apache\struts\taglib\html\
 
Works fine (here anyhow).
 
Regards,
 
Daniel.

-Original Message-
From: Ritter, Steve [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 9:28 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Need help with Can't remove attributes from request scope
p robl em.


Hi Jon, 

Thanks for the reply, I tried the recommended change to the source code and
still I get the same error.

I've sent an email to my vendor's support group, in lieu of that is there
anything else you would suggest?

--Steve

 -Original Message-
 From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 06, 2001 2:10 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Need help with Can't remove attributes from 
 request scope
 p robl em.
 
 
 Hi Steve,
 
 Try editing org.apache.struts.taglib.FormTag.doEndTag as follows : 
 
  
 // Remove the page scope attributes we created
 pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
 pageContext.getRequest().removeAttribute(Constants.FORM_KEY);
 
 Jon.
 



RE: Need help with Can't remove attributes from request scope p robl em.

2001-06-06 Thread Ritter, Steve

Yeah I am sure, but notice that there are 2 FormTag classes, one directly in the 
taglib package and one in org.apache.struts.taglib.html.FormTag so we have:

org.apache.struts.taglib.FormTag
org.apache.struts.taglib.html.FormTag

so I changed both.  I also decompiled the only versions of these .class files on my 
servlet engine's path and found my mods.  So I am pretty sure the changes are being 
picked up.  I'll look into updating jasper.

--Steve

 -Original Message-
 From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 06, 2001 9:10 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Need help with Can't remove attributes from 
 request scope
 p robl em.
 
 
 Hi Steve,
 
 It has been suggested on this group before that updating 
 Jasper is a more
 elegant solution to this problem. So yes you might want to 
 try this. As to
 the stack trace; it confirms that the error occurs in 
 FormTag.doEngTag. Are
 you sure you are picking up the edited class? You might want 
 to add some
 debug to doEndTag.
 
 Jon.
 
 -Original Message-
 From: Ritter, Steve [mailto:[EMAIL PROTECTED]] 
 Sent: 06 June 2001 16:40
 To: '[EMAIL PROTECTED]'
 Subject: RE: Need help with Can't remove attributes from 
 request scope p
 robl em.
 
 Sure Jon, here is an excerpt from my servlet container log 
 file -- I turned
 the verbocity way up and I'll give you all the context I can 
 (a wide mail
 reader window works well here :) :
 
 [06/06/2001 08:34:48 PDT] worker1::jsp: ServletPath: /registration.jsp
 [06/06/2001 08:34:48 PDT] worker1::jsp: PathInfo: null
 [06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
 :/registration.jsp
 [06/06/2001 08:34:48 PDT] worker1::jsp: RealPath:
 /u/sritter/powertier654/servletmill/contexts/struts-example/re
 gistration.jsp
 [06/06/2001 08:34:48 PDT] worker1::jsp: RequestURI:
 /struts-example/registration.jsp
 [06/06/2001 08:34:48 PDT] worker1::jsp: QueryString: action=Create
 [06/06/2001 08:34:48 PDT] worker1::jsp: Request Params:
 [06/06/2001 08:34:48 PDT] worker1::jsp:  action = Create
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.tomcat.jsp_classpath
 [06/06/2001 08:34:48 PDT] worker1:jsp: Classpath according to the init
 parameter is:
 [06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
 :/registration.jsp
 [06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
 :/registration.jsp
 [06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
 :/registration.jsp
 [06/06/2001 08:34:48 PDT] worker1:jsp: Class name is:
 _0002fregistration_0002ejspregistration_jsp_0
 [06/06/2001 08:34:48 PDT] worker1:getSession: session/sessionId
 null//struts-example.aak5b9008.1.3f8ec637463bb2c0
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.MAPPINGS
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.FORM_BEANS
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.SERVLET_MAPPING
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:49 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:49 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:49 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:49 PDT] worker1:ServletException was 
 caught: cant remove
 Attributes from request scope
 [06/06/2001 08:34:49 PDT] worker1:Dumping response headers
 [06/06/2001 08:34:49 PDT] worker1:Dumping cookies
 [06/06/2001 08:34:49 PDT] java.lang.IllegalArgumentException: 
 cant remove
 Attributes from request scope
 at
 org.apache.jasper.runtime.PageContextImpl.removeAttribute(Page
 ContextImpl.ja
 va, Compiled Code)
 at 
 org.apache.struts.taglib.html.FormTag.doEndTag(FormTag.java,
 Compiled Code)
 at
 _0002fregistration_0002ejspregistration_jsp_0._jspService(_000
 2fregistration
 _0002ejspregistration_jsp_0.java, Compiled Code)
 at 
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java,
 Compiled Code)
 at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled
 Code)
 at
 org.apache.jasper.runtime.JspServlet$JspServletWrapper.service
 (JspServlet.ja
 va, Compiled Code)
 at
 org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java,
 Compiled Code)
 at 

RE: Need help with Can't remove attributes from request scope p robl em.

2001-06-06 Thread Ritter, Steve

Hi Jon, where can I get the correct version of Jasper?  I checked the Jakarta site but 
I don't see Jasper identified on its own.  Do I have to pull it out of Tomcat?  If so, 
which release?

--Steve

 -Original Message-
 From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 06, 2001 9:10 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Need help with Can't remove attributes from 
 request scope
 p robl em.
 
 
 Hi Steve,
 
 It has been suggested on this group before that updating 
 Jasper is a more
 elegant solution to this problem. So yes you might want to 
 try this. As to
 the stack trace; it confirms that the error occurs in 
 FormTag.doEngTag. Are
 you sure you are picking up the edited class? You might want 
 to add some
 debug to doEndTag.
 
 Jon.
 
 -Original Message-
 From: Ritter, Steve [mailto:[EMAIL PROTECTED]] 
 Sent: 06 June 2001 16:40
 To: '[EMAIL PROTECTED]'
 Subject: RE: Need help with Can't remove attributes from 
 request scope p
 robl em.
 
 Sure Jon, here is an excerpt from my servlet container log 
 file -- I turned
 the verbocity way up and I'll give you all the context I can 
 (a wide mail
 reader window works well here :) :
 
 [06/06/2001 08:34:48 PDT] worker1::jsp: ServletPath: /registration.jsp
 [06/06/2001 08:34:48 PDT] worker1::jsp: PathInfo: null
 [06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
 :/registration.jsp
 [06/06/2001 08:34:48 PDT] worker1::jsp: RealPath:
 /u/sritter/powertier654/servletmill/contexts/struts-example/re
 gistration.jsp
 [06/06/2001 08:34:48 PDT] worker1::jsp: RequestURI:
 /struts-example/registration.jsp
 [06/06/2001 08:34:48 PDT] worker1::jsp: QueryString: action=Create
 [06/06/2001 08:34:48 PDT] worker1::jsp: Request Params:
 [06/06/2001 08:34:48 PDT] worker1::jsp:  action = Create
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.tomcat.jsp_classpath
 [06/06/2001 08:34:48 PDT] worker1:jsp: Classpath according to the init
 parameter is:
 [06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
 :/registration.jsp
 [06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
 :/registration.jsp
 [06/06/2001 08:34:48 PDT] worker1:getRealPath: entered with this path
 :/registration.jsp
 [06/06/2001 08:34:48 PDT] worker1:jsp: Class name is:
 _0002fregistration_0002ejspregistration_jsp_0
 [06/06/2001 08:34:48 PDT] worker1:getSession: session/sessionId
 null//struts-example.aak5b9008.1.3f8ec637463bb2c0
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.MAPPINGS
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.FORM_BEANS
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.SERVLET_MAPPING
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:48 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:49 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:49 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:49 PDT] worker1:getAttributes name =
 org.apache.struts.action.MESSAGE
 [06/06/2001 08:34:49 PDT] worker1:ServletException was 
 caught: cant remove
 Attributes from request scope
 [06/06/2001 08:34:49 PDT] worker1:Dumping response headers
 [06/06/2001 08:34:49 PDT] worker1:Dumping cookies
 [06/06/2001 08:34:49 PDT] java.lang.IllegalArgumentException: 
 cant remove
 Attributes from request scope
 at
 org.apache.jasper.runtime.PageContextImpl.removeAttribute(Page
 ContextImpl.ja
 va, Compiled Code)
 at 
 org.apache.struts.taglib.html.FormTag.doEndTag(FormTag.java,
 Compiled Code)
 at
 _0002fregistration_0002ejspregistration_jsp_0._jspService(_000
 2fregistration
 _0002ejspregistration_jsp_0.java, Compiled Code)
 at 
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java,
 Compiled Code)
 at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled
 Code)
 at
 org.apache.jasper.runtime.JspServlet$JspServletWrapper.service
 (JspServlet.ja
 va, Compiled Code)
 at
 org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java,
 Compiled Code)
 at 
 org.apache.jasper.runtime.JspServlet.service(JspServlet.java,
 Compiled Code)
 at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled
 Code)
 at 
 com.tenbasej.jmill.JMillConnection.run(JMillConnection.java,
 Compiled 

bean:write Tag and polymorphic behavior

2001-06-06 Thread Nanduri, Amarnath

Hi my fellow Strutters,


got an interesting question for you all to ponder. I am using the tag

bean:write name=ABCForm property=superclassObject.key / in my jsp
pages.  


WILL THIS WORK ? Is struts smart enough to know that i am returning a
subclass and so can call its private variable using the getter method ? I
know that introspection is being performed inside. Some expert advise is
helpful...

I am enclosing the code for this..

public class ABCForm extends ActionForm
{

  public  SuperClass  getSuperClassObject()
  {
// basically it returns a Subclass upcasted to the superclass.
return  superclassObject ;
  }


}


 public  SuperClass
 {
   
 }


 public  SubClass extends  SuperClass
 {
   private String key ;

   public  String getKey()
   {
 return key ;
   }
 }  



RE: input in XML config

2001-06-06 Thread David Noll


Forget what I said last night about calling setInput() from the
ActionForm. Setting the input in the ActionForm's validate method
flagrantly violates Struts' MVC architecture; flow of control should
always be defined by the controller servlet and struts-config.xml. But
saving request scope variables as part of an ActionForm isn't always
an option. I think the best solution to Max's problem is to define the
input as the full path to the original action, then make sure that the
form coming from that page includes the necessary parameters to
recreate the original action page.

The following hypothetical situation should make this a bit clearer:

- You are running an online bookstore backed by a database. To display
  books you have defined an action as viewbook.do. The action takes
  one parameter, an ISBN, so the user ends up seeing the url
  http://server/viewbook.do?ISBN=123.

- On the book's page, you have a form asking users to rate the
  book. Part of the rating form uses a select box generated from a
  database of possible ratings (this list, all the possible ratings,
  is the kind of request scope variable that one would *not* want to
  store as part of a form; the list doesn't pertain to data the user
  entered, it merely defines *possible* input values).

- When the user submits the ratings form, an ActionForm validates the
  input. In struts-config, the input attribute for the save ratings
  action is defined as viewbook.do. Now suppose that the ratings
  ActionForm generates errors... in order for the view book action
  to successfully recreate the page that the ratings form was
  submitted from, it needs an ISBN parameter. The solution to that
  seems fairly simple--just drop in a hidden ISBN field in the ratings
  form.

What I don't like about this solution is that information essential to
successfully defining the flow of control--a parameter that is part of
the definition of the input page--has to be in an HTML form. Perhaps a
feature for Struts 1.1 could be a special input value that signified
use the form's HTTP referrer header, including all request
parameters, as the input for this form. Or, quite possibly, there is
an even more elegant solution that someone out there has discovered.

Cheers,
David

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 9:11 PM
To: [EMAIL PROTECTED]
Subject: Re: input in XML config


Could you create these request scope beans as properties of the
ActionForm?

David Noll wrote:

 Max,

 I don't know if it's the official way to do it, but in my ActionForm's
 validate() method, I call mapping.setInput() with the full path of the
 original Action. An important thing to note is that if your Action class
 pre-populates an ActionForm for the page, you should check for the
 ActionForm's existence before populating it.

 All that said, it does seem a bit cumbersome to go through all that merely
 to return to a dynamically generated input page if there are form errors.
 Does anyone on the list know of a cleaner way to achieve this?

 David

 --
 David Noll, Public Digital
 [EMAIL PROTECTED]

 -Original Message-
 From: LORENA MASSIMO [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 05, 2001 6:37 AM
 To: '[EMAIL PROTECTED]'
 Subject: input in XML config

 Hi,
 in an action mapping i'd like to reexecute the complete action instead of
a
 simple jsp when the validate method of the form fails, because i need to
 create some beans having request scope
 So my question is...
 Is it possible to have an action in the input fiele of a mapping instead
of
 a simple jsp?
 thanks Max




Where can I get the latest version of Jasper?

2001-06-06 Thread Ritter, Steve

Does anyone know how I get the latest version of Jasper?  Do I have to download Tomcat 
and if so which version?

Thanks in advance!!!

--Steve



Re: bean:write Tag and polymorphic behavior

2001-06-06 Thread David Winterfeldt

Struts uses reflection.  So if the method is there, it
will find it.  You will need a setter though for the
key method or it will generate errors.

Here is an excerpt from the PropertyUtils
documentation.

Utility methods for using Java Reflection APIs to
facilitate generic property getter and setter
operations on Java objects. Much of this code was
originally included in BeanUtils, but has been
separated because of the volume of code involved. 

In general, the objects that are examined and modified
using these methods are expected to conform to the
property getter and setter method naming conventions
described in the JavaBeans Specification (Version
1.0.1). No data type conversions are performed, and
there are no usage of any PropertyEditor classes that
have been registered, although a convenient way to
access the registered classes themselves is included. 

David
--- Nanduri, Amarnath
[EMAIL PROTECTED] wrote:
 Hi my fellow Strutters,
 
 
 got an interesting question for you all to
 ponder. I am using the tag
 
 bean:write name=ABCForm
 property=superclassObject.key / in my jsp
 pages.  
 
 
 WILL THIS WORK ? Is struts smart enough to know that
 i am returning a
 subclass and so can call its private variable using
 the getter method ? I
 know that introspection is being performed inside.
 Some expert advise is
 helpful...
 
 I am enclosing the code for this..
 
 public class ABCForm extends ActionForm
 {
 
   public  SuperClass  getSuperClassObject()
   {
 // basically it returns a Subclass upcasted to
 the superclass.
 return  superclassObject ;
   }
 
 
 }
 
 
  public  SuperClass
  {

  }
 
 
  public  SubClass extends  SuperClass
  {
private String key ;
 
public  String getKey()
{
  return key ;
}
  }  


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



Re: input in XML config

2001-06-06 Thread Jonathan

I for one dont even understand the value in the input value parameter.
There could be MANY pages that got you to the page you are on.  The input
value just makes one possible origin available for you to have as a return
target should things go fowl.  I had been saying on this discussion that
there should be more or less 4 different destinations:
1) where you came from (referrer, or if there is no referrer a default
page...see below)
2) where you were originally going when you were interrupted
3) a specific page - (can be success or failure page or could be the first
page in a form)
4) a default page


- Original Message -
From: David Noll [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 06, 2001 1:24 PM
Subject: RE: input in XML config



 Forget what I said last night about calling setInput() from the
 ActionForm. Setting the input in the ActionForm's validate method
 flagrantly violates Struts' MVC architecture; flow of control should
 always be defined by the controller servlet and struts-config.xml. But
 saving request scope variables as part of an ActionForm isn't always
 an option. I think the best solution to Max's problem is to define the
 input as the full path to the original action, then make sure that the
 form coming from that page includes the necessary parameters to
 recreate the original action page.

 The following hypothetical situation should make this a bit clearer:

 - You are running an online bookstore backed by a database. To display
   books you have defined an action as viewbook.do. The action takes
   one parameter, an ISBN, so the user ends up seeing the url
   http://server/viewbook.do?ISBN=123.

 - On the book's page, you have a form asking users to rate the
   book. Part of the rating form uses a select box generated from a
   database of possible ratings (this list, all the possible ratings,
   is the kind of request scope variable that one would *not* want to
   store as part of a form; the list doesn't pertain to data the user
   entered, it merely defines *possible* input values).

 - When the user submits the ratings form, an ActionForm validates the
   input. In struts-config, the input attribute for the save ratings
   action is defined as viewbook.do. Now suppose that the ratings
   ActionForm generates errors... in order for the view book action
   to successfully recreate the page that the ratings form was
   submitted from, it needs an ISBN parameter. The solution to that
   seems fairly simple--just drop in a hidden ISBN field in the ratings
   form.

 What I don't like about this solution is that information essential to
 successfully defining the flow of control--a parameter that is part of
 the definition of the input page--has to be in an HTML form. Perhaps a
 feature for Struts 1.1 could be a special input value that signified
 use the form's HTTP referrer header, including all request
 parameters, as the input for this form. Or, quite possibly, there is
 an even more elegant solution that someone out there has discovered.

 Cheers,
 David

 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 05, 2001 9:11 PM
 To: [EMAIL PROTECTED]
 Subject: Re: input in XML config


 Could you create these request scope beans as properties of the
 ActionForm?

 David Noll wrote:
 
  Max,
 
  I don't know if it's the official way to do it, but in my ActionForm's
  validate() method, I call mapping.setInput() with the full path of the
  original Action. An important thing to note is that if your Action class
  pre-populates an ActionForm for the page, you should check for the
  ActionForm's existence before populating it.
 
  All that said, it does seem a bit cumbersome to go through all that
merely
  to return to a dynamically generated input page if there are form
errors.
  Does anyone on the list know of a cleaner way to achieve this?
 
  David
 
  --
  David Noll, Public Digital
  [EMAIL PROTECTED]
 
  -Original Message-
  From: LORENA MASSIMO [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, June 05, 2001 6:37 AM
  To: '[EMAIL PROTECTED]'
  Subject: input in XML config
 
  Hi,
  in an action mapping i'd like to reexecute the complete action instead
of
 a
  simple jsp when the validate method of the form fails, because i need to
  create some beans having request scope
  So my question is...
  Is it possible to have an action in the input fiele of a mapping instead
 of
  a simple jsp?
  thanks Max





RE: bean:write Tag and polymorphic behavior

2001-06-06 Thread Nanduri, Amarnath

David,

 Thanks for the info. I do have the setters. Too lazy to include them in
my actual mail.

cheers,
Amar..

-Original Message-
From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 2:18 PM
To: [EMAIL PROTECTED]
Subject: Re: bean:write Tag and polymorphic behavior


Struts uses reflection.  So if the method is there, it
will find it.  You will need a setter though for the
key method or it will generate errors.

Here is an excerpt from the PropertyUtils
documentation.

Utility methods for using Java Reflection APIs to
facilitate generic property getter and setter
operations on Java objects. Much of this code was
originally included in BeanUtils, but has been
separated because of the volume of code involved. 

In general, the objects that are examined and modified
using these methods are expected to conform to the
property getter and setter method naming conventions
described in the JavaBeans Specification (Version
1.0.1). No data type conversions are performed, and
there are no usage of any PropertyEditor classes that
have been registered, although a convenient way to
access the registered classes themselves is included. 

David
--- Nanduri, Amarnath
[EMAIL PROTECTED] wrote:
 Hi my fellow Strutters,
 
 
 got an interesting question for you all to
 ponder. I am using the tag
 
 bean:write name=ABCForm
 property=superclassObject.key / in my jsp
 pages.  
 
 
 WILL THIS WORK ? Is struts smart enough to know that
 i am returning a
 subclass and so can call its private variable using
 the getter method ? I
 know that introspection is being performed inside.
 Some expert advise is
 helpful...
 
 I am enclosing the code for this..
 
 public class ABCForm extends ActionForm
 {
 
   public  SuperClass  getSuperClassObject()
   {
 // basically it returns a Subclass upcasted to
 the superclass.
 return  superclassObject ;
   }
 
 
 }
 
 
  public  SuperClass
  {

  }
 
 
  public  SubClass extends  SuperClass
  {
private String key ;
 
public  String getKey()
{
  return key ;
}
  }  


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



Re: Getting values from ActionForm bean

2001-06-06 Thread Shannon Moschetti

Boy, I thought for sure that someone would have a suggestion for me 
concerning this question.  Is more information needed?

Shannon Moschetti wrote:

 Sorry... the error generated from my JSP is as follows, and not the 
 error included in the original message:
 
 javax.servlet.jsp.JspException: No getter method available for 
 property customers for bean under name null
   at 
 org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:338)
   at 
 org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:234)
   at 
 jsp_servlet._content._managerstart._jspService(_managerstart.java:337)
   at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
   at 
 weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213) 
 
   at 
 weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:246) 
 
   at 
 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
 
 
   at 
 weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1622) 
 
   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
 
 
 Shannon Moschetti wrote:
 
 I'm new to struts and would like to get a handle on a few things.  I 
 made certain to search the archives for an answer to my current 
 problem, but was unable to find an answer.  So I post my question here.
 
 I have an ActionForm in which I added a method that queries a 
 database and gets a name/id pair and adds them to a hashtable.  On 
 creation of the form(in the JSP associated with the ActionForm class) 
 I want to populate a combobox on the form with values from the 
 hashtable.  Here's what I tried, and the results of the code:
 
 JSP
   html:select property=customer size=1
   html:options property=customers/ labelName=value 
 labelProperty=key
   /html:select
 
 ActionForm
 public Hashtable getCustomers(){
   // query database, build hashtable
   return hash;
 }
 
 The ActionForm is a request scope bean, as specified in struts-config.
 Here's the error I get:
 javax.servlet.jsp.JspException: Cannot find bean exportForm in scope 
 request
   at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:486)
   at 
 org.apache.struts.taglib.bean.DefineTag.doStartTag(DefineTag.java:200)
   at 
 jsp_servlet._content._managerstart._jspService(_managerstart.java:297)
   at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
   at 
 weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213) 
 
   at 
 weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:246) 
 
   at 
 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
 
 
   at 
 weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1622) 
 
   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
 
 
 
 
 
 




Pleeeeease help me using the Digester-Class of STRUTS

2001-06-06 Thread Hartmut Bernecker

Hello,


it seems that the Digester Class of Struts is a strange thing.
I take the following XML-Document (in a String):

?xml version=1.0 encoding=UTF-8?
login usr=Benutzername
   hilfe=true
   rn=Hartmut Bernecker
   mail=[EMAIL PROTECTED]
   txt=Persoenlicher Begruessungstext des Benutzers
   spr=de
   med=medium
  grp name=Gruppe 1 txt=Begruessungstext 1/grp
  grp name=Gruppe 2 txt=Begruessungstext 2/grp
/login

--


Then I want to parse it with a Digester object as follows:


--
Digester digester = new Digester();
digester.setDebug(1);
digester.setValidating(false);

digester.push(this);

digester.addObjectCreate(login/grp,
de.dhw.asim.components.benutzer.BenutzerGruppe);
digester.addSetProperties(login/grp);
digester.addSetNext(login/grp, addGrp,
de.dhw.asim.components.benutzer.BenutzerGruppe);

digester.addObjectCreate(login,
de.dhw.asim.components.benutzer.LoginObjekt);
digester.addSetProperties(login);
digester.addSetNext(login, setLoginObjekt,
de.dhw.asim.components.benutzer.LoginObjekt);

try {
 digester.parse(new InputSource(new StringReader(pXml)));
}
catch (IOException e){
  e.printStackTrace();
}
catch (SAXException e)
{
  e.printStackTrace();
}

--


Then I receive the following Message:
It seems that the stack can not be controlled.
Please give me an idea of what happens here and how to do it in the
right way!!

--

New de.dhw.asim.components.benutzer.LoginObjekt

Set de.dhw.asim.components.benutzer.LoginObjekt properties

New de.dhw.asim.components.benutzer.BenutzerGruppe

Set de.dhw.asim.components.benutzer.BenutzerGruppe properties

Call
de.dhw.asim.components.benutzer.LoginObjekt.addGrp(de.dhw.asim.components.benutzer.BenutzerGruppe@683912)

End event threw exception

java.lang.NoSuchMethodException

at java.lang.Class.getMethod0(Native Method)

at java.lang.Class.getMethod(Class.java:888)

at org.apache.struts.digester.SetNextRule.end(SetNextRule.java:156)

at org.apache.struts.digester.Digester.endElement(Digester.java:409)

at
org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java:347)

at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)

at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1436)

at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1205)

at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)

at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)

at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)

at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)

at org.apache.struts.digester.Digester.parse(Digester.java:738)

at
de.dhw.asim.components.benutzer.Xml2Object.getUserObjekt(Xml2Object.java:49)

at de.dhw.asim.components.benutzer.Test.main(Test.java:11)

java.lang.NoSuchMethodException

at org.apache.struts.digester.Digester.endElement(Digester.java:412)

at
org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java:347)

at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)

at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1436)

at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1205)

at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)

at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)

at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)

--


Any help is very appreciated!

Hartmut



What happened to the 'etc','src' and 'web' directories in Struts binary download?

2001-06-06 Thread Shamdasani Nimmi-ANS004

Hi,

I just downloaded Struts 1.0-b3 and found out that 'etc', 'src' and 'web' directories 
are no longer there. What happened to these? It was convenient to get the source code 
also in one shot of download.

-Nimmi 




database.xml

2001-06-06 Thread Gus Delgado

I'm trying to create my own example of the struts framework, I created a
database servlet and I try to get data from the database.xml when I click on
a link but when I check my servlet.log I see that the database (hashtable)
is empty.

SERVLET LOG:
2001-06-06 01:57:25 - path=/struts-floodcert :jsp: init
2001-06-06 01:57:25 - path=/struts-floodcert :database: init
2001-06-06 01:57:25 - path=/struts-floodcert :database: Initializing
database servlet
2001-06-06 01:57:25 - path=/struts-floodcert :database: Loading database
from '/WEB-INF/database.xml'
2001-06-06 01:57:25 - path=/struts-floodcert :action: init
2001-06-06 01:57:26 - path=/struts-floodcert :action: Loading application
resources from resource floodcert.struts.ApplicationResources
2001-06-06 01:57:26 - path=/struts-floodcert :action: Initializing
configuration from resource path /WEB-INF/struts-config.xml
2001-06-06 01:57:26 - path=/struts-floodcert :action: Process
servletName=action, urlPattern=*.do
2001-06-06 01:57:26 - path=/struts-floodcert :action: Mapping for servlet
'action' = '*.do'
2001-06-06 01:57:29 - path= :jsp: init
2001-06-06 01:57:37 - path=/struts-floodcert :jsp: init
2001-06-06 01:57:42 - path=/struts-floodcert :action: Processing a GET for
/getPending
2001-06-06 01:57:42 - path=/struts-floodcert :action:  Looking for
ActionForm bean under attribute 'pendingForm'
2001-06-06 01:57:42 - path=/struts-floodcert :action:  Creating new
ActionForm instance of class 'floodcert.struts.PendingOrdersForm'
2001-06-06 01:57:42 - path=/struts-floodcert :action:  Storing instance
under attribute 'pendingForm' in scope 'request'
2001-06-06 01:57:42 - path=/struts-floodcert :action:  Populating bean
properties from this request
2001-06-06 01:57:42 - path=/struts-floodcert :action:  Validating input
form properties
2001-06-06 01:57:42 - path=/struts-floodcert :action:  Looking for Action
instance for class floodcert.struts.GetPendingAction
2001-06-06 01:57:42 - path=/struts-floodcert :action:   Double checking
for Action instance already there
2001-06-06 01:57:42 - path=/struts-floodcert :action:   Creating new
Action instance

!-- EMPTY EMPTY HASHTABLE --
2001-06-06 01:57:42 - path=/struts-floodcert :action: {}
2001-06-06 01:57:42 - path=/struts-floodcert :action: GetPendingAction:
Processing Get action
2001-06-06 01:57:42 - path=/struts-floodcert :action:  PendingOrders is
not in database

Can someone tell me what I'm doing wrong?

Your help is much appreciated.

Gus




Re: a struts tag within another struts tag ...

2001-06-06 Thread Oleg V Alexeev

Hello Chico,

Wednesday, June 06, 2001, 12:08:38 PM, you wrote:


CC does anyone know a way of doing something like so, so that it works:

CC logic:iterate id=listElement name=myList
CC html:radio property=selectedListElement value=bean:write
name=listElement//
CC /logic:iterate

You can not use one tag in attribute value of another tag for jsp tag
libraries. Another words - if you use one tag then you can place to
the attributes as values only strings or run-time expressions like
%= % for attributes marked as rtexprvaluetrue/rtexprvalue

CC i always get a error saying that listElement has no value in that scope ...

CC i get around this problem using jsp, like so:

CC logic:iterate id=listElement name=myList
CC % String myListElement = (String)
CC pageContext.findAttribute(listElement);%
CC html:radio property=selectedListElement
CC value=%=myListElement%/
CC /logic:iterate

CC But I really don't want to be mixing jsp with struts ...

CC any ideas?

CC chico




-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Submit included in GET parameters

2001-06-06 Thread Marc S. Penner

Is there any way to avoid having the submit text show up as a GET parameter
when submitting a form?  I want the other form elements to show up as GET
parameters so that the page can be bookmarked, but I would prefer that the
submit text not show up.  Is there a way to do this?  Thanks.

Marc

- Original Message -
From: Nanduri, Amarnath [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 06, 2001 2:45 PM
Subject: RE: bean:write Tag and polymorphic behavior


 David,

  Thanks for the info. I do have the setters. Too lazy to include them
in
 my actual mail.

 cheers,
 Amar..

 -Original Message-
 From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 06, 2001 2:18 PM
 To: [EMAIL PROTECTED]
 Subject: Re: bean:write Tag and polymorphic behavior


 Struts uses reflection.  So if the method is there, it
 will find it.  You will need a setter though for the
 key method or it will generate errors.

 Here is an excerpt from the PropertyUtils
 documentation.

 Utility methods for using Java Reflection APIs to
 facilitate generic property getter and setter
 operations on Java objects. Much of this code was
 originally included in BeanUtils, but has been
 separated because of the volume of code involved.

 In general, the objects that are examined and modified
 using these methods are expected to conform to the
 property getter and setter method naming conventions
 described in the JavaBeans Specification (Version
 1.0.1). No data type conversions are performed, and
 there are no usage of any PropertyEditor classes that
 have been registered, although a convenient way to
 access the registered classes themselves is included.

 David
 --- Nanduri, Amarnath
 [EMAIL PROTECTED] wrote:
  Hi my fellow Strutters,
 
 
  got an interesting question for you all to
  ponder. I am using the tag
 
  bean:write name=ABCForm
  property=superclassObject.key / in my jsp
  pages.
 
 
  WILL THIS WORK ? Is struts smart enough to know that
  i am returning a
  subclass and so can call its private variable using
  the getter method ? I
  know that introspection is being performed inside.
  Some expert advise is
  helpful...
 
  I am enclosing the code for this..
 
  public class ABCForm extends ActionForm
  {
 
public  SuperClass  getSuperClassObject()
{
  // basically it returns a Subclass upcasted to
  the superclass.
  return  superclassObject ;
}
 
 
  }
 
 
   public  SuperClass
   {
 
   }
 
 
   public  SubClass extends  SuperClass
   {
 private String key ;
 
 public  String getKey()
 {
   return key ;
 }
   }


 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail - only $35
 a year!  http://personal.mail.yahoo.com/


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




Re: Getting values from ActionForm bean

2001-06-06 Thread John Raley

(Sorry if this duplicates a previous response)

The fact that the bean name is null makes me suspicious:
1. Are you using html:options within an html:form tag?
2. Does your action specify a name (in struts-config.xml)?
Or,
does your form bean class have a customers property?

Shannon Moschetti wrote:

 Boy, I thought for sure that someone would have a suggestion for me 
 concerning this question.  Is more information needed?

 Shannon Moschetti wrote:

 Sorry... the error generated from my JSP is as follows, and not the 
 error included in the original message:

 javax.servlet.jsp.JspException: No getter method available for 
 property customers for bean under name null
   at 
 org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:338) 

   at 
 org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:234)
   at 
 jsp_servlet._content._managerstart._jspService(_managerstart.java:337)
   at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
   at 
 weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213) 

   at 
 weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:246) 

   at 
 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
 

   at 
 weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1622) 

   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)


 Shannon Moschetti wrote:

 I'm new to struts and would like to get a handle on a few things.  I 
 made certain to search the archives for an answer to my current 
 problem, but was unable to find an answer.  So I post my question here.

 I have an ActionForm in which I added a method that queries a 
 database and gets a name/id pair and adds them to a hashtable.  On 
 creation of the form(in the JSP associated with the ActionForm 
 class) I want to populate a combobox on the form with values from 
 the hashtable.  Here's what I tried, and the results of the code:

 JSP
   html:select property=customer size=1
   html:options property=customers/ labelName=value 
 labelProperty=key
   /html:select

 ActionForm
 public Hashtable getCustomers(){
   // query database, build hashtable
   return hash;
 }

 The ActionForm is a request scope bean, as specified in struts-config.
 Here's the error I get:
 javax.servlet.jsp.JspException: Cannot find bean exportForm in scope 
 request
   at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:486)
   at 
 org.apache.struts.taglib.bean.DefineTag.doStartTag(DefineTag.java:200)
   at 
 jsp_servlet._content._managerstart._jspService(_managerstart.java:297)
   at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
   at 
 weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213) 

   at 
 weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:246) 

   at 
 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
 

   at 
 weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1622) 

   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)














Re: Getting values from ActionForm bean

2001-06-06 Thread Eric Rasmussen

Is this a typo?  If not, it is probably your problem.

   html:select property=customer size=1
   html:options property=customers/ labelName=value
 labelProperty=key
   /html:select

Should be:
html:select property=customer size=1
  html:options property=customers labelName=value labelProperty=key/
/html:select

Backslash denoting end of element in wrong place.

Besides that, I use the 'collections' attribute of html:options, and don't
use labelName.  Example:
html:select property=typeId
  html:options collection=typecollection property=id
labelProperty=name/
/html:select

In this case, 'typecollection' is a Collection of objects that have getId()
and getName() methods.  The return of these methods will be used to populate
the drop-down list.  The 'property' attribute of the html:select element
denotes which option to select by default (that is, to add the 'selected'
attribute to).  This is determined by calling the method of the form bean
denoted by the 'property' attribute.  In other words, when the return of
[form_bean].getTypeId() matches [typecollection].getId(), the option would
be 'selected'.

Use case:  in the case that three objects in 'typecollection' had ids of
1,2,3 and names of name1,name2,name3, and the [form_bean].getTypeId()
returns 2, this would be the output:
select name=typeIdoption value=1name1/option
option value=2 selectedname2/option
option value=3name3/option/select

Hope this helps,
- eric

- Original Message -
From: Shannon Moschetti [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 06, 2001 8:29 AM
Subject: Re: Getting values from ActionForm bean


 Boy, I thought for sure that someone would have a suggestion for me
 concerning this question.  Is more information needed?

 Shannon Moschetti wrote:

  Sorry... the error generated from my JSP is as follows, and not the
  error included in the original message:
 
  javax.servlet.jsp.JspException: No getter method available for
  property customers for bean under name null
at
 
org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:338)
at
  org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:234)
at
  jsp_servlet._content._managerstart._jspService(_managerstart.java:337)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:213)
 
at
 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:246)
 
at
 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1265)
 
at
 
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1622)
 
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
 
 
  Shannon Moschetti wrote:
 
  I'm new to struts and would like to get a handle on a few things.  I
  made certain to search the archives for an answer to my current
  problem, but was unable to find an answer.  So I post my question here.
 
  I have an ActionForm in which I added a method that queries a
  database and gets a name/id pair and adds them to a hashtable.  On
  creation of the form(in the JSP associated with the ActionForm class)
  I want to populate a combobox on the form with values from the
  hashtable.  Here's what I tried, and the results of the code:
 
  JSP
html:select property=customer size=1
html:options property=customers/ labelName=value
  labelProperty=key
/html:select
 
  ActionForm
  public Hashtable getCustomers(){
// query database, build hashtable
return hash;
  }
 
  The ActionForm is a request scope bean, as specified in struts-config.
  Here's the error I get:
  javax.servlet.jsp.JspException: Cannot find bean exportForm in scope
  request
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:486)
at
  org.apache.struts.taglib.bean.DefineTag.doStartTag(DefineTag.java:200)
at
  jsp_servlet._content._managerstart._jspService(_managerstart.java:297)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:213)
 
at
 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:246)
 
at
 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1265)
 
at
 
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1622)
 
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
 
 
 
 
 
 






how to safely access a nested bean property that may be null

2001-06-06 Thread Steve Salkin
Title: how to safely access a nested bean property that may be null





Hi:


If you have in your request a bean B, and bean B has within it a bean B',
which has a property P that you would like to access using a
bean:write name=B property=B'.P/


Now, you know that B' may be null. How can you protect the reference from failing?


I thought that I could use logic:present as follows:
logic:present name=B property=B'
 logic:present name=B property=B'.P
 bean:write name=B property=B'.P/
 /logic:present
/logic:present


But this fails to work. The second logic:present gets evaluated anyway, and thus
a null pointer is dereferenced.


Any tips appreciated. Apologies for the HTML-this client is configured to send text,
but apparently exchange is converting mail for me.


Thanks,
S-





Re: Scratch RowSets

2001-06-06 Thread Oleg V Alexeev

Hello Ted,

One question here... For example I want to use rowset in iterate tag -
but database connection must be opened before iterate using and closed
after it in this case. Is it right? If yes, then how it works in MVC
framework? In Action - rows are retrieved from database and as attribute
passed via session or request to the forwarded jsp page - I mainly use
this approach to display data from database. I try to use rowset after
closing of the connection to the database but exception was raised and
I mark this way as error...
What method are you use to work with rowsets in iterate tag? Open
connection, make rowset, iterate, close rowset and connection? Or
another way exists?

Wednesday, June 06, 2001, 4:09:03 PM, you wrote:

TH The documentation for the Early Release of CachedRowSets mentions that 

TH Because both a CachedRowSet object and its metadata can be created from
TH scratch, a component
TH that acts as a factory for rowsets can use this capability to create a
TH rowset containing data from
TH non-SQL data sources.

TH has anyone here tried this yet?

TH The idea being I would like to transfer incoming properties from an
TH ActionForm into a scratch RowSet, and use that as the value object.
TH (Perhaps within a wrapper or a facade so business logic methods can be
TH added.)

TH There will be expanded support for RowSets in 1.1, and I wanted to get
TH started on some support utilities / design patterns before looking at
TH what other modifications will be needed. 

TH I put together a quick Iterate wrapper that works fine with a returned
TH RowSet, but also need to create a new RowSet from scratch to close the
TH loop. I guess the thing to try is to create a MetaDataRowSet object and
TH pass that to a new RowSet (instead of making the SQL call), and then see
TH if I can insert a row.

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



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Compositing Actions

2001-06-06 Thread Oleg V Alexeev

Hello Andrew,

May be another way is solution of your problem... Now I work under
extension of struts to support so named 'bean-factories'. Idea is to
create pluggable framework to support mechanism of data bean
generation (for example, retrieved from database) based on
declarations in struts-config.xml.
There are some terms in my concept -
 bean-factory - java class intended to create beans
 bean-template - bean description (type, name, parameters needed to
 create such bean)
 bean-registration - additional tag inside action mapping - creates
 link between bean-template and bean-factory
 
 BeanFactoryServlet extends ActionServlet and uses information from
 struts-config.xml to create beans from bean-registraions list in
 action and store this beans in request of session scope. All this
 beans avaiable to jsp-page to show this beans. Every action can hold
 list of bean-registrations and every of such registrations can use
 anyone factory and anyone bean-template.

I publish first version with sample web-application some days ago -
you can download it and review for your needs.

http://www.sura.ru/~gonza/bean-factory

Wednesday, June 06, 2001, 6:11:09 PM, you wrote:

AJ Is there a straightforward way to locate and invoke an Action from within
AJ the perform() method of another Action?  The reason I would like to do this
AJ is to create a composite Action from a number of other component
AJ Actions--these component Actions must be available individually in the
AJ Struts application, however I would like to provide a composite Action that
AJ requires objects placed in the request attributes by the component Actions.

AJ Thanks in advance,

AJ --Andy

AJ Andy Jenkins
AJ Venetica Corporation (www.venetica.com)
AJ Voice: 704.926.3080
AJ [EMAIL PROTECTED]



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Pleeeeease help me using the Digester-Class of STRUTS

2001-06-06 Thread Oleg V Alexeev

Hello Hartmut,

You must implement such method to use it in digester -

de.dhw.asim.components.benutzer.LoginObjekt.addGrp(de.dhw.asim.components.benutzer.BenutzerGruppe)

Wednesday, June 06, 2001, 11:05:06 PM, you wrote:

HB Hello,


HB it seems that the Digester Class of Struts is a strange thing.
HB I take the following XML-Document (in a String):

HB ?xml version=1.0 encoding=UTF-8?
HB login usr=Benutzername
HBhilfe=true
HBrn=Hartmut Bernecker
HBmail=[EMAIL PROTECTED]
HBtxt=Persoenlicher Begruessungstext des Benutzers
HBspr=de
HBmed=medium
HB   grp name=Gruppe 1 txt=Begruessungstext 1/grp
HB   grp name=Gruppe 2 txt=Begruessungstext 2/grp
HB /login

HB --


HB Then I want to parse it with a Digester object as follows:


HB --
HB Digester digester = new Digester();
HB digester.setDebug(1);
HB digester.setValidating(false);

HB digester.push(this);

HB digester.addObjectCreate(login/grp,
HB de.dhw.asim.components.benutzer.BenutzerGruppe);
HB digester.addSetProperties(login/grp);
HB digester.addSetNext(login/grp, addGrp,
HB de.dhw.asim.components.benutzer.BenutzerGruppe);

HB digester.addObjectCreate(login,
HB de.dhw.asim.components.benutzer.LoginObjekt);
HB digester.addSetProperties(login);
HB digester.addSetNext(login, setLoginObjekt,
HB de.dhw.asim.components.benutzer.LoginObjekt);

HB try {
HB  digester.parse(new InputSource(new StringReader(pXml)));
HB }
HB catch (IOException e){
HB   e.printStackTrace();
HB }
HB catch (SAXException e)
HB {
HB   e.printStackTrace();
HB }

HB --


HB Then I receive the following Message:
HB It seems that the stack can not be controlled.
HB Please give me an idea of what happens here and how to do it in the
HB right way!!

HB --

HB New de.dhw.asim.components.benutzer.LoginObjekt

HB Set de.dhw.asim.components.benutzer.LoginObjekt properties

HB New de.dhw.asim.components.benutzer.BenutzerGruppe

HB Set de.dhw.asim.components.benutzer.BenutzerGruppe properties

HB Call
HB 
de.dhw.asim.components.benutzer.LoginObjekt.addGrp(de.dhw.asim.components.benutzer.BenutzerGruppe@683912)

HB End event threw exception

HB java.lang.NoSuchMethodException

HB at java.lang.Class.getMethod0(Native Method)

HB at java.lang.Class.getMethod(Class.java:888)

HB at org.apache.struts.digester.SetNextRule.end(SetNextRule.java:156)

HB at org.apache.struts.digester.Digester.endElement(Digester.java:409)

HB at
HB org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java:347)

HB at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)

HB at
HB 
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1436)

HB at
HB 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1205)

HB at
HB 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)

HB at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)

HB at
HB org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)

HB at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)

HB at org.apache.struts.digester.Digester.parse(Digester.java:738)

HB at
HB de.dhw.asim.components.benutzer.Xml2Object.getUserObjekt(Xml2Object.java:49)

HB at de.dhw.asim.components.benutzer.Test.main(Test.java:11)

HB java.lang.NoSuchMethodException

HB at org.apache.struts.digester.Digester.endElement(Digester.java:412)

HB at
HB org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java:347)

HB at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)

HB at
HB 
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1436)

HB at
HB 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1205)

HB at
HB 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)

HB at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)

HB at
HB org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)

HB --


HB Any help is very appreciated!

HB Hartmut



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





RE: Scratch RowSets

2001-06-06 Thread Steve Salkin
Title: RE: Scratch RowSets





Take a look at sun's CachedRowSet now available in early release.


http://www.javaworld.com/javaworld/jw-02-2001/jw-0202-cachedrow.html


S-


 -Original Message-
 From: Oleg V Alexeev [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 06, 2001 3:55 PM
 To: Ted Husted
 Subject: Re: Scratch RowSets
 
 
 Hello Ted,
 
 One question here... For example I want to use rowset in iterate tag -
 but database connection must be opened before iterate using and closed
 after it in this case. Is it right? If yes, then how it works in MVC
 framework? In Action - rows are retrieved from database and 
 as attribute
 passed via session or request to the forwarded jsp page - I mainly use
 this approach to display data from database. I try to use rowset after
 closing of the connection to the database but exception was raised and
 I mark this way as error...
 What method are you use to work with rowsets in iterate tag? Open
 connection, make rowset, iterate, close rowset and connection? Or
 another way exists?
 
 Wednesday, June 06, 2001, 4:09:03 PM, you wrote:
 
 TH The documentation for the Early Release of CachedRowSets 
 mentions that 
 
 TH Because both a CachedRowSet object and its metadata can 
 be created from
 TH scratch, a component
 TH that acts as a factory for rowsets can use this 
 capability to create a
 TH rowset containing data from
 TH non-SQL data sources.
 
 TH has anyone here tried this yet?
 
 TH The idea being I would like to transfer incoming 
 properties from an
 TH ActionForm into a scratch RowSet, and use that as the 
 value object.
 TH (Perhaps within a wrapper or a facade so business logic 
 methods can be
 TH added.)
 
 TH There will be expanded support for RowSets in 1.1, and I 
 wanted to get
 TH started on some support utilities / design patterns 
 before looking at
 TH what other modifications will be needed. 
 
 TH I put together a quick Iterate wrapper that works fine 
 with a returned
 TH RowSet, but also need to create a new RowSet from scratch 
 to close the
 TH loop. I guess the thing to try is to create a 
 MetaDataRowSet object and
 TH pass that to a new RowSet (instead of making the SQL 
 call), and then see
 TH if I can insert a row.
 
 TH -- Ted Husted, Husted dot Com, Fairport NY USA.
 TH -- Custom Software ~ Technical Services.
 TH -- Tel 716 737-3463.
 TH -- http://www.husted.com/about/struts/
 
 
 
 -- 
 Best regards,
 Oleg mailto:[EMAIL PROTECTED]
 
 





No clue what is wrong...

2001-06-06 Thread Wes Bramhall

Thanks for all your help.  You've verified, as far as I can tell, that I
have everything in the right places and saying the right stuff.  Here's all
the information I have and maybe you can see what I'm doing wrong... (any
other information I need to supply?  Windows2k box running JRUN.  Struts.jar
is in JRUN's classpath for compiliing.)

Thanks in advance,
-Wes

The error:
/struts-example/index.jsp:

Exception thrown processing JSP page.
javax.servlet.jsp.JspException: Missing message for key index.title
at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242)
at jrun__index2ejspa._jspService(jrun__index2ejspa.java:57)
at
allaire.jrun.jsp.HttpJSPServlet.service(../jsp/HttpJSPServlet.java:39)
at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:228)
at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:196)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416)
at
allaire.jrun.session.JRunSessionService.service(../session/JRunSessionServic
e.java:1082)
at
allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270)
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDis
patcher.java:89)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1552)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1542)
at
allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:364)
at allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:115)
at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)

My web.xml (located in WEB-INF):
web-app

  servlet
servlet-namedatabase/servlet-name
 
servlet-classorg.apache.struts.webapp.example.DatabaseServlet/servlet-cla
ss
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
load-on-startup1/load-on-startup
  /servlet
  
  servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameapplication/param-name
 
param-valueorg.apache.struts.webapp.example.ApplicationResources/param-va
lue
/init-param
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
init-param
  param-namedetail/param-name
  param-value2/param-value
/init-param
init-param
  param-namevalidate/param-name
  param-valuetrue/param-value
/init-param
load-on-startup2/load-on-startup
  /servlet
  
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping
  
 
welcome-file-listwelcome-fileindex.jsp/welcome-file/welcome-file-list

  
  taglib
taglib-uri/WEB-INF/app.tld/taglib-uri
taglib-location/WEB-INF/app.tld/taglib-location
  /taglib
  
  taglib
taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
taglib-location/WEB-INF/struts-bean.tld/taglib-location
  /taglib

  taglib
taglib-uri/WEB-INF/struts-html.tld/taglib-uri
taglib-location/WEB-INF/struts-html.tld/taglib-location
  /taglib

  taglib
taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
taglib-location/WEB-INF/struts-logic.tld/taglib-location
  /taglib

/web-app

My App.props (located in WEB-INF\classes\org\apache\struts\webapp\example):
button.cancel=Cancel
button.confirm=Confirm
button.reset=Reset
button.save=Save
database.load=Cannot load database from {0}
error.database.missing=liUser database is missing, cannot validate logon
credentials/li
error.fromAddress.format=liInvalid format for From Address/li
error.fromAddress.required=liFrom Address is required/li
error.fullName.required=liFull Name is required/li
error.host.required=liMail Server is required/li
error.noSubscription=liNo Subscription bean in user session/li
error.password.required=liPassword is required/li
error.password2.required=liConfirmation password is required/li
error.password.match=liPassword and confirmation password must match/li
error.password.mismatch=liInvalid username and/or password, please try
again/li
error.replyToAddress.format=liInvalid format for Reply To Address/li
error.transaction.token=liCannot submit this form out of order/li
error.type.invalid=liServer Type must be 'imap' or 'pop3'/li
error.type.required=liServer Type is required/li
error.username.required=liUsername is required/li
error.username.unique=liThat username is already in use - please select
another/li
errors.footer=/ulhr
errors.header=h3font color=redValidation Error/font/h3You must
correct the following error(s) before proceeding:ul
errors.ioException=I/O exception rendering error messages: {0}
heading.autoConnect=Auto
heading.subscriptions=Current Subscriptions
heading.host=Host Name
heading.user=User Name
heading.type=Server Type

viewing combo box

2001-06-06 Thread Alex Colic

Hi,

lets say you have a combo box filling from a vector. I can get this to work
but I don't want the combo box to show if there are no options in it. In
other words if the vector=0. What the best way to do this.

Thanks for the help.

Alex

 Alex Colic.vcf


Re: No clue what is wrong...

2001-06-06 Thread Steven Leija

In your configuration file, you are pointing to an
ApplicationResources.properties file and it looks like you named your own
properties file called App.props

so your path would be:

org.apache.struts.webapp.example.App

Steven



- Original Message -
From: Wes Bramhall [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 06, 2001 10:07 AM
Subject: No clue what is wrong...


 Thanks for all your help.  You've verified, as far as I can tell, that I
 have everything in the right places and saying the right stuff.  Here's
all
 the information I have and maybe you can see what I'm doing wrong... (any
 other information I need to supply?  Windows2k box running JRUN.
Struts.jar
 is in JRUN's classpath for compiliing.)

 Thanks in advance,
 -Wes

 The error:
 /struts-example/index.jsp:

 Exception thrown processing JSP page.
 javax.servlet.jsp.JspException: Missing message for key index.title
 at
 org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242)
 at jrun__index2ejspa._jspService(jrun__index2ejspa.java:57)
 at
 allaire.jrun.jsp.HttpJSPServlet.service(../jsp/HttpJSPServlet.java:39)
 at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:228)
 at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:196)
 at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416)
 at

allaire.jrun.session.JRunSessionService.service(../session/JRunSessionServic
 e.java:1082)
 at
 allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270)
 at

allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDis
 patcher.java:89)
 at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1552)
 at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1542)
 at
 allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:364)
 at allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:115)
 at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
 at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)

 My web.xml (located in WEB-INF):
 web-app

   servlet
 servlet-namedatabase/servlet-name


servlet-classorg.apache.struts.webapp.example.DatabaseServlet/servlet-cla
 ss
 init-param
   param-namedebug/param-name
   param-value2/param-value
 /init-param
 load-on-startup1/load-on-startup
   /servlet

   servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 init-param
   param-nameapplication/param-name


param-valueorg.apache.struts.webapp.example.ApplicationResources/param-va
 lue
 /init-param
 init-param
   param-nameconfig/param-name
   param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param
   param-namedebug/param-name
   param-value2/param-value
 /init-param
 init-param
   param-namedetail/param-name
   param-value2/param-value
 /init-param
 init-param
   param-namevalidate/param-name
   param-valuetrue/param-value
 /init-param
 load-on-startup2/load-on-startup
   /servlet

   servlet-mapping
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
   /servlet-mapping



welcome-file-listwelcome-fileindex.jsp/welcome-file/welcome-file-list
 

   taglib
 taglib-uri/WEB-INF/app.tld/taglib-uri
 taglib-location/WEB-INF/app.tld/taglib-location
   /taglib

   taglib
 taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
 taglib-location/WEB-INF/struts-bean.tld/taglib-location
   /taglib

   taglib
 taglib-uri/WEB-INF/struts-html.tld/taglib-uri
 taglib-location/WEB-INF/struts-html.tld/taglib-location
   /taglib

   taglib
 taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
 taglib-location/WEB-INF/struts-logic.tld/taglib-location
   /taglib

 /web-app

 My App.props (located in
WEB-INF\classes\org\apache\struts\webapp\example):
 button.cancel=Cancel
 button.confirm=Confirm
 button.reset=Reset
 button.save=Save
 database.load=Cannot load database from {0}
 error.database.missing=liUser database is missing, cannot validate logon
 credentials/li
 error.fromAddress.format=liInvalid format for From Address/li
 error.fromAddress.required=liFrom Address is required/li
 error.fullName.required=liFull Name is required/li
 error.host.required=liMail Server is required/li
 error.noSubscription=liNo Subscription bean in user session/li
 error.password.required=liPassword is required/li
 error.password2.required=liConfirmation password is required/li
 error.password.match=liPassword and confirmation password must
match/li
 error.password.mismatch=liInvalid username and/or password, please try
 again/li
 error.replyToAddress.format=liInvalid format for Reply To Address/li
 error.transaction.token=liCannot submit this form out of order/li
 error.type.invalid=liServer Type must be 'imap' or 'pop3'/li
 error.type.required=liServer Type is required/li
 error.username.required=liUsername is required/li
 error.username.unique=liThat username is 

RE: Submit included in GET parameters

2001-06-06 Thread McShane, Matthew

do not give the submit button a name parameter.

--matt.

-Original Message-
From: Marc S. Penner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 3:24 PM
To: [EMAIL PROTECTED]
Subject: Submit included in GET parameters


Is there any way to avoid having the submit text show up as a GET parameter
when submitting a form?  I want the other form elements to show up as GET
parameters so that the page can be bookmarked, but I would prefer that the
submit text not show up.  Is there a way to do this?  Thanks.

Marc

- Original Message -
From: Nanduri, Amarnath [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 06, 2001 2:45 PM
Subject: RE: bean:write Tag and polymorphic behavior


 David,

  Thanks for the info. I do have the setters. Too lazy to include them
in
 my actual mail.

 cheers,
 Amar..

 -Original Message-
 From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 06, 2001 2:18 PM
 To: [EMAIL PROTECTED]
 Subject: Re: bean:write Tag and polymorphic behavior


 Struts uses reflection.  So if the method is there, it
 will find it.  You will need a setter though for the
 key method or it will generate errors.

 Here is an excerpt from the PropertyUtils
 documentation.

 Utility methods for using Java Reflection APIs to
 facilitate generic property getter and setter
 operations on Java objects. Much of this code was
 originally included in BeanUtils, but has been
 separated because of the volume of code involved.

 In general, the objects that are examined and modified
 using these methods are expected to conform to the
 property getter and setter method naming conventions
 described in the JavaBeans Specification (Version
 1.0.1). No data type conversions are performed, and
 there are no usage of any PropertyEditor classes that
 have been registered, although a convenient way to
 access the registered classes themselves is included.

 David
 --- Nanduri, Amarnath
 [EMAIL PROTECTED] wrote:
  Hi my fellow Strutters,
 
 
  got an interesting question for you all to
  ponder. I am using the tag
 
  bean:write name=ABCForm
  property=superclassObject.key / in my jsp
  pages.
 
 
  WILL THIS WORK ? Is struts smart enough to know that
  i am returning a
  subclass and so can call its private variable using
  the getter method ? I
  know that introspection is being performed inside.
  Some expert advise is
  helpful...
 
  I am enclosing the code for this..
 
  public class ABCForm extends ActionForm
  {
 
public  SuperClass  getSuperClassObject()
{
  // basically it returns a Subclass upcasted to
  the superclass.
  return  superclassObject ;
}
 
 
  }
 
 
   public  SuperClass
   {
 
   }
 
 
   public  SubClass extends  SuperClass
   {
 private String key ;
 
 public  String getKey()
 {
   return key ;
 }
   }


 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail - only $35
 a year!  http://personal.mail.yahoo.com/


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



ActionForm/Action with edit mode

2001-06-06 Thread John Hogan

All,

I have a situation where it is desirable to use a form/page for both 
adding new info and editing existing data.  The new info scenario is 
straight forward struts ActionForm/Action classes.  What I'm 
wrestling with a bit is the edit scenario.  I'm wondering if I can 
stay within the struts framework and still do something like entering 
a page in edit mode and have it displaying existing user data?

It seems this should be possible because that's exactly what the page 
does for error handling.  Has anyone else tackled this one yet?  TIA.

JohnH

_

Get your free E-mail at http://www.ireland.com



Can I have NO action?!

2001-06-06 Thread dhay



Hi.  I have a form where I display the current filename, and allow them to
change it.  As such, I don't need to do anything in the action, just let Struts
populate the form bean.

How do I go about this?  Do I need an action that does nothing in its perform
method?  Or can I set things up so no action is needed at all?

Cheers,

Dave






Re: ActionForm/Action with edit mode

2001-06-06 Thread Ted Husted

If I understand the question, all you have to do is change the form's
action to insert or update as the case may be. A good way to do this is
to have a task parameter that you would pass to a single action
designed to handle both cases. You can do this dymamically using (where
key=0 means we're inserting a new record). 

logic:equal name=myForm property=key value=0
input type=hidden name=task value=insert
/logic:equal
logic:notEqual name=myForm property=key value=0
input type=hidden name=task value=update
/logic:notEqual

For an update, visit an Action first, select the record, populate the
form, and forward to input.  

John Hogan wrote:
 
 All,
 
 I have a situation where it is desirable to use a form/page for both
 adding new info and editing existing data.  The new info scenario is
 straight forward struts ActionForm/Action classes.  What I'm
 wrestling with a bit is the edit scenario.  I'm wondering if I can
 stay within the struts framework and still do something like entering
 a page in edit mode and have it displaying existing user data?
 
 It seems this should be possible because that's exactly what the page
 does for error handling.  Has anyone else tackled this one yet?  TIA.
 
 JohnH
 
 _
 
 Get your free E-mail at http://www.ireland.com

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



exception in MessageTag.doStartTag()

2001-06-06 Thread RoleModel Software



We'rejust starting to learn about Struts. We 
have downloaded thecode (and binaries) (v.b3) for struts-example. The 
binaries run fine, and we get the expected output. Whenwe try to set up 
the source version, though, we get the following error:


  javax.servlet.jsp.JspException	java.lang.Throwable(java.lang.String)	java.lang.Exception(java.lang.String)	javax.servlet.jsp.JspException(java.lang.String)	int 
  org.apache.struts.taglib.bean.MessageTag.doStartTag()	void 
  _0002findex_0002ejspindex_jsp_0._jspService(javax.servlet.http.HttpServletRequest, 
  javax.servlet.http.HttpServletResponse)...

Can anybody give us a clue about what's going on? As far as we 
can tell, we've got everything configured properly, but we're guessing we made a 
mistake somewhere.

Thanks.

Michael and Roy



Re: Scratch RowSets

2001-06-06 Thread Ted Husted

Good reference, Steve. 

So, given a CachedRowSet, it's easy to snag a data set and puruse it at
your leisure, since the database connection is automatically closed by
the RowSet. I've been using them for retrievals extensively, and they
are an absolute pleasure to use. 

CachedRowSets are also mutable so you can update, deleted, and insert
rows rows remotely, and (if your DBMS supports transactions) send the
changes back to whence they came. 

Now, the next step is to create a RowSet from scratch to insert a new
record to a new table. Given this, there doesn't seem to be any reason
to have a seperate value object bean for a data set that is coming from
or going to a persistent store. 

I'm going to take a whack at this tonite, so anyone who'd done this and
has any pointers, please let me know!

 Steve Salkin wrote:
 
 Take a look at sun's CachedRowSet now available in early release.
 
 http://www.javaworld.com/javaworld/jw-02-2001/jw-0202-cachedrow.html
 
 S-




RE: ActionForm/Action with edit mode

2001-06-06 Thread Joe Kepley

I solved this one by creating an action that looked at the incoming bean,
and if it was null or contained no data (the user was viewing and hadnt
edited yet), then the action would populate the bean from a database and
pass back with no errors. If a hidden variable (I called it 'process') had
been set, then the action would validate the input, then store the new info
into the database. 
Hope that helps,
--Joe
 -Original Message-
 From: John Hogan [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 06, 2001 4:29 PM
 To: [EMAIL PROTECTED]
 Subject: ActionForm/Action with edit mode
 
 
 All,
 
 I have a situation where it is desirable to use a form/page for both 
 adding new info and editing existing data.  The new info scenario is 
 straight forward struts ActionForm/Action classes.  What I'm 
 wrestling with a bit is the edit scenario.  I'm wondering if I can 
 stay within the struts framework and still do something like entering 
 a page in edit mode and have it displaying existing user data?
 
 It seems this should be possible because that's exactly what the page 
 does for error handling.  Has anyone else tackled this one yet?  TIA.
 
 JohnH
 
 _
 
 Get your free E-mail at http://www.ireland.com
 



Re: Getting values from ActionForm bean

2001-06-06 Thread Shannon Moschetti

Included below is info from the jsp, form class, and config file.  Any 
advice?  I'm stuck.  I've got a fix, but its really 
terrible(embarrassing, but it works).

Here's the relevant JSP code(start.jsp):

html:form action=/export
  html:select property=customer size=1
 html:options property=customers labelName=value  
labelProperty=key/
  /html:select
   P
   html:submit property=addButton value=Export/
/html:form

ExportForm(ActionForm):
public Hashtable getCustomers(){
  

  Hashtable hash = new Hashtable();
  ResultSet rset = statement.executeQuery(select name, id from table);

  while(rset.next()){
   hash.put(rset.getString(name), rset.getString(id));
  }

  .
  return hash;
}

struts-config.xml:
form-beans
   !-- Export Form  --
   form-bean name=exportForm 
type=com.foo.ui.struts.form.ExportForm/
/form-beans
global-forwards
   forward name=export path=/content/start.jsp/
/global-forwards
action-mappings
  !-- Export Action --
  action path=/export input=/content/start.jsp 
name=exportForm scope=request 
type=com.foo.ui.struts.action.ExportAction
   forward name=manager path=/content/start.jsp/
   /action
/action-mappings

John Raley wrote:

 (Sorry if this duplicates a previous response)
 
 The fact that the bean name is null makes me suspicious:
 1. Are you using html:options within an html:form tag?
 2. Does your action specify a name (in struts-config.xml)?
 Or,
 does your form bean class have a customers property?
 
 Shannon Moschetti wrote:
 
 Boy, I thought for sure that someone would have a suggestion for me 
 concerning this question.  Is more information needed?
 
 Shannon Moschetti wrote:
 
 Sorry... the error generated from my JSP is as follows, and not the 
 error included in the original message:
 
 javax.servlet.jsp.JspException: No getter method available for 
 property customers for bean under name null
   at 
 org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:338) 
 
   at 
 org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:234)
   at 
 jsp_servlet._content._managerstart._jspService(_managerstart.java:337)
   at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
   at 
 weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213) 
 
   at 
 weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:246) 
 
   at 
 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
 
 
   at 
 weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1622) 
 
   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
 
 
 Shannon Moschetti wrote:
 
 I'm new to struts and would like to get a handle on a few things.  
 I made certain to search the archives for an answer to my current 
 problem, but was unable to find an answer.  So I post my question 
 here.
 
 I have an ActionForm in which I added a method that queries a 
 database and gets a name/id pair and adds them to a hashtable.  On 
 creation of the form(in the JSP associated with the ActionForm 
 class) I want to populate a combobox on the form with values from 
 the hashtable.  Here's what I tried, and the results of the code:
 
 JSP
   html:select property=customer size=1
   html:options property=customers/ labelName=value 
 labelProperty=key
   /html:select
 
 ActionForm
 public Hashtable getCustomers(){
   // query database, build hashtable
   return hash;
 }
 
 The ActionForm is a request scope bean, as specified in struts-config.
 Here's the error I get:
 javax.servlet.jsp.JspException: Cannot find bean exportForm in 
 scope request
   at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:486)
   at 
 org.apache.struts.taglib.bean.DefineTag.doStartTag(DefineTag.java:200)
   at 
 jsp_servlet._content._managerstart._jspService(_managerstart.java:297)
   at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
   at 
 weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213) 
 
   at 
 weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:246) 
 
   at 
 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
 
 
   at 
 
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1622) 
 
   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
 
 
 
 
 
 
 
 
 
 
 
 
 




Problem with nested html:form

2001-06-06 Thread Marc Eckart



Hi,

i have two forms nested in the following way 
:

html:form 
action="album.do"html:hidden property="action" 
value="deletePhotoList" /html:hidden property="forward" 
value='%= actionForward %' /html:hidden property="id" 
value='%= album.getAlbumId() %' /logic:iterate id="photo" 
name="album" property="photoList"


 html:form 
action="movePhotoUp.do" 
html:hidden property="action" 
value="movePhoto"/ 
html:hidden property="direction" 
value="up"/ html:hidden 
property="position" value='%= ""+((Photo)photo).getPosition() 
%'/ html:image 
src="images/up.bmp" alt="Bild nach oben 
verschieben"/ 
/html:form

/logic:iterate
/html:form

If I now press the inner Button the outer action 
"album.do" with the property action "deletePhotoList" is called instead of 
"movePhotoUp.do". 
I have mapped album.do and movePhotoUp.do to the 
same formclass.

Can anybody help me ?

Thanx,

Marc


Re: Problem with nested html:form

2001-06-06 Thread dhay



I do not believe that you are allowed to have nested forms in html (though
correct me if I'm wrong!).

Dave





Marc Eckart [EMAIL PROTECTED] on 06/06/2001 06:10:33 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Problem with nested html:form



Hi,

i have two forms nested in the following way :

html:form action=album.do
html:hidden property=action value=deletePhotoList /
html:hidden property=forward value='%= actionForward %' /
html:hidden property=id value='%= album.getAlbumId() %' /
logic:iterate id=photo name=album property=photoList



html:form action=movePhotoUp.do
html:hidden property=action value=movePhoto/
html:hidden property=direction value=up/
html:hidden property=position value='%=
+((Photo)photo).getPosition() %'/
html:image src=images/up.bmp alt=Bild nach oben verschieben/
/html:form


/logic:iterate
/html:form

If I now press the inner Button the outer action album.do  with the property
action deletePhotoList is called instead of movePhotoUp.do.
I have mapped album.do and movePhotoUp.do to the same formclass.

Can anybody help me ?

Thanx,

Marc




Hi,

i have two forms nested in the following way 
:

html:form 
action="album.do"html:hidden property="action" 
value="deletePhotoList" /html:hidden property="forward" 
value='%= actionForward %' /html:hidden property="id" 
value='%= album.getAlbumId() %' /logic:iterate id="photo" 
name="album" property="photoList"


 html:form 
action="movePhotoUp.do" 
html:hidden property="action" 
value="movePhoto"/ 
html:hidden property="direction" 
value="up"/ html:hidden 
property="position" value='%= ""+((Photo)photo).getPosition() 
%'/ html:image 
src="images/up.bmp" alt="Bild nach oben 
verschieben"/ 
/html:form

/logic:iterate
/html:form

If I now press the inner Button the outer action 
"album.do" with the property action "deletePhotoList" is called instead of 
"movePhotoUp.do". 
I have mapped album.do and movePhotoUp.do to the 
same formclass.

Can anybody help me ?

Thanx,

Marc


RE: invalid multipart request in beta 3

2001-06-06 Thread Graeme Miller

Peter that's a very similar error to what I am getting and I am doing the
same thing (migrating from b1 to b3 with file uploading).  Although the
symptom I am getting is the ActionForm.validate method not working.

If you find the answer please let me know!


 -Original Message-
 From: Peter Doyle [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, 7 June 2001 2:45 a.m.
 To: [EMAIL PROTECTED]
 Subject: invalid multipart request in beta 3
 
 
 Hi,
  I recently changed from Struts b1 to b3. (I skipped b2) I 
 have doe working
 with b1 to handle uploading, based on the upload application 
 that came with
 struts. Since changed to b3 I get the following error:
 
 javax.servlet.ServletException: MultipartIterator: invalid 
 multipart request
 data, doesn't start with boundary
 
 I cannot find what has changed between struts b1 and b3 that 
 would cause
 this. I cannot find a way to resolve it. The code in my upload action
 executes and finishes. Control is passed to the controller 
 servlet where
 this problem occurs.
 
 I would appreciate any help
 
 Thanks,
 Peter
 
 
 
 javax.servlet.ServletException: MultipartIterator: invalid 
 multipart request
 data, doesn't start with boundary
   at
 org.apache.struts.upload.MultipartIterator.parseRequest(Multip
 artIterator.ja
 va:345)
   at 
 org.apache.struts.upload.MultipartIterator.(MultipartIterator.
 java:152)
   at
 org.apache.struts.upload.DiskMultipartRequestHandler.handleReq
 uest(DiskMulti
 partRequestHandler.java:65)
   at 
 org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
   at
 org.apache.struts.action.ActionServlet.processPopulate(ActionS
 ervlet.java:20
 53)
   at 
 org.apache.struts.action.ActionServlet.process(ActionServlet.j
 ava:1563)
   at 
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
   at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
   at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
   at
 allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequest
 Dispatcher.jav
 a:88)
   at
 org.apache.struts.action.ActionServlet.processActionForward(Ac
 tionServlet.ja
 va:1758)
   at 
 org.apache.struts.action.ActionServlet.process(ActionServlet.j
 ava:1595)
   at 
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
   at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
   at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
   at
 allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequest
 Dispatcher.jav
 a:88)
   at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
   at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
   at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
   at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
   at allaire.jrun.WorkerThread.run(WorkerThread.java:74)
 
 
 
 
 
 --
 __
 Peter Doyle  TEO Media Ireland
 [EMAIL PROTECTED] http://www.teomedia.com
 Ph +353 1 888 1353  Fx +353 1 888 1354
 Unit 8 Scotch Berth, North Wall, Dublin 1, Ireland
 __
 



RE: invalid multipart request in beta 3

2001-06-06 Thread Graeme Miller

Are you using IE 5.5?  Coz there are some documented issues with IE5 and
below and file uploads in Struts.  

Unfortunately I AM using IE5.5 and this is not working for me in Struts
1.0b3 where it was in Struts 1.0b1 so something has definitely been broken
in either b2 or b3.

 -Original Message-
 From: Peter Doyle [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, 7 June 2001 4:29 a.m.
 To: [EMAIL PROTECTED]
 Subject: RE: invalid multipart request in beta 3
 
 
 The form tag uses enctype multipart/form-data. Uploading is not the
 problem. The file uploads okay. When I forward to the next 
 action I get the
 error. I'm wondering if the request is wrapped in a Mulitpart 
 request of
 some kind.
 
 Peter
 
 
 -Original Message-
 From: Biswas Amalendu [mailto:[EMAIL PROTECTED]]
 Sent: 06 June 2001 16:42
 To: [EMAIL PROTECTED]
 Subject: Re: invalid multipart request in beta 3
 
 
 Hi Peter,
 
 I have a file upload program and I am using b3 and everything 
 is working
 just fine. Would you make sure that you set the enctype to
 multipart/form-data on your form tag.
 
 Thanks,
 Amalendu Biswas.
 
 
 From: Peter Doyle [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: invalid multipart request in beta 3
 Date: Wed, 6 Jun 2001 15:44:58 +0100
 
 Hi,
   I recently changed from Struts b1 to b3. (I skipped b2) I have doe
 working
 with b1 to handle uploading, based on the upload application 
 that came with
 struts. Since changed to b3 I get the following error:
 
 javax.servlet.ServletException: MultipartIterator: invalid multipart
 request
 data, doesn't start with boundary
 
 I cannot find what has changed between struts b1 and b3 that 
 would cause
 this. I cannot find a way to resolve it. The code in my upload action
 executes and finishes. Control is passed to the controller 
 servlet where
 this problem occurs.
 
 I would appreciate any help
 
 Thanks,
 Peter
 
 
 
 javax.servlet.ServletException: MultipartIterator: invalid multipart
 request
 data, doesn't start with boundary
  at
 org.apache.struts.upload.MultipartIterator.parseRequest(Multi
 partIterator.j
 a
 va:345)
  at 
 org.apache.struts.upload.MultipartIterator.(MultipartIterator.
 java:152)
  at
 org.apache.struts.upload.DiskMultipartRequestHandler.handleRe
 quest(DiskMult
 i
 partRequestHandler.java:65)
  at 
 org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
  at
 org.apache.struts.action.ActionServlet.processPopulate(Action
 Servlet.java:2
 0
 53)
  at 
 org.apache.struts.action.ActionServlet.process(ActionServlet.j
 ava:1563)
  at 
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
  at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
  at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
  at
 allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunReques
 tDispatcher.ja
 v
 a:88)
  at
 org.apache.struts.action.ActionServlet.processActionForward(A
 ctionServlet.j
 a
 va:1758)
  at 
 org.apache.struts.action.ActionServlet.process(ActionServlet.j
 ava:1595)
  at 
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
  at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
  at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
  at
 allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunReques
 tDispatcher.ja
 v
 a:88)
  at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
  at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
  at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
  at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
  at allaire.jrun.WorkerThread.run(WorkerThread.java:74)
 
 
 
 
 
 --
 __
 Peter Doyle  TEO Media Ireland
 [EMAIL PROTECTED] http://www.teomedia.com
 Ph +353 1 888 1353  Fx +353 1 888 1354
 Unit 8 Scotch Berth, North Wall, Dublin 1, Ireland
 __
 
 
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com
 



Re: Problem with nested html:form

2001-06-06 Thread Marc Eckart



I do not believe that you are allowed to have nested forms in html (though
correct me if I'm wrong!).

Dave

But we need something like nested forms, because we have actions for a list
of objects and actions for a single one of these objects.

Do you have any idea how to realize it in an other way.

Marc











RE: Moving from Struts 1.0b1 to Struts 1.0b3

2001-06-06 Thread Graeme Miller

Unfortunately in my case the controller is not reused but the form bean is,
meaning if I was to do this validation in the controller I would have to do
it for every Action that uses this bean.  Thanks for the suggestion but it
looks like I will have to stay on b1 until a more stable release of Struts
comes out (maybe the 1.0 final release?)

 -Original Message-
 From: Biswas Amalendu [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, 7 June 2001 3:31 a.m.
 To: [EMAIL PROTECTED]
 Subject: Re: Moving from Struts 1.0b1 to Struts 1.0b3
 
 
 Graeme Miller,
 
 As a solution you can have your controller do the validation 
 instead of 
 validating in the form bean. Let me know if you need any further help.
 
 Thanks,
 Amalendu Biswas.
 
 From: Graeme Miller [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]' 
 [EMAIL PROTECTED]
 Subject: Moving from Struts 1.0b1 to Struts 1.0b3
 Date: Wed, 6 Jun 2001 18:07:59 +1200
 
 As no-one has provided any thoughts on this one I thought I 
 would repost 
 and
 give a bit more detail on how the error is being caused.
 
 Problem: The validate(mapping, request) method on the 
 ActionForm class is
 not completing sucessfully in Struts 1.0b3 where it was in 
 Struts 1.0b1.
 
 Detail: This is a form that has a couple of struts file 
 upload controls on
 it (as well as text fields etc) so I suppose that might be 
 related somehow.
 The exception being thrown in the log is :-
 
 java.lang.ClassCastException:
 org.apache.struts.upload.MultipartRequestWrapper
  at
 org.apache.tomcat.facade.RequestDispatcherImpl.forward(Reques
 tDispatcherImpl
 .java:144)
  at
 org.apache.struts.action.ActionServlet.processValidate(Action
 Servlet.java:21
 37)
  at
 org.apache.struts.action.ActionServlet.process(ActionServlet.
 java:1564)
  at
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
  at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
  at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
 org.apache.tomcat.core.ServletWrapper.doService(ServletWrappe
 r.java:404)
  at 
 org.apache.tomcat.core.Handler.service(Handler.java, Compiled
 Code)
  at
 org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.
 java, Compiled
 Code)
  at
 org.apache.tomcat.core.ContextManager.internalService(Context
 Manager.java:79
 7)
  at
 org.apache.tomcat.core.ContextManager.service(ContextManager.
 java:743)
  at
 org.apache.tomcat.service.connector.Ajp12ConnectionHandler.pr
 ocessConnection
 (Ajp12ConnectionHandler.java:166)
 
  at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
 Compiled Code)
  at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadP
 ool.java,
 Compiled Code)
  at java.lang.Thread.run(Thread.java:479)
 
 Does anyone have any ideas?  This one has got me totally stumped and 
 without
 a solution we will have to remain on Struts 1.0b1.
 
 Thanks in advance,
 
 Graeme.
 
 -Original Message-
 From: Graeme Miller [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 5 June 2001 5:02 p.m.
 To: '[EMAIL PROTECTED]'
 Subject: Moving from Struts 1.0b1 to Struts 1.0b3
 
 
 Currently having a problem with migrating code from using 
 Struts 1.0b1 to
 Struts 1.0b3
 
 Everything seems to work fine apart from the fact that the 
 validate methods
 on our form beans (ie subclasses of 
 org.apache.struts.action.ActionForm) no
 longer get called successfully.  I have had a look through 
 the release 
 notes
 and cannot find any reasons why these methods would no longer work.
 
 Any ideas people?  The following error is what gets thrown 
 in the tomcat
 log.
 
 java.lang.ClassCastException
  at
 org.apache.tomcat.facade.RequestDispatcherImpl.forward(Reques
 tDispatcherImpl
 .java, Compiled Code)
  at
 org.apache.struts.action.ActionServlet.processValidate(Action
 Servlet.java,
 Compiled Code)
  at
 org.apache.struts.action.ActionServlet.process(ActionServlet.
 java, Compiled
 Code)
  at
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
  at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
  at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
 org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java,
 Compiled Code)
  at 
 org.apache.tomcat.core.Handler.service(Handler.java, Compiled
 Code)
  at
 org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.
 java, Compiled
 Code)
  at
 org.apache.tomcat.core.ContextManager.internalService(Context
 Manager.java,
 Compiled Code)
  at
 org.apache.tomcat.core.ContextManager.service(ContextManager.
 java, Compiled
 Code)
  at
 org.apache.tomcat.service.connector.Ajp12ConnectionHandler.pr
 ocessConnection
 (Ajp12ConnectionHandler.java, Com
 piled Code)
  at
 

Re: Problem with nested html:form

2001-06-06 Thread dhay



Can you explain your situation further?  Would frames help?

Dave





Marc Eckart [EMAIL PROTECTED] on 06/06/2001 06:20:28 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Re: Problem with nested html:form





I do not believe that you are allowed to have nested forms in html (though
correct me if I'm wrong!).

Dave

But we need something like nested forms, because we have actions for a list
of objects and actions for a single one of these objects.

Do you have any idea how to realize it in an other way.

Marc

















RE: Problem with nested html:form

2001-06-06 Thread Jann VanOver

Yes.  I can't tell you if STRUTS addresses this, but with HTML and
Javascript you have a lot of control over what happens before a form is
submitted.  

-Original Message-
From: Marc Eckart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 3:20 PM
To: [EMAIL PROTECTED]
Subject: Re: Problem with nested html:form




I do not believe that you are allowed to have nested forms in html (though
correct me if I'm wrong!).

Dave

But we need something like nested forms, because we have actions for a list
of objects and actions for a single one of these objects.

Do you have any idea how to realize it in an other way.

Marc










Re: Problem with nested html:form

2001-06-06 Thread Marc Eckart

 Can you explain your situation further?  Would frames help?

 Dave


I don't think so.
We have a list of pictures. Now we want to delete some of the photos by
selecting checkboxes and press a delete button. But we also want to move the
pictures up and down by pressing on a button associated to each picture.
So we need nested forms.
The outer form is for deleting the pictures and the inner form(s) is(are)
for moving up and down.

Marc




Re: Problem with nested html:form

2001-06-06 Thread John Raley

This is definitely a challenge.  You can use a single form with multiple 
submits, each with a meaningful name.  The name will be sent with the 
request - use the name to select the appropriate action.

Marc Eckart wrote:


But we need something like nested forms, because we have actions for a list
of objects and actions for a single one of these objects.

Do you have any idea how to realize it in an other way.

Marc















Re: Problem with nested html:form

2001-06-06 Thread Marc Eckart



 Yes.  I can't tell you if STRUTS addresses this, but with HTML and
 Javascript you have a lot of control over what happens before a form is
 submitted.

How do you mean this. How can I control which action is commited with HTML
and Javascript ?

Marc




Iterate tag exception: bean not found in scope null

2001-06-06 Thread Joachim Heck
Title: Iterate tag exception: bean not found in scope null






 I saw some messages posted about this issue, which I think I may understand, so I thought I'd post my experiences. I was getting this jsp exception when trying to use bean:write inside logic:iterate. The code looked fine. Turns out I was missing the taglib include for the logic library! After adding

%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %


 to my JSP, my iterate and write statements worked fine.


 Hopefully anyone who's been having trouble with this will find that this was their problem as well. Good luck!


-joachim





Re: Problem with nested html:form

2001-06-06 Thread Ted Husted

Struts doesn't have anything to do with it at this point; it's all up to
the client (e.g. browser).

The client eventually sends a request to an Action, and then Struts can
go to work again. 

The only option when HTML doesn't meet your needs is to move to an
applet. 

Marc Eckart wrote:
 
 I do not believe that you are allowed to have nested forms in html (though
 correct me if I'm wrong!).
 
 Dave
 
 But we need something like nested forms, because we have actions for a list
 of objects and actions for a single one of these objects.
 
 Do you have any idea how to realize it in an other way.
 
 Marc



Re: Moving from Struts 1.0b1 to Struts 1.0b3

2001-06-06 Thread Ted Husted

Could you subclass the Actions so that they can reuse the validation
code?

Be sure to register this at Bugzilla if you believe it is a bug.

Graeme Miller wrote:
 Unfortunately in my case the controller is not reused but the form bean is,
 meaning if I was to do this validation in the controller I would have to do
 it for every Action that uses this bean.  Thanks for the suggestion but it
 looks like I will have to stay on b1 until a more stable release of Struts
 comes out (maybe the 1.0 final release?)



Re: How to add .props files to web.xml

2001-06-06 Thread kuma.cra

Hi, maybe off track but nevertheless do i have to map a resource file as
i want to include a cascade style sheet that my company use on our
web-site. Thus i have created a resource file beneath
/WEB-INF/resource/bbnpa.css.

Please point me in the right direction cheers.Chuck

Jon.Ridgway wrote:
 
 Hi Manoj,
 
 Note the application init-param below. So struts will look in
 classes/net/itwa for the resource file in this example running under Tomcat.
 
 Snip...
 
 !-- Action Servlet Configuration --
   servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 init-param
   param-nameapplication/param-name
   param-valuenet.itwa.ApplicationResources/param-value
 /init-param
 init-param
   param-nameconfig/param-name
   param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param
   param-namedebug/param-name
   param-value2/param-value
 /init-param
 init-param
   param-namedetail/param-name
   param-value2/param-value
 /init-param
 init-param
   param-namevalidate/param-name
   param-valuetrue/param-value
 /init-param
 load-on-startup2/load-on-startup
   /servlet
 
   !-- Action Servlet Mapping --
   servlet-mapping
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
   /servlet-mapping
 
 Jon.
 
 -Original Message-
 From: Wes Bramhall [mailto:[EMAIL PROTECTED]]
 Sent: 06 June 2001 15:20
 To: '[EMAIL PROTECTED]'
 Subject: Q: How to add .props files to web.xml
 
 Sorry for being a complete newbie, but what is the XML for adding this file
 to web.xml?
 
 ApplicationResources.properties
 
 Thanks much,
 -Wes
 
 -Original Message-
 From: Manoj Deb [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 05, 2001 10:57 PM
 To: [EMAIL PROTECTED]
 Subject: RE: More help Plz: Exception thrown processing JSP page...
 
 You can keep it in any dir in web tier, but there should be an entry in
 web.xml.
 
 Rgds,
 Manoj



RE: Problem with nested html:form

2001-06-06 Thread Anthony Martin

You can think of link (href) as a form action request.  Why not trigger a
delete or order control or both that way?


Anthony

-Original Message-
From: Marc Eckart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 3:42 PM
To: [EMAIL PROTECTED]
Subject: Re: Problem with nested html:form




 Yes.  I can't tell you if STRUTS addresses this, but with HTML and
 Javascript you have a lot of control over what happens before a form is
 submitted.

How do you mean this. How can I control which action is commited with HTML
and Javascript ?

Marc



ClassNotFound Exception in struts-example (b3)???

2001-06-06 Thread Ritter, Steve

Hello, I've got struts-b3 installed here and we were stepping through the 
struts-example.  A problem arises when I click on the submit button in logon.jsp -- 
I get a ClassNotFound exception:

[06/06/2001 16:12:39:511|17000] (ERROR) request_handler: Servlet Error: 
ClassNotFoundException: logon

I used the correct username password (user, pass) so I would have expected to get 
forwarded to mainMenu.jsp via the success foward mapping.  Any ideas what might be 
wrong?

--Steve



Problem with struts example

2001-06-06 Thread Renee . Petris

Has anyone run into this problem? When I try to run the struts-example page
I get the following error:

org.apache.jasper.JasperException: Unable to compile class for
JSP/home/carol/web/enhydra3.1/work/Struts/_0002findex_0002ejspindex_jsp_0.java:72:

Incompatible type for method. Can't convert java.lang.String to boolean.
_jspx_th_html_html_11.setLocale(true);


The java code generated which causes this error looks like:

org.apache.struts.taglib.html.HtmlTag _jspx_th_html_html_11
= new org.apache.struts.taglib.html.HtmlTag();
_jspx_th_html_html_11.setPageContext(pageContext);
_jspx_th_html_html_11.setParent(null);
_jspx_th_html_html_11.setLocale(true);

I've only got one version of struts.jar, the one that was packed in
struts-example.war. I'm running struts using Enhydra 3.1 on RedHat 7.1.

Renee Petris
[EMAIL PROTECTED]




No clue what is wrong...

2001-06-06 Thread Wes Bramhall

Thanks for all your help.  You've verified, as far as I can tell, that I
have everything in the right places and saying the right stuff.  Here's all
the information I have and maybe you can see what I'm doing wrong... (any
other information I need to supply?  Windows2k box running JRUN.  Struts.jar
is in JRUN's classpath for compiliing.)

Thanks in advance,
-Wes

The error:
/struts-example/index.jsp:

Exception thrown processing JSP page.
javax.servlet.jsp.JspException: Missing message for key index.title
at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242)
at jrun__index2ejspa._jspService(jrun__index2ejspa.java:57)
at
allaire.jrun.jsp.HttpJSPServlet.service(../jsp/HttpJSPServlet.java:39)
at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:228)
at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:196)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416)
at
allaire.jrun.session.JRunSessionService.service(../session/JRunSessionServic
e.java:1082)
at
allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270)
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDis
patcher.java:89)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1552)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1542)
at
allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:364)
at allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:115)
at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)

My web.xml (located in WEB-INF):
web-app

  servlet
servlet-namedatabase/servlet-name
 
servlet-classorg.apache.struts.webapp.example.DatabaseServlet/servlet-cla
ss
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
load-on-startup1/load-on-startup
  /servlet
  
  servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameapplication/param-name
 
param-valueorg.apache.struts.webapp.example.ApplicationResources/param-va
lue
/init-param
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
init-param
  param-namedetail/param-name
  param-value2/param-value
/init-param
init-param
  param-namevalidate/param-name
  param-valuetrue/param-value
/init-param
load-on-startup2/load-on-startup
  /servlet
  
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping
  
 
welcome-file-listwelcome-fileindex.jsp/welcome-file/welcome-file-list

  
  taglib
taglib-uri/WEB-INF/app.tld/taglib-uri
taglib-location/WEB-INF/app.tld/taglib-location
  /taglib
  
  taglib
taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
taglib-location/WEB-INF/struts-bean.tld/taglib-location
  /taglib

  taglib
taglib-uri/WEB-INF/struts-html.tld/taglib-uri
taglib-location/WEB-INF/struts-html.tld/taglib-location
  /taglib

  taglib
taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
taglib-location/WEB-INF/struts-logic.tld/taglib-location
  /taglib

/web-app

My App.props (located in WEB-INF\classes\org\apache\struts\webapp\example):
button.cancel=Cancel
button.confirm=Confirm
button.reset=Reset
button.save=Save
database.load=Cannot load database from {0}
error.database.missing=liUser database is missing, cannot validate logon
credentials/li
error.fromAddress.format=liInvalid format for From Address/li
error.fromAddress.required=liFrom Address is required/li
error.fullName.required=liFull Name is required/li
error.host.required=liMail Server is required/li
error.noSubscription=liNo Subscription bean in user session/li
error.password.required=liPassword is required/li
error.password2.required=liConfirmation password is required/li
error.password.match=liPassword and confirmation password must match/li
error.password.mismatch=liInvalid username and/or password, please try
again/li
error.replyToAddress.format=liInvalid format for Reply To Address/li
error.transaction.token=liCannot submit this form out of order/li
error.type.invalid=liServer Type must be 'imap' or 'pop3'/li
error.type.required=liServer Type is required/li
error.username.required=liUsername is required/li
error.username.unique=liThat username is already in use - please select
another/li
errors.footer=/ulhr
errors.header=h3font color=redValidation Error/font/h3You must
correct the following error(s) before proceeding:ul
errors.ioException=I/O exception rendering error messages: {0}
heading.autoConnect=Auto
heading.subscriptions=Current Subscriptions
heading.host=Host Name
heading.user=User Name
heading.type=Server Type

RE: No clue what is wrong...

2001-06-06 Thread Abraham Kang

Try changing the following in web.xml:

param-valueorg.apache.struts.webapp.example.ApplicationResources/param-va
lue

to

param-valueorg.apache.struts.webapp.example.App/param-value

I also would rename Apps.props to Apps.properties
I don't know if this makes a major difference.

--Abraham

 -Original Message-
 From: Wes Bramhall [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 06, 2001 12:03 PM
 To: '[EMAIL PROTECTED]'
 Subject: No clue what is wrong...


 Thanks for all your help.  You've verified, as far as I can tell, that I
 have everything in the right places and saying the right stuff.
 Here's all
 the information I have and maybe you can see what I'm doing wrong... (any
 other information I need to supply?  Windows2k box running JRUN.
 Struts.jar
 is in JRUN's classpath for compiliing.)

 Thanks in advance,
 -Wes

 The error:
 /struts-example/index.jsp:

 Exception thrown processing JSP page.
 javax.servlet.jsp.JspException: Missing message for key index.title
   at
 org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242)
   at jrun__index2ejspa._jspService(jrun__index2ejspa.java:57)
   at
 allaire.jrun.jsp.HttpJSPServlet.service(../jsp/HttpJSPServlet.java:39)
   at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:228)
   at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:196)
   at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416)
   at
 allaire.jrun.session.JRunSessionService.service(../session/JRunSes
 sionServic
 e.java:1082)
   at
 allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270)
   at
 allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRun
 RequestDis
 patcher.java:89)
   at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1552)
   at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1542)
   at
 allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:364)
   at allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:115)
   at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
   at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)

 My web.xml (located in WEB-INF):
 web-app

   servlet
 servlet-namedatabase/servlet-name

 servlet-classorg.apache.struts.webapp.example.DatabaseServlet/s
 ervlet-cla
 ss
 init-param
   param-namedebug/param-name
   param-value2/param-value
 /init-param
 load-on-startup1/load-on-startup
   /servlet

   servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 init-param
   param-nameapplication/param-name

 param-valueorg.apache.struts.webapp.example.ApplicationResources
 /param-va
 lue
 /init-param
 init-param
   param-nameconfig/param-name
   param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param
   param-namedebug/param-name
   param-value2/param-value
 /init-param
 init-param
   param-namedetail/param-name
   param-value2/param-value
 /init-param
 init-param
   param-namevalidate/param-name
   param-valuetrue/param-value
 /init-param
 load-on-startup2/load-on-startup
   /servlet

   servlet-mapping
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
   /servlet-mapping


 welcome-file-listwelcome-fileindex.jsp/welcome-file/welcome
 -file-list
 

   taglib
 taglib-uri/WEB-INF/app.tld/taglib-uri
 taglib-location/WEB-INF/app.tld/taglib-location
   /taglib

   taglib
 taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
 taglib-location/WEB-INF/struts-bean.tld/taglib-location
   /taglib

   taglib
 taglib-uri/WEB-INF/struts-html.tld/taglib-uri
 taglib-location/WEB-INF/struts-html.tld/taglib-location
   /taglib

   taglib
 taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
 taglib-location/WEB-INF/struts-logic.tld/taglib-location
   /taglib

 /web-app

 My App.props (located in
 WEB-INF\classes\org\apache\struts\webapp\example):
 button.cancel=Cancel
 button.confirm=Confirm
 button.reset=Reset
 button.save=Save
 database.load=Cannot load database from {0}
 error.database.missing=liUser database is missing, cannot validate logon
 credentials/li
 error.fromAddress.format=liInvalid format for From Address/li
 error.fromAddress.required=liFrom Address is required/li
 error.fullName.required=liFull Name is required/li
 error.host.required=liMail Server is required/li
 error.noSubscription=liNo Subscription bean in user session/li
 error.password.required=liPassword is required/li
 error.password2.required=liConfirmation password is required/li
 error.password.match=liPassword and confirmation password must
 match/li
 error.password.mismatch=liInvalid username and/or password, please try
 again/li
 error.replyToAddress.format=liInvalid format for Reply To Address/li
 error.transaction.token=liCannot submit this form out of order/li
 

Problem with struts example - more info

2001-06-06 Thread Renee . Petris


I've just setup Struts to work with Tomcat under Win2K. Everything works
fine. What I noticed is that the generated page is different. The
quotations around true are not present when I'm running under Win2K. So I
get  setLocale(true) not setLocale(true). If someone knows what
could be causing the difference that would be a great help. I used the
.tar.gz binary distribution for my RedHat box and the .zip distribution for
the Win2K box.

Renee Petris
[EMAIL PROTECTED]



   
 
Renee.Petris@  
 
majiq.comTo: [EMAIL PROTECTED]
 
 cc:   
 
06/06/2001   Subject: Problem with struts example  
 
05:29 PM   
 
Please 
 
respond to 
 
struts-user
 
   
 
   
 




Has anyone run into this problem? When I try to run the struts-example page
I get the following error:

org.apache.jasper.JasperException: Unable to compile class for
JSP/home/carol/web/enhydra3.1/work/Struts/_0002findex_0002ejspindex_jsp_0.java:72:


Incompatible type for method. Can't convert java.lang.String to boolean.
_jspx_th_html_html_11.setLocale(true);


The java code generated which causes this error looks like:

org.apache.struts.taglib.html.HtmlTag _jspx_th_html_html_11
= new org.apache.struts.taglib.html.HtmlTag();
_jspx_th_html_html_11.setPageContext(pageContext);
_jspx_th_html_html_11.setParent(null);
_jspx_th_html_html_11.setLocale(true);

I've only got one version of struts.jar, the one that was packed in
struts-example.war. I'm running struts using Enhydra 3.1 on RedHat 7.1.

Renee Petris
[EMAIL PROTECTED]








RE: No clue what is wrong...

2001-06-06 Thread Wes Bramhall

Oh.. sorry.  I was just trying to abbreviate.  It is named
ApplicationResources.properties.

-Original Message-
From: Steven Leija [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 4:03 PM
To: [EMAIL PROTECTED]
Subject: Re: No clue what is wrong...


In your configuration file, you are pointing to an
ApplicationResources.properties file and it looks like you named your own
properties file called App.props

so your path would be:

org.apache.struts.webapp.example.App

Steven



Re[2]: Scratch RowSets

2001-06-06 Thread Oleg V Alexeev

Hello Steve,

Thank you, good paper.

Thursday, June 07, 2001, 12:31:52 AM, you wrote:

SS Take a look at sun's CachedRowSet now available in early release.

SS http://www.javaworld.com/javaworld/jw-02-2001/jw-0202-cachedrow.html

SS S-


-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Can I have NO action?!

2001-06-06 Thread Oleg V Alexeev

Hello dhay,

Thursday, June 07, 2001, 1:34:00 AM, you wrote:

dlc Hi.  I have a form where I display the current filename, and allow them to
dlc change it.  As such, I don't need to do anything in the action, just let Struts
dlc populate the form bean.

dlc How do I go about this?  Do I need an action that does nothing in its perform
dlc method?  Or can I set things up so no action is needed at all?

What is the source of current filename? Do you retrieve it in your
form class? It is wrong solution if so.

Struts uses scheme with Action class (contains all logic to retrieve,
process and store data), ActionForm class (used to store values
between pages or actions and to validate it after submit), JSP-page as
view (to display values which was processed by Action class and stored
in session or request scope). According to this scheme you need to
implement action if you display by JSP any values fetched from
external source.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





  1   2   >