Digital Signatures

2002-02-18 Thread Adrian Theuma

Hi,
I am a struts user and have a question that might not be related
to struts. My question is about digital signatures. Is there any way in
which you can digitally sign a form with your private key, before
posting the form?

Rgds,
Adrian

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Stumped with nested iterator and nested link

2002-02-18 Thread Arron Bates

CyberZombie wrote:

> I have a Collection...

[ ...cut... ]

The nested tags as of mid Jan (nightly build and separate jars) are able 
to reference the current parent directly using the "this/" or "./" 
properties (same thing, just allowing for different tastes). Any 
property with "/" on the end will be treated as a parent reference. If 
you use anything else eg "somethingElse/" it will also be treated as a 
relative reference and step back through the last parent and reference 
the parent object before it.

This allows you to write out the String value of the current parent 
object, and various other uses like being able to write out a collection 
of Strings etc.

> Note:  Manipulating the Collection as an Array (IMHO) is not a good 
> solution -- and the nested iterator is already pointing at the current 
> transaction. 

What do you mean by this exactly?...


Arron.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Stumped with nested iterator and nested link

2002-02-18 Thread CyberZombie

I have a Collection of transactions that I want to be able to provide 
HREFs to.  What I'm looking to do is create a bunch of references, each 
with their own query tag -- i.e., 
"/do/secure/viewTrans?transactionKey=1001".  The following doesn't die 
(both the property and paramProperty tags must be specified or the 
nested:link tag dies with a null pointer exception on lines 96, 97 
respectively).  But it only produces "/do/secure/viewTrans" -- no query.


  

  

  

  

  


I suspect this has to do with the nested library not being able to 
return a reference to the current name as a property.  I'll probably 
just write my own nested tag that can handle the links as I see fit. 
 Does anyone have any other suggestions?  Note:  Manipulating the 
Collection as an Array (IMHO) is not a good solution -- and the nested 
iterator is already pointing at the current transaction.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Tiles examples in Jbuilder5 and Tomcat 4 ?

2002-02-18 Thread John Menke

Rob,

I have changed the tomcat directory name to g:\tomcat.  Everything builds
correctly but I still get the No Realm error.

Other web applications run fine with Tomcat4 inside JBuilder so I think my
settings for Tomcat are correct...

I have the VM options set:

-classic -Dcatalina_home="g:\tomcat"  -Dcatalina_base="g:\tomcat"

Here is the error:



ContextConfig[/tilesdoc]: No Realm has been configured to authenticate
against
ContextConfig[/tilesdoc]: Marking this application unavailable due to
previous error(s)




Here is the full trace:

C:\jbuilder5\jdk1.3\bin\javaw -classic -classpath
"G:\Tomcat\bin\bootstrap.jar;G:\Tomcat\lib\jasper-compiler.jar;G:\Tomcat\lib
\jasper-runtime.jar;G:\Tomcat\lib\naming-factory.jar;G:\Tomcat\common\lib\ac
tivation.jar;G:\Tomcat\common\lib\jdbc2_0-stdext.jar;G:\Tomcat\common\lib\jn
di.jar;G:\Tomcat\common\lib\jta.jar;G:\Tomcat\common\lib\mail.jar;G:\Tomcat\
common\lib\naming-common.jar;G:\Tomcat\common\lib\naming-resources.jar;G:\To
mcat\common\lib\servlet.jar;G:\Tomcat\common\lib\tools.jar;G:\Tomcat\common\
lib\tyrex-0.9.7.0.jar;G:\Tomcat\common\lib\xerces.jar;G:\Tomcat\server\lib\c
atalina.jar;G:\Tomcat\server\lib\jakarta-regexp-1.2.jar;G:\Tomcat\server\lib
\servlets-common.jar;G:\Tomcat\server\lib\servlets-default.jar;G:\Tomcat\ser
ver\lib\servlets-invoker.jar;G:\Tomcat\server\lib\servlets-manager.jar;G:\To
mcat\server\lib\servlets-snoop.jar;G:\Tomcat\server\lib\servlets-webdav.jar;
G:\Tomcat\server\lib\tomcat-ajp.jar;G:\Tomcat\server\lib\tomcat-util.jar;G:\
Tomcat\server\lib\warp.jar;G:\Tomcat\webapps\tiles-doc\WEB-INF\lib\commons-b
eanutils.jar;G:\Tomcat\webapps\tiles-doc\WEB-INF\lib\commons-collections.jar
;G:\Tomcat\webapps\tiles-doc\WEB-INF\lib\commons-digester.jar;G:\Tomcat\weba
pps\tiles-doc\WEB-INF\lib\struts.jar;G:\Tomcat\webapps\tiles-doc\WEB-INF\lib
\tiles.jar;C:\jbuilder5\jdk1.3\demo\jfc\Java2D\Java2Demo.jar;C:\jbuilder5\jd
k1.3\jre\lib\i18n.jar;C:\jbuilder5\jdk1.3\jre\lib\jaws.jar;C:\jbuilder5\jdk1
.3\jre\lib\rt.jar;C:\jbuilder5\jdk1.3\jre\lib\sunrsasign.jar;C:\jbuilder5\jd
k1.3\lib\dt.jar;C:\jbuilder5\jdk1.3\lib\tools.jar"  -Dcatalina.home="G:/Tomc
at" -Dcatalina_home="g:\tomcat"  -Dcatalina_base="g:\tomcat"
org.apache.catalina.startup.Bootstrap start -config "C:\Documents and
Settings\john1\jbproject\tilesdoc\conf\server8080.xml"
HttpConnector Opening server socket on all host IP addresses
Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
WebappLoader[/tilesdoc]: Deploying class repositories to work directory
C:\Documents and Settings\john1\jbproject\tilesdoc\work\tilesdoc
WebappLoader[/tilesdoc]: Deploy JAR /WEB-INF/lib/commons-beanutils.jar to
G:\Tomcat\webapps\tiles-doc\WEB-INF\lib\commons-beanutils.jar
WebappLoader[/tilesdoc]: Deploy JAR /WEB-INF/lib/commons-collections.jar to
G:\Tomcat\webapps\tiles-doc\WEB-INF\lib\commons-collections.jar
WebappLoader[/tilesdoc]: Deploy JAR /WEB-INF/lib/commons-digester.jar to
G:\Tomcat\webapps\tiles-doc\WEB-INF\lib\commons-digester.jar
WebappLoader[/tilesdoc]: Deploy JAR /WEB-INF/lib/struts.jar to
G:\Tomcat\webapps\tiles-doc\WEB-INF\lib\struts.jar
WebappLoader[/tilesdoc]: Deploy JAR /WEB-INF/lib/tiles.jar to
G:\Tomcat\webapps\tiles-doc\WEB-INF\lib\tiles.jar
StandardManager[/tilesdoc]: Seeding random number generator class
java.security.SecureRandom
StandardManager[/tilesdoc]: Seeding of random number generator has been
completed
ContextConfig[/tilesdoc]: No Realm has been configured to authenticate
against
ContextConfig[/tilesdoc]: Marking this application unavailable due to
previous error(s)
StandardContext[/tilesdoc]: Error initializing naming context for context
/tilesdoc
StandardContext[/tilesdoc]: Context startup failed due to previous errors
StandardContext[/tilesdoc]: Error initializing naming context for context
/tilesdoc
WebappLoader[]: Deploying class repositories to work directory C:\Documents
and Settings\john1\jbproject\tilesdoc\work
StandardManager[]: Seeding random number generator class
java.security.SecureRandom
StandardManager[]: Seeding of random number generator has been completed
StandardWrapper[:default]: Loading container servlet default
StandardWrapper[:invoker]: Loading container servlet invoker
HttpConnector[8080] Starting background thread


-Original Message-
From: Robert D. Morse [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 7:52 PM
To: Struts Users Mailing List
Subject: RE: Tiles examples in Jbuilder5 and Tomcat 4 ?


Other things to look at:

In project...project properties...run be sure to have the following VM
parameters set:

-classic -Dcatalina_home=path to your tomcat
installation -Dcatalina_base=path to tomcat installation

It looks like you have the path set to g:/jakarta tomcat.  Not sure if it
likes the space in the directory name.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Null Pointer Exception with Validator MessagesTag.java:253 -- Nevermind

2002-02-18 Thread Robert D. Morse

Never mind.  A typo in my ApplicationResources.properties files was
preventing it from finding the 'errors.required' message.  Perhaps a log
message to indicate that a specified message could not be located in
addition to the exception would help track this down.

-Original Message-
From: Robert D. Morse [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 1:38 PM
To: Struts Users Mailing List
Subject: Null Pointer Exception with Validator MessagesTag.java:253


I'm integrating the validator into an existing Struts application.  The
validation works properly (i.e., it checks for proper of length, content,
etc., of fields that I specify), however, when it comes to printing the
messages to the user, I get a NPE in MessagesTag.doStartTag:253
(pageContext.setAttribute(id, msg)).

In my jsp file I have:








I know that the  works properly because everthing is
fine when the page first displays.  It's obvious to me that it's with the
'id="error"', but quite frankly, I'm not sure what it should be or how to
fix it.  Thanks.


---
Robert D. Morse
[EMAIL PROTECTED]
PGP Key:  D9C4AA6A
PGP Finger Print:  ED56 DEEA 95CF AC99 C2B0  77D4 7D92 ACCA D9C4 AA6A


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Tiles examples in Jbuilder5 and Tomcat 4 ?

2002-02-18 Thread Robert D. Morse

Other things to look at:

In project...project properties...run be sure to have the following VM
parameters set:

-classic -Dcatalina_home=path to your tomcat
installation -Dcatalina_base=path to tomcat installation

It looks like you have the path set to g:/jakarta tomcat.  Not sure if it
likes the space in the directory name.

-Original Message-
From: John Menke [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 10:48 PM
To: Struts Users Mailing List
Subject: RE: Tiles examples in Jbuilder5 and Tomcat 4 ?


Robert,

I am using the Tomcat4.02 binary from the jakarta site.  I still get the
error:

It seems that either a Realm has to be configured or the naming context is
giving me problems:


ContextConfig[/tilesdoc]: No Realm has been configured to authenticate
against
ContextConfig[/tilesdoc]: Marking this application unavailable due to
previous error(s)
StandardContext[/tilesdoc]: Error initializing naming context for context
/tilesdoc
StandardContext[/tilesdoc]: Context startup failed due to previous errors


Here is the entire trace:


C:\jbuilder5\jdk1.3\bin\javaw -classpath "G:\Apache Tomcat
4.0\bin\bootstrap.jar;G:\Apache Tomcat 4.0\lib\jasper-compiler.jar;G:\Apache
Tomcat 4.0\lib\jasper-runtime.jar;G:\Apache Tomcat
4.0\lib\naming-factory.jar;G:\Apache Tomcat
4.0\server\lib\catalina.jar;G:\Apache Tomcat
4.0\server\lib\jakarta-regexp-1.2.jar;G:\Apache Tomcat
4.0\server\lib\servlets-common.jar;G:\Apache Tomcat
4.0\server\lib\servlets-default.jar;G:\Apache Tomcat
4.0\server\lib\servlets-invoker.jar;G:\Apache Tomcat
4.0\server\lib\servlets-manager.jar;G:\Apache Tomcat
4.0\server\lib\servlets-snoop.jar;G:\Apache Tomcat
4.0\server\lib\servlets-webdav.jar;G:\Apache Tomcat
4.0\server\lib\tomcat-ajp.jar;G:\Apache Tomcat
4.0\server\lib\tomcat-util.jar;G:\Apache Tomcat
4.0\server\lib\warp.jar;G:\Apache Tomcat
4.0\common\lib\activation.jar;G:\Apache Tomcat
4.0\common\lib\jdbc2_0-stdext.jar;G:\Apache Tomcat
4.0\common\lib\jndi.jar;G:\Apache Tomcat 4.0\common\lib\jta.jar;G:\Apache
Tomcat 4.0\common\lib\mail.jar;G:\Apache Tomcat
4.0\common\lib\naming-common.jar;G:\Apache Tomcat
4.0\common\lib\naming-resources.jar;G:\Apache Tomcat
4.0\common\lib\servlet.jar;G:\Apache Tomcat
4.0\common\lib\tools.jar;G:\Apache Tomcat
4.0\common\lib\tyrex-0.9.7.0.jar;G:\Apache Tomcat
4.0\common\lib\xerces.jar;G:\Apache Tomcat
4.0\webapps\tiles-doc\WEB-INF\lib\commons-beanutils.jar;G:\Apache Tomcat
4.0\webapps\tiles-doc\WEB-INF\lib\commons-collections.jar;G:\Apache Tomcat
4.0\webapps\tiles-doc\WEB-INF\lib\commons-digester.jar;G:\Apache Tomcat
4.0\webapps\tiles-doc\WEB-INF\lib\struts.jar;G:\Apache Tomcat
4.0\webapps\tiles-doc\WEB-INF\lib\tiles.jar;C:\jbuilder5\jdk1.3\demo\jfc\Jav
a2D\Java2Demo.jar;C:\jbuilder5\jdk1.3\jre\lib\i18n.jar;C:\jbuilder5\jdk1.3\j
re\lib\jaws.jar;C:\jbuilder5\jdk1.3\jre\lib\rt.jar;C:\jbuilder5\jdk1.3\jre\l
ib\sunrsasign.jar;C:\jbuilder5\jdk1.3\lib\dt.jar;C:\jbuilder5\jdk1.3\lib\too
ls.jar"  -Dcatalina.home="G:/Apache Tomcat 4.0"
org.apache.catalina.startup.Bootstrap start -config "C:\Documents and
Settings\john1\jbproject\tilesdoc\conf\server8080.xml"
HttpConnector Opening server socket on all host IP addresses
Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
WebappLoader[/tilesdoc]: Deploying class repositories to work directory
C:\Documents and Settings\john1\jbproject\tilesdoc\work\tilesdoc
WebappLoader[/tilesdoc]: Deploy JAR /WEB-INF/lib/commons-beanutils.jar to
G:\Apache Tomcat 4.0\webapps\tiles-doc\WEB-INF\lib\commons-beanutils.jar
WebappLoader[/tilesdoc]: Deploy JAR /WEB-INF/lib/commons-collections.jar to
G:\Apache Tomcat 4.0\webapps\tiles-doc\WEB-INF\lib\commons-collections.jar
WebappLoader[/tilesdoc]: Deploy JAR /WEB-INF/lib/commons-digester.jar to
G:\Apache Tomcat 4.0\webapps\tiles-doc\WEB-INF\lib\commons-digester.jar
WebappLoader[/tilesdoc]: Deploy JAR /WEB-INF/lib/struts.jar to G:\Apache
Tomcat 4.0\webapps\tiles-doc\WEB-INF\lib\struts.jar
WebappLoader[/tilesdoc]: Deploy JAR /WEB-INF/lib/tiles.jar to G:\Apache
Tomcat 4.0\webapps\tiles-doc\WEB-INF\lib\tiles.jar
StandardManager[/tilesdoc]: Seeding random number generator class
java.security.SecureRandom
StandardManager[/tilesdoc]: Seeding of random number generator has been
completed
ContextConfig[/tilesdoc]: No Realm has been configured to authenticate
against
ContextConfig[/tilesdoc]: Marking this application unavailable due to
previous error(s)
StandardContext[/tilesdoc]: Error initializing naming context for context
/tilesdoc
StandardContext[/tilesdoc]: Context startup failed due to previous errors
StandardContext[/tilesdoc]: Error initializing naming context for context
/tilesdoc
WebappLoader[]: Deploying class repositories to work directory C:\Documents
and Settings\john1\jbproject\tilesdoc\work
StandardManager[]: Seeding random number generator class
java.security.SecureRandom
StandardManager[]: Seeding of random number generator has been completed
StandardWrapper[:default]: Loading container servlet default
StandardWrappe

RE: Tiles examples in Jbuilder5 and Tomcat 4 ?

2002-02-18 Thread John Menke

Robert,

I am using the Tomcat4.02 binary from the jakarta site.  I still get the
error:

It seems that either a Realm has to be configured or the naming context is
giving me problems:


ContextConfig[/tilesdoc]: No Realm has been configured to authenticate
against
ContextConfig[/tilesdoc]: Marking this application unavailable due to
previous error(s)
StandardContext[/tilesdoc]: Error initializing naming context for context
/tilesdoc
StandardContext[/tilesdoc]: Context startup failed due to previous errors


Here is the entire trace:


C:\jbuilder5\jdk1.3\bin\javaw -classpath "G:\Apache Tomcat
4.0\bin\bootstrap.jar;G:\Apache Tomcat 4.0\lib\jasper-compiler.jar;G:\Apache
Tomcat 4.0\lib\jasper-runtime.jar;G:\Apache Tomcat
4.0\lib\naming-factory.jar;G:\Apache Tomcat
4.0\server\lib\catalina.jar;G:\Apache Tomcat
4.0\server\lib\jakarta-regexp-1.2.jar;G:\Apache Tomcat
4.0\server\lib\servlets-common.jar;G:\Apache Tomcat
4.0\server\lib\servlets-default.jar;G:\Apache Tomcat
4.0\server\lib\servlets-invoker.jar;G:\Apache Tomcat
4.0\server\lib\servlets-manager.jar;G:\Apache Tomcat
4.0\server\lib\servlets-snoop.jar;G:\Apache Tomcat
4.0\server\lib\servlets-webdav.jar;G:\Apache Tomcat
4.0\server\lib\tomcat-ajp.jar;G:\Apache Tomcat
4.0\server\lib\tomcat-util.jar;G:\Apache Tomcat
4.0\server\lib\warp.jar;G:\Apache Tomcat
4.0\common\lib\activation.jar;G:\Apache Tomcat
4.0\common\lib\jdbc2_0-stdext.jar;G:\Apache Tomcat
4.0\common\lib\jndi.jar;G:\Apache Tomcat 4.0\common\lib\jta.jar;G:\Apache
Tomcat 4.0\common\lib\mail.jar;G:\Apache Tomcat
4.0\common\lib\naming-common.jar;G:\Apache Tomcat
4.0\common\lib\naming-resources.jar;G:\Apache Tomcat
4.0\common\lib\servlet.jar;G:\Apache Tomcat
4.0\common\lib\tools.jar;G:\Apache Tomcat
4.0\common\lib\tyrex-0.9.7.0.jar;G:\Apache Tomcat
4.0\common\lib\xerces.jar;G:\Apache Tomcat
4.0\webapps\tiles-doc\WEB-INF\lib\commons-beanutils.jar;G:\Apache Tomcat
4.0\webapps\tiles-doc\WEB-INF\lib\commons-collections.jar;G:\Apache Tomcat
4.0\webapps\tiles-doc\WEB-INF\lib\commons-digester.jar;G:\Apache Tomcat
4.0\webapps\tiles-doc\WEB-INF\lib\struts.jar;G:\Apache Tomcat
4.0\webapps\tiles-doc\WEB-INF\lib\tiles.jar;C:\jbuilder5\jdk1.3\demo\jfc\Jav
a2D\Java2Demo.jar;C:\jbuilder5\jdk1.3\jre\lib\i18n.jar;C:\jbuilder5\jdk1.3\j
re\lib\jaws.jar;C:\jbuilder5\jdk1.3\jre\lib\rt.jar;C:\jbuilder5\jdk1.3\jre\l
ib\sunrsasign.jar;C:\jbuilder5\jdk1.3\lib\dt.jar;C:\jbuilder5\jdk1.3\lib\too
ls.jar"  -Dcatalina.home="G:/Apache Tomcat 4.0"
org.apache.catalina.startup.Bootstrap start -config "C:\Documents and
Settings\john1\jbproject\tilesdoc\conf\server8080.xml"
HttpConnector Opening server socket on all host IP addresses
Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
WebappLoader[/tilesdoc]: Deploying class repositories to work directory
C:\Documents and Settings\john1\jbproject\tilesdoc\work\tilesdoc
WebappLoader[/tilesdoc]: Deploy JAR /WEB-INF/lib/commons-beanutils.jar to
G:\Apache Tomcat 4.0\webapps\tiles-doc\WEB-INF\lib\commons-beanutils.jar
WebappLoader[/tilesdoc]: Deploy JAR /WEB-INF/lib/commons-collections.jar to
G:\Apache Tomcat 4.0\webapps\tiles-doc\WEB-INF\lib\commons-collections.jar
WebappLoader[/tilesdoc]: Deploy JAR /WEB-INF/lib/commons-digester.jar to
G:\Apache Tomcat 4.0\webapps\tiles-doc\WEB-INF\lib\commons-digester.jar
WebappLoader[/tilesdoc]: Deploy JAR /WEB-INF/lib/struts.jar to G:\Apache
Tomcat 4.0\webapps\tiles-doc\WEB-INF\lib\struts.jar
WebappLoader[/tilesdoc]: Deploy JAR /WEB-INF/lib/tiles.jar to G:\Apache
Tomcat 4.0\webapps\tiles-doc\WEB-INF\lib\tiles.jar
StandardManager[/tilesdoc]: Seeding random number generator class
java.security.SecureRandom
StandardManager[/tilesdoc]: Seeding of random number generator has been
completed
ContextConfig[/tilesdoc]: No Realm has been configured to authenticate
against
ContextConfig[/tilesdoc]: Marking this application unavailable due to
previous error(s)
StandardContext[/tilesdoc]: Error initializing naming context for context
/tilesdoc
StandardContext[/tilesdoc]: Context startup failed due to previous errors
StandardContext[/tilesdoc]: Error initializing naming context for context
/tilesdoc
WebappLoader[]: Deploying class repositories to work directory C:\Documents
and Settings\john1\jbproject\tilesdoc\work
StandardManager[]: Seeding random number generator class
java.security.SecureRandom
StandardManager[]: Seeding of random number generator has been completed
StandardWrapper[:default]: Loading container servlet default
StandardWrapper[:invoker]: Loading container servlet invoker
HttpConnector[8080] Starting background thread


-Original Message-
From: Robert D. Morse [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 17, 2002 12:21 PM
To: Struts Users Mailing List
Subject: RE: Tiles examples in Jbuilder5 and Tomcat 4 ?


It seems that the Tomcat version packaged with JBuilder is hosed.  I had the
exact problem under 6.0 Enterprise. Download Tomcat from the Jakarta site
and install it.  Point to that version rather than the one in the JBuilder
dire

RE: Bug with SSL

2002-02-18 Thread Ditlinger, Steve

Yes, in this case, by specifying redirect, you are also clearing out the
posted parameters.  This is OK because you don't need them anymore after the
login action.  However since you proceed directly to another action from the
login action, there is no point where our extension intervenes to send you
to the non-secure action without our own second redirect.  (However, you
have inspired us to perhaps add this feature.) When our code does later
perform the second redirection, there are no post parameters to stick in the
query string 

Internally this posted-parameters-to-query-string process has prompted much
debate.  While we all agree that something like this is needed, we would
like to improve this feature so that we never add parameters to the query
string.  We just haven't figured out how to do it yet.

Until we add the Greg-inspired feature and/or find an alternate general
solution to the query string, you will need to continue to specify
redirect="true" in situations like this to avoid displaying posted data in
the location field.

Thanks,
Steve

-Original Message-
From: Greg Hess [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 7:01 AM
To: Struts Users Mailing List
Subject: RE: Bug with SSL


Max, Steve:

Thank you, my parameters are no longer visible. From what I can see(please
correct me if I am wrong) after the original post using SSL, the SSL process
listening to port(443) decrypts the encrypted post parameters and places
them in the request for the Servlet to process. In the scenario that I am
switching between HTTPS and HTTP in the same request I will always have to
redirect instead of forward to avoid the parameters being visible.

Greg




-Original Message-
From: Ditlinger, Steve [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 16, 2002 1:14 AM
To: 'Max Cooper'; Struts Users Mailing List
Subject: RE: Bug with SSL



Max, Greg:

I successfully tried your given solution.  The posted parameters are no
longer seen in the location field.

Steve


-Original Message-
From: Max Cooper [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 4:16 PM
To: Struts Users Mailing List
Subject: Re: Bug with SSL


Greg,

Please try setting the redirect attribute of your success action forward to
true in the struts-config.xml file, like so:



I'm going to try out this scenario and report back with any additional tips
that I can think of.

-Max

- Original Message -
From: "Greg Hess" <[EMAIL PROTECTED]>
To: "Struts Mail List" <[EMAIL PROTECTED]>
Sent: Friday, February 15, 2002 11:34 AM
Subject: Bug with SSL


> Hi All,
>
> I am using the classes provide by http://struts.ditlinger.com/ to allow
for
> switching between Http and Https calls in my Struts application. I have
> installed SSL and is working fine under a test certificate. I am using the
> the extended 
> ,  and the secure property in my Action definitions. I would
> like my main logonForm to be submitted using SSL and after the username
and
> password are received on the server using SSL to switch back to http. What
> happens is that the secure data posted by logon.jsp is visible in the
> location
>
http://localhost/emailssl-struts/mainPage.do?password=hess&submit=Submit&use
> rname=ghess. I have tried having the LogonAction setRedirect(true) on the
> ActionForward returned but with no success. Unfortunately this is making
my
> secure data visible, how can I fix this bug.
>
> 
>  path="/mainPage"
> type="org.apache.struts.actions.ForwardAction"
> parameter="/maintemplate.jsp">
> 
> 
>
> 
>  path="/logon"
>type="com.wrappedapps.email.LogonAction"
>name="logonForm"
>   scope="request"
>   validate="true"
>   input="/logon.jsp">
>   
>   
> 
>
> Thanks,
> Greg
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: is ActionForm required for Action even if no form on page?

2002-02-18 Thread Victor Hadianto

>
> When I setup an Action, is an ActionForm required even if I dont have a
> form on my page?
>

You can create a mapping that does not require an action form. It works 
perfectly fine. Just don't include the form attribute. Or you can have a 
bollocks form name it works fine.

> I'm getting an error on my page, because I haven't done this, from
> html:errors, but short of getting rid of html:errors, is there a way to
> tell struts I don't need a form?

If you don't have form then you probably don't need the html:errors.


-- 
Victor Hadianto
---
"Call immediately. Time is running out. We both need to do something 
monstrous before we die." -- Message from Ralph Steadman to Hunter Thompson

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Dynamic Properties and Database

2002-02-18 Thread Bryan Field-Elliot

Take a look at my Simper package, which does basically this:

http://www.netmeme.org/simper

Still rough around the edges, but within a week or so, I hope to make a
polished project out of it (hosted at SourceForge). I've been saying
"within a week or so" for about a month now :( but will really try to
get to it soon. In the meantime it's downloadable and usable in it's
current form. Please read the README first, it explains what the whole
project is about.

Bryan


On Fri, 2002-02-15 at 04:11, Peter Pilgrim wrote:

HI

I have had a look Jan Sorenson's  Dynamic Properties contribution

http://husted.com/struts/resources/DynamicProperties.htm

How useful is this code for reading from and writing to arbitary database
tables. It sounds like I can map any database column name to
an action form property.

For example given the SQL table

create table COFFEE (
 coffee_id integer,
 coffee_namevarchar(null),
 coffee_descvarchar(null),
 . . . )

Mapped to action form accessor and mutator

 public int getCoffee_Id() ;
 public void  setCoffee_Id( int ) ;
 . . .

It looks a bit nasty especially the underscores but I think it could work.

Comments

--
Peter Pilgrim ++44 (0)207-545-9923

 Swamped under electionic mails


--

This e-mail may contain confidential and/or privileged information. If you are not 
the intended recipient (or have received this e-mail in error) please notify the 
sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 






Re: Using Struts with mid-large size teams

2002-02-18 Thread Arron Bates

Look into the what the nightly build can do for you. The one thing that 
may help out is the sub-app ability allowing multiple config.xml and 
resource files for each sub-section of your app. I haven't used this 
myself, but to some extent it's why it was created.

Arron.

Robb Nedwick wrote:

>We're about to start a project in which we may be using Struts and the
>Validator extension, and I was wondering about any experiences (good and
>bad) or problems others have had with mid-large size teams when using
>Struts.  The team that will be starting the project will be over 10 people
>(not sure how many more at this point, but probably 10-15 or so).  Most
>people are already experienced with Java/JSP/EJB and we have an established
>architecture for our business tier that is working very well for us.
>
>Struts is being evaluated to help clean up the architecture of our
>presentation tier (we have some "MVC-like" concepts in our current code, but
>Struts seems like a better setup overall right now).  Anyway, I was
>wondering what people's experiences were with this size team.
>
>Some potential problems that strike me right away revolve around the fact
>that there's only 1 struts-config.xml and validation.xml file that all the
>developers will be editing and that this will cause a lot of conflicts for
>that file.  I know there's a patch to allow for multiple struts-config
>files, but haven't found a similar patch for the validation.xml file.  Also,
>the fact that Struts seems to support only a single resource file for I18N
>text seems like it will also cause us problems.
>
>What other problems or good experiences have people run into?  We're getting
>ready to get started soon, and I'm trying to get as much info as I can for
>justifying the move to Struts and to help me with the prototype I've been
>working on for educating the development staff.
>
>Thanks for any answers,
>
>Robb Nedwick
>[EMAIL PROTECTED]
>
>
>_
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Using Struts with mid-large size teams

2002-02-18 Thread Robb Nedwick

We're about to start a project in which we may be using Struts and the
Validator extension, and I was wondering about any experiences (good and
bad) or problems others have had with mid-large size teams when using
Struts.  The team that will be starting the project will be over 10 people
(not sure how many more at this point, but probably 10-15 or so).  Most
people are already experienced with Java/JSP/EJB and we have an established
architecture for our business tier that is working very well for us.

Struts is being evaluated to help clean up the architecture of our
presentation tier (we have some "MVC-like" concepts in our current code, but
Struts seems like a better setup overall right now).  Anyway, I was
wondering what people's experiences were with this size team.

Some potential problems that strike me right away revolve around the fact
that there's only 1 struts-config.xml and validation.xml file that all the
developers will be editing and that this will cause a lot of conflicts for
that file.  I know there's a patch to allow for multiple struts-config
files, but haven't found a similar patch for the validation.xml file.  Also,
the fact that Struts seems to support only a single resource file for I18N
text seems like it will also cause us problems.

What other problems or good experiences have people run into?  We're getting
ready to get started soon, and I'm trying to get as much info as I can for
justifying the move to Struts and to help me with the prototype I've been
working on for educating the development staff.

Thanks for any answers,

Robb Nedwick
[EMAIL PROTECTED]


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


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Problem in getting request parameter

2002-02-18 Thread subhendukumar mohanty

Hi 

I am using websphere test environment with visual age . One of my jsp
has Struts form tag. Inside that form there is no form element but some
static data in form of table. In the action of that form I am passing
some querystring. After submitting the jsp page , inside the action
class the request parameter is being null. If I am adding a dummy hidden
parameter inside the form it is working fine. 

Any pointers on this will be great.

Thanks,
Subhendu

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Using tag around tag. Is it legal?

2002-02-18 Thread Antony Stace

Hi 

Can someone please give me the syntax for defining the action using the contents of
formAction in the  line.

> 
> defaultAction
> 
> 
> /addUser
> 
> 
> 
> /modifyUser
> 
> 
> 
> 
> or 
> 

I get errors when I try and use the above two ways to try and define the action.


Cheers

Tony







> 
> 
> Patrick
> 
> 
> Antony Stace wrote:
> 
> >Hi Ladies and Gentlemen
> >
> >I want to use  tags around a  but I am having
> >errors.  I am not sure if this is allowed in struts.  Can someone please 
>confirmthat this is not or is allowed in struts.
> >
> >The code I have is
> >
> >--snip
> >
> >
> >
> >
> >
> >
> >
> >rest of form definition
> >
> >--snip-
> >
> >The error I am getting is
> >
> >org.apache.jasper.compiler.ParseException: /WEB-INF/pages/clientDetails.jsp(21,0) 
>??:   ???
> > at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
> > at org.apache.jasper.compiler.Parser.parse(Parser.java)
> > at org.apache.jasper.compiler.Parser.parse(Parser.java)
> > at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
> > at org.apache.jasper.compiler.Parser.parse(Parser.java)
> > at org.apache.jasper.compiler.Parser.parse(Parser.java)
> > at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
> > at org.apache.jasper.compiler.Parser.parse(Parser.java)
> > at org.apache.jasper.compiler.Parser.parse(Parser.java)
> > at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java)
> > at org.apache.jasper.compiler.Parser.parse(Parser.java)
> >
> >
> >
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


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


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Newbie: Form bean & JSP tag question

2002-02-18 Thread Chris Means

Hi,

I've got Struts working fine under Tomcat 3.2.1.

Now, I'm trying to tackle how to build the JSP and form bean objects, and
would appreciate some help/input.  FYI:  I am very comfortable with
JSP/Servlets & Java, but I have no experience with the tag library
stuff...though it seems quite intuitive.

I'm creating a form that will control an audio device with controls like:

Mute, Random, Repeat (checkboxes)

Previous, Next, Play/Pause, Stop (buttons)

My questions are:

1)  JSP tags.

How can I get the checkboxes to perform a submit when toggled using the tag
libraries?
I know I can add "this.form.submit()" to the onclick event, but I was
curious if there was a better tag oriented approach.

2)  It seems like my Action should extend the DispatchAction class, with a
method for each basic action.

How would I construct a FormBean that would correctly model both the check
boxes (which have state) verses the buttons which don't (well, Stop, Next
and Previous don't).  Play/Pause would toggle.

I'm not looking for anyone to write this for me, just point me in the right
direction.

TIA.

-Chris


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Null Pointer Exception with Validator MessagesTag.java:253

2002-02-18 Thread Robert D. Morse

I'm integrating the validator into an existing Struts application.  The
validation works properly (i.e., it checks for proper of length, content,
etc., of fields that I specify), however, when it comes to printing the
messages to the user, I get a NPE in MessagesTag.doStartTag:253
(pageContext.setAttribute(id, msg)).

In my jsp file I have:








I know that the  works properly because everthing is
fine when the page first displays.  It's obvious to me that it's with the
'id="error"', but quite frankly, I'm not sure what it should be or how to
fix it.  Thanks.


---
Robert D. Morse
[EMAIL PROTECTED]
PGP Key:  D9C4AA6A
PGP Finger Print:  ED56 DEEA 95CF AC99 C2B0  77D4 7D92 ACCA D9C4 AA6A


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




REPOST: File upload example in nightly build is broken

2002-02-18 Thread Marcel Maré

The struts file upload example (struts-upload.war) in the nightly build
gives the following exception om TC 4.0.1 on Win2K SP2:

javax.servlet.ServletException: Cannot find message resources under key
org.apache.struts.action.MESSAGE

Does anybody know what's wrong? Somebody suggested that putting xerces.jar
in the webapps' lib directory solved it. But is doesn't in my case.

TIA

Marcel Maré



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




REPOST: Multiple file upload not possible due to MultiPartRequestHandler limitation?

2002-02-18 Thread Marcel Maré

File upload of a single file with Struts 1.0.2 seems to work OK. But it
fails for multiple files. Note: I mean 1  tag where the
user selects *multiple* files (Opera and IE allow this), not multiple  tags!

The MultipartRequestHandler doesn't seem to support this, since it
getFileElements() returns FormFiles in a hashtable, and cannot therefore
handle more than 1 FormFile for each input name.

The only way around this is to put multiple INPUT tags on the page, whicih
is a problem when I want to allow the user to upload a lot of (small) files.

If I'm not correct, how does one handle this?

TIA

Marcel Maré




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts runtime failure on Weblogic 5.1Sp8 (in custom tag 'message')

2002-02-18 Thread [EMAIL PROTECTED]

hello,

I'm trying to run the Struts 1.0 Example application
using WebLogic 5.1 (Service Pack 8) on NT2000. I'm
deploying the "Struts-Example" application as a .war
file. I followed all the steps in the ReadMe and
Install documentation. However, upon starting the server
and trying access the root page, I encounter the
following run-time exception:

  root cause of
ServletException javax.servlet.ServletException: runtime
failure in custom tag 'message'at
jsp_servlet._index._jspService(_index.java,
Compiled Code)at weblogic.servlet.jsp.JspBase.service
(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:105)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:123)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet
(ServletContextImpl.java:742)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet
(ServletContextImpl.java:686)
at
weblogic.servlet.internal.ServletContextManager.invokeServ
let(ServletContextManager.java:247)
at weblogic.socket.MuxableSocketHTTP.invokeServlet
(MuxableSocketHTTP.java:361)
at weblogic.socket.MuxableSocketHTTP.execute
(MuxableSocketHTTP.java:261)
at weblogic.kernel.ExecuteThread.run
(ExecuteThread.java, Compiled Code)

I've search the mailing list archives, and it seems that
others have had a similar problem. However, I did not
find a documented solution that works for me. Here's some
more details about my particular situation:
1) I have to modify the DocType statement in the web.xml
file to use "DTD Web Application 1.2" instead of "DTD Web
Application 2.2". This prevents the following error msg
from occurring when starting the webserver.
"[ExternalEntity] : Could not resolve entity '-//Sun
Microsystems, Inc.
//DTD Web Application 2.2//EN'. Check your dtd reference."

2) The struts.jar and *.tld files are located in my the
webapps/WEB-INF/lib folder.

3) As suggested in another mail msg, I added the
following jar as the first statement in my classpath:
c\:jakarta-struts\webapps\wlssp8-struts.jar

4) As stated in the Install documentation, I've manually
extracted the ApplicationResources.properties from the
*.war file and copied it to the _tmp_war folder created
by WebLogic.

Any help would be greatly appreciated as I am totally
stuck.

Thanks,

Pierre


---
L'e-mail gratuit pas comme les autres.
Pour créer votre adresse : http://www.nomade.fr/courrier/ouvrir.asp
NOMADE.FR, pourquoi chercher ailleurs ?



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: container managed security and login action?

2002-02-18 Thread Matt Raible

I was able to change the code from:

 

RequestDispatcher rd = request.getRequestDispatcher(req);

  rd.forward(request, response);



To:

 

  response.sendRedirect(response.encodeRedirectURL(req));

 

And now it (kinda) works - it hits j_security_check at least.  Now the
problem I am experiencing is (1) sometimes the URL w/ password shows up
in the URL, and (2) sometimes == shows up in the password, and this
causes a 500 Internal Server Error.

 

I am using Tomcat 4.0.1.  

 

Thanks,

 

Matt

 

 

-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED]] 
Sent: Monday, February 18, 2002 10:33 AM
To: 'Michelle Popovits'
Subject: RE: container managed security and login action?

 

Michelle,

 

I tried using your sample LoginAction.java class to do what you're
doing.  However, I get the following error from Tomcat:

 


Apache Tomcat/4.0.1 - HTTP Status 404 - /j_security_check

  _  


type Status report

message /j_security_check

description The requested resource (/j_security_check) is not available.

 

My class is printing out the following correct values (I'm not
encrypting the password yet):

 

Req: 'j_security_check?j_username=admin&j_password=onpoint'

 

When I do this with regular container-managed authentication - it works
fine.  Any ideas?

 

Thanks,

 

Matt

 

-Original Message-
From: Michelle Popovits [mailto:[EMAIL PROTECTED]] 
Sent: Monday, February 18, 2002 6:37 AM
To: '[EMAIL PROTECTED]'
Subject: RE: container managed security and login action?

 

Hi Matt,

 

I haven't actually been involved in the encryption part.  I just provide
the place where the functionality will be added later.

 

Regards,

Michelle

-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 16, 2002 8:08 PM
To: [EMAIL PROTECTED]
Subject: RE: container managed security and login action?

In reference to a Struts Mailing List posting at:

 

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

I'm wondering how you are encrypting your passwords - I have found the
following encoding routines, but apparently - they are very weak.

Thanks,

Matt

/**

 *  Encode a string using Base64 encoding

 *  This is weak encoding in that anyone can use the decodeString

 *  routine to reverse the encoding.

 */

public static String encodeString(String str)

throws IOException

{

sun.misc.BASE64Encoder encoder = new
sun.misc.BASE64Encoder();

String encodedStr = new
String(encoder.encodeBuffer(str.getBytes()));

return (encodedStr);

}

/**

 *  Decode a string

 */

public static String decodeString(String str)

throws IOException

{

sun.misc.BASE64Decoder dec = new sun.misc.BASE64Decoder();

String value = new String(dec.decodeBuffer(str));

return (value);

}




Reload missing in 1.1?

2002-02-18 Thread Dave Weis


I'm playing with 1.1 that I downloaded this morning and the ReloadAction
and friends seems to be missing. There were 11 classes in the
org.apache.struts.actions package in 1.0 and there are only 5 in
1.1. Should this be there?

dave

-- 
Dave Weis "I believe there are more instances of the abridgement
[EMAIL PROTECTED]   of the freedom of the people by gradual and silent
  encroachments of those in power than by violent 
  and sudden usurpations."- James Madison


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts 1.1 and Tiles

2002-02-18 Thread Dave Weis


On Mon, 18 Feb 2002, Cedric Dumoulin wrote:
>   I have just updated Tiles to let them run with latest Struts nightly build
> (1.1dev). This update add a new TilesRequestProcessor class. The struts-tiles.war
> (or tiles-doc.war) are modified in order to take into account the new struts1.1
> mechanism.
>   You can download new Tiles distributions from Tiles home site (choose
> development version), or wait for Struts next nightly build.

Hi Cedric

I just downloaded tiles from your site and am proceeding to learn a few
things. Is org.apache.struts.actions.ForwardAction updated to use the
tiles functionality? I tried the line below and got an error:



Error:
java.lang.IllegalArgumentException: path must be absolute: `dave.test'

Is this a known problem or am I doing something incorrectly?

dave

> 
> Dave Weis wrote:
> 
> > How are the two shaping up? Are there still problems using a newer version
> > of struts with tiles? There are some features of 1.1 that I need such as
> > the dynamic forms. Also, would a nightly Struts download be in the 1.1
> > series or will it be 1.0.2 with some additional fixes?
> >
> > Thanks
> > dave
> >
> > --
> > Dave Weis "I believe there are more instances of the abridgement
> > [EMAIL PROTECTED]   of the freedom of the people by gradual and silent
> >   encroachments of those in power than by violent
> >   and sudden usurpations."- James Madison
> >
> > --
> > To unsubscribe, e-mail:   
> > For additional commands, e-mail: 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 

-- 
Dave Weis "I believe there are more instances of the abridgement
[EMAIL PROTECTED]   of the freedom of the people by gradual and silent
  encroachments of those in power than by violent 
  and sudden usurpations."- James Madison


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: template tag

2002-02-18 Thread Henry Lu

No. Where do I find one?


---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372

On Mon, 18 Feb 2002, Henry Lu wrote:

> Do you have an example of Tiles?
>
> Thanks,
>
>
> ---
> Henry Lu
> MCITphone: (734) 936-2063
> University of Michigan Medical Center   fax:   (734) 763-4372
>
> On Mon, 18 Feb 2002, Cedric Dumoulin wrote:
>
> >
> >   Check application struts-template.war shipped with Struts distribution. Also,
> > you can check Tiles wich is an "advanced template" framework.
> >
> > Cedric
> >
> > Henry Lu wrote:
> >
> > > Is there any examples with struts template tag? I have had difficulties to
> > > use it. I got error:
> > >
> > > Invalid directive
> > >
> > > Any idea?
> > >
> > > ---
> > > Henry Lu
> > > MCITphone: (734) 936-2063
> > > University of Michigan Medical Center   fax:   (734) 763-4372
> > >
> > > --
> > > To unsubscribe, e-mail:   
> > > For additional commands, e-mail: 
> >
> >
> > --
> > To unsubscribe, e-mail:   
> > For additional commands, e-mail: 
> >
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: template tag

2002-02-18 Thread Henry Lu

Do you have an example of Tiles?

Thanks,


---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372

On Mon, 18 Feb 2002, Cedric Dumoulin wrote:

>
>   Check application struts-template.war shipped with Struts distribution. Also,
> you can check Tiles wich is an "advanced template" framework.
>
> Cedric
>
> Henry Lu wrote:
>
> > Is there any examples with struts template tag? I have had difficulties to
> > use it. I got error:
> >
> > Invalid directive
> >
> > Any idea?
> >
> > ---
> > Henry Lu
> > MCITphone: (734) 936-2063
> > University of Michigan Medical Center   fax:   (734) 763-4372
> >
> > --
> > To unsubscribe, e-mail:   
> > For additional commands, e-mail: 
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using Struts with filters

2002-02-18 Thread Daniel Steinberg

I guess I can answer my own question.  I do not need override
ActionServlet.initOther() to attach the ActionForwards object to the servlet
context, because Struts does it already as Action.FORWARDS_KEY.

-Original Message-
From: Daniel Steinberg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 4:25 PM
To: '[EMAIL PROTECTED]'
Subject: Using Struts with filters


I would like to put my authorization logic in a servlet filter.  If
authorization fails, I would like to display an error page by forwarding to
a JSP.  I would like to look up this JSP name just as I would while
performing a Struts action.  

Unfortunately, the forward mappings (ActionForwards) are attached to the
ActionServlet, and the filter knows nothing about the servlet.  It seems
that my best bet at this point is to override ActionServlet.initOther() and
attach the ActionForwards object to the servlet context.  My filter
(assuming that the servlet has already been loaded) can then get the servlet
context from the filter config and can get the ActionForwards from there.

Does anyone have any better ideas?  Would it make sense, in a future of
revision of Struts, to attach automatically attach all of the configuration
information to the servlet context, so that it will be available to filters
and listeners?

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: BeanUtil BUG (this is actually correct behaviour)

2002-02-18 Thread Steve Armstrong

Fernando Esteban Barril Otero [mailto:[EMAIL PROTECTED]] writes:

I think that is the normal behavior for JavaBean properties.
When you have a setter/getter for a property starting with
more than one upper char, the property name must have exactly
the same name (without the "normal" convention).

-

Correct.  The following is from the JavaBeans spec:

8.8 Capitalization of inferred names

When we use design patterns to infer a property name, we need to decide what
rules
to follow for capitalizing the inferred name. If we extract the name from
the middle of a normal mixedCase style Java name then the name will, by
default, begin with a capital letter.

Java programmers are accustomed to having normal identifiers start with
lower case letters.
Vigorous reviewer input has convinced us that we should follow this same
conventional rule
for property names.

Thus when we extract a property name from the middle of an existing Java
name, we normally
convert the first character to lower case. However to support the occasional
use of all upper-case names, we check if the first two characters of the
name are both upper case and if so leave it alone. So for example,

"FooBah" becomes "fooBah"
"Z" becomes "z"
"URL" becomes "URL"

- Original Message -
From: "emmanuel.boudrant" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, February 18, 2002 11:32 AM
Subject: BeanUtil BUG


>
> Hello,
>
> I've got a FormBean with property like this:
>
> private String nIdentifiant=null;
>
> public String getNIdentifiant(...
>
> public void setNIdentifiant(...
>
>
>
> private String nmClient=null;
>
> public String getNmClient(...
>
> public void setNmClient(...
>
>
>
> My action throw an exception ; no getter for property nIdentifiant
>
> And when I make a BeanUtil.describe(myForm); I've got this output:
>
> [NIdentifiant=null ; nmClient = null ... ]
>
> NIdentifiant must be nIdentifiant !
>
>
>
> I'm under Struts1.0
>
>
>
> thank
>
> Emmanuel


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: logic:iterate

2002-02-18 Thread Adam Hardy

logic:iterate - Because you havent included the <%@ taglib 
uri="/WEB-INF/struts-logic.tld" prefix="logic" %> page directive in the current jsp 
page

Slightly embarrassingly, I found the answer to my question in the archives. 

The only thing that makes me look less crap is that I must have read over a hundred 
messages all about logic:iterate


On Mon, 18 February 2002, Adam Hardy wrote:

> 
> A question about the logic:iterate tag. I'm having problems getting the JSP to 
>compile, tomcat tells me it can't find the bean that I named in the id of the 
>iterator tag. 
> 
> This is my tag:
> 
> 
> 
> So tomcat can't find bean "idata" in scope null and throws an exception. 
> 
> Going through the struts docs, I can't see what my problem is. I've created an array 
>of objects, put it in a bean and put the bean in the request with the attribute tag 
>"questionset". 
> 
> The bean has the getter method "list" which returns the array of objects. This 
>works, I've debugged it with a scriptlet in the JSP.
> 
> Can anyone say what I'm doing wrong? Thanks
> Adam
> 
> 
> 
> Find the best deals on the web at AltaVista Shopping!
> http://www.shopping.altavista.com
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: is ActionForm required for Action even if no form on page?

2002-02-18 Thread SUPRIYA MISRA

You dont need an empty class  In struts-config.xml write like this

No Action,No Form

>From: Adam Hardy <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: is ActionForm required for Action even if no form on page?
>Date: 18 Feb 2002 07:43:00 -0800
>
>Hi All,
>
>When I setup an Action, is an ActionForm required even if I dont have a 
>form on my page?
>
>Do I have to write an empty class and define it as the name in the Action 
>Mapping definitions in the struts-config.xml?
>
>I'm getting an error on my page, because I haven't done this, from 
>html:errors, but short of getting rid of html:errors, is there a way to 
>tell struts I don't need a form?
>
>Will having an ActionError in my request mess up the processing of tags on 
>the page at all?
>
>Thanks
>Adam
>
>
>Find the best deals on the web at AltaVista Shopping!
>http://www.shopping.altavista.com
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: HTML:LINK

2002-02-18 Thread McDowell, Mark

If you provide a java.util.Map to the link, it will add every entry in the
map as parameters.  For example, if your map has these entries:
KeyObject
"one", "entryOne"
"two", "entryTwo"

your link will have these parameters added on: ?one=entryOne&two=entryTwo

-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 10:40 AM
To: [EMAIL PROTECTED]
Subject: HTML:LINK


Subject: HTML:LINK
From: "Ankur Gupta" <[EMAIL PROTECTED]>
 ===
It seems that you can only pass in one parameter to generate a URI. Any idea
on how I can use  and pass in mutiple parameters?
paramId seems to accept only one value.



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: error running tile: Can't get definition 'examples.rssChannels.page'

2002-02-18 Thread Cedric Dumoulin


  Tiles have just been updated to work with latest Struts nightly build. I think that 
modifications
will be available from the 20020219 nightly build (tomorrow). Check if
org.apache.struts.tiles.TilesRequestProcessor.java exist (yes : ok, no : bad dist).
  If you can't wait, you can download yourself sources from cvs, or a Tiles binary 
build from
following site (choose development version if you want Struts1.1) :
  http://www.lifl.fr/~dumoulin/tiles/

Cedric

c tang wrote:

> Hi,
>
> I ran struts-tiles.war of 20020218 nightly build and
> got an error message.  The app is run as it with no
> modification.
>
> javax.servlet.jsp.JspException: Error -  Tag Insert :
> Can't get definition 'examples.rssChannels.page'.
> Check if this name exist in definitions factory.
> at
> org.apache.struts.taglib.tiles.InsertTag.processDefinitionName(InsertTag.java:496)
> at
> org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:385)
> at
> org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:342)
> at
> org.apache.jsp.rssChannels$jsp._jspService(rssChannels$jsp.java:69)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
> at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> 
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> at
> 
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
> at
> 
>org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
> at
> org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
> at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
> at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
> at java.lang.Thread.run(Thread.java:484)
>
> _

HTML:LINK

2002-02-18 Thread @Basebeans.com

Subject: HTML:LINK
From: "Ankur Gupta" <[EMAIL PROTECTED]>
 ===
It seems that you can only pass in one parameter to generate a URI. Any idea
on how I can use  and pass in mutiple parameters?
paramId seems to accept only one value.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Support for Http and Non-Http Requests

2002-02-18 Thread Greg Hess

Bob,

Check this url for a proposed solution http://struts.ditlinger.com/. I am
using it in my app and I like it.

Greg

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 10:35 AM
To: Struts Users Mailing List
Subject: Support for Http and Non-Http Requests


I need some design advice.

I would like to be able to support both Http and non-Http requests with my
Struts based application.  I am not sure how to set up my Actions and Forms
so they can handle both types of input.  Can someone point me to a good
source for designing this system?

Thanks,

bob


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




error running tile: Can't get definition 'examples.rssChannels.page'

2002-02-18 Thread c tang

Hi,

I ran struts-tiles.war of 20020218 nightly build and
got an error message.  The app is run as it with no
modification.

javax.servlet.jsp.JspException: Error -  Tag Insert :
Can't get definition 'examples.rssChannels.page'.
Check if this name exist in definitions factory.
at
org.apache.struts.taglib.tiles.InsertTag.processDefinitionName(InsertTag.java:496)
at
org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:385)
at
org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:342)
at
org.apache.jsp.rssChannels$jsp._jspService(rssChannels$jsp.java:69)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:484)



__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Using Tiles tags as values for Struts and HTML

2002-02-18 Thread Cedric Dumoulin


 See intermixed.

"Robert D. Morse" wrote:

> It the example below, "background" is available *only* in the test.jsp file.

> If I try to use  in any other jsp file in that
> particular tiles-definition, I get an exception saying that "background"
> isn't in any context.

True, attributes of a Tile are only visible inside this Tile, not in sub-Tiles or
parent.


> Setting various context in the definition had no
> effect.

  There is no attribute to set such context in definition tag :-) You can let xml
parser check your definitions file syntax by enabling tiles validation in
web.xml.


> I got around this by using the  in the test.jsp
> file and then setting a session attribute that was then visible by the rest
> of the files.
>
> -Original Message-
> From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 18, 2002 7:48 AM
> To: Struts Users Mailing List
> Subject: Re: Using Tiles tags as values for Struts and HTML
>
>   Hi,
>
>   For me, it should work. Is there any exception ? What is the resulting
> html
> source code ?
>
>   Also, you can try following in your "/templates/test.jsp" if you have some
> trouble with quotes :
>   
> 
>
>  Cedric
>
> "Robert D. Morse" wrote:
>
> > I have a Tiles definition that looks something like this:
> >
> > 
> > 
> > ...a series of 's
> > 
> > 
> > 
> >
> > Now, I want to use the value of "background" as the value for something
> like
> > the background=" " in the HTML Body tag.  In other words:
> >
> >  >
> >
> > This doesn't work.
> > I've tried enclosing in quotes, escaped quote, apostrophe, and I can't
> seem
> > to make it work.  Any suggestions?
> >
> > If you haven't tried Tiles with Struts, you're really missing out.
> >
> > ---
> > Robert D. Morse
> > [EMAIL PROTECTED]
> > PGP Key:  D9C4AA6A
> > PGP Finger Print:  ED56 DEEA 95CF AC99 C2B0  77D4 7D92 ACCA D9C4 AA6A
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using Tiles tags as values for Struts and HTML

2002-02-18 Thread Robert D. Morse

It the example below, "background" is available *only* in the test.jsp file.
If I try to use  in any other jsp file in that
particular tiles-definition, I get an exception saying that "background"
isn't in any context.  Setting various context in the definition had no
effect.  I got around this by using the  in the test.jsp
file and then setting a session attribute that was then visible by the rest
of the files.

-Original Message-
From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 7:48 AM
To: Struts Users Mailing List
Subject: Re: Using Tiles tags as values for Struts and HTML



  Hi,

  For me, it should work. Is there any exception ? What is the resulting
html
source code ?

  Also, you can try following in your "/templates/test.jsp" if you have some
trouble with quotes :
  


 Cedric


"Robert D. Morse" wrote:

> I have a Tiles definition that looks something like this:
>
> 
> 
> ...a series of 's
> 
> 
> 
>
> Now, I want to use the value of "background" as the value for something
like
> the background=" " in the HTML Body tag.  In other words:
>
>  >
>
> This doesn't work.
> I've tried enclosing in quotes, escaped quote, apostrophe, and I can't
seem
> to make it work.  Any suggestions?
>
> If you haven't tried Tiles with Struts, you're really missing out.
>
> ---
> Robert D. Morse
> [EMAIL PROTECTED]
> PGP Key:  D9C4AA6A
> PGP Finger Print:  ED56 DEEA 95CF AC99 C2B0  77D4 7D92 ACCA D9C4 AA6A
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: template tag

2002-02-18 Thread Cedric Dumoulin


  Check application struts-template.war shipped with Struts distribution. Also,
you can check Tiles wich is an "advanced template" framework.

Cedric

Henry Lu wrote:

> Is there any examples with struts template tag? I have had difficulties to
> use it. I got error:
>
> Invalid directive
>
> Any idea?
>
> ---
> Henry Lu
> MCITphone: (734) 936-2063
> University of Michigan Medical Center   fax:   (734) 763-4372
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Using Tiles tags as values for Struts and HTML

2002-02-18 Thread Cedric Dumoulin


  Hi,

  For me, it should work. Is there any exception ? What is the resulting html
source code ?

  Also, you can try following in your "/templates/test.jsp" if you have some
trouble with quotes :
  


 Cedric


"Robert D. Morse" wrote:

> I have a Tiles definition that looks something like this:
>
> 
> 
> ...a series of 's
> 
> 
> 
>
> Now, I want to use the value of "background" as the value for something like
> the background=" " in the HTML Body tag.  In other words:
>
>  >
>
> This doesn't work.
> I've tried enclosing in quotes, escaped quote, apostrophe, and I can't seem
> to make it work.  Any suggestions?
>
> If you haven't tried Tiles with Struts, you're really missing out.
>
> ---
> Robert D. Morse
> [EMAIL PROTECTED]
> PGP Key:  D9C4AA6A
> PGP Finger Print:  ED56 DEEA 95CF AC99 C2B0  77D4 7D92 ACCA D9C4 AA6A
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




is ActionForm required for Action even if no form on page?

2002-02-18 Thread Adam Hardy

Hi All,

When I setup an Action, is an ActionForm required even if I dont have a form on my 
page?

Do I have to write an empty class and define it as the name in the Action Mapping 
definitions in the struts-config.xml?

I'm getting an error on my page, because I haven't done this, from html:errors, but 
short of getting rid of html:errors, is there a way to tell struts I don't need a 
form? 

Will having an ActionError in my request mess up the processing of tags on the page at 
all?

Thanks
Adam


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Support for Http and Non-Http Requests

2002-02-18 Thread Bob Williams

I need some design advice.

I would like to be able to support both Http and non-Http requests with my
Struts based application.  I am not sure how to set up my Actions and Forms
so they can handle both types of input.  Can someone point me to a good
source for designing this system?

Thanks,

bob


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts 1.1 and Tiles

2002-02-18 Thread Cedric Dumoulin


  I have just updated Tiles to let them run with latest Struts nightly build
(1.1dev). This update add a new TilesRequestProcessor class. The struts-tiles.war
(or tiles-doc.war) are modified in order to take into account the new struts1.1
mechanism.

  You can download new Tiles distributions from Tiles home site (choose
development version), or wait for Struts next nightly build.

Cedric

Dave Weis wrote:

> How are the two shaping up? Are there still problems using a newer version
> of struts with tiles? There are some features of 1.1 that I need such as
> the dynamic forms. Also, would a nightly Struts download be in the 1.1
> series or will it be 1.0.2 with some additional fixes?
>
> Thanks
> dave
>
> --
> Dave Weis "I believe there are more instances of the abridgement
> [EMAIL PROTECTED]   of the freedom of the people by gradual and silent
>   encroachments of those in power than by violent
>   and sudden usurpations."- James Madison
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Bug with SSL

2002-02-18 Thread Greg Hess

Max, Steve:

Thank you, my parameters are no longer visible. From what I can see(please
correct me if I am wrong) after the original post using SSL, the SSL process
listening to port(443) decrypts the encrypted post parameters and places
them in the request for the Servlet to process. In the scenario that I am
switching between HTTPS and HTTP in the same request I will always have to
redirect instead of forward to avoid the parameters being visible.

Greg




-Original Message-
From: Ditlinger, Steve [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 16, 2002 1:14 AM
To: 'Max Cooper'; Struts Users Mailing List
Subject: RE: Bug with SSL



Max, Greg:

I successfully tried your given solution.  The posted parameters are no
longer seen in the location field.

Steve


-Original Message-
From: Max Cooper [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 4:16 PM
To: Struts Users Mailing List
Subject: Re: Bug with SSL


Greg,

Please try setting the redirect attribute of your success action forward to
true in the struts-config.xml file, like so:



I'm going to try out this scenario and report back with any additional tips
that I can think of.

-Max

- Original Message -
From: "Greg Hess" <[EMAIL PROTECTED]>
To: "Struts Mail List" <[EMAIL PROTECTED]>
Sent: Friday, February 15, 2002 11:34 AM
Subject: Bug with SSL


> Hi All,
>
> I am using the classes provide by http://struts.ditlinger.com/ to allow
for
> switching between Http and Https calls in my Struts application. I have
> installed SSL and is working fine under a test certificate. I am using the
> the extended 
> ,  and the secure property in my Action definitions. I would
> like my main logonForm to be submitted using SSL and after the username
and
> password are received on the server using SSL to switch back to http. What
> happens is that the secure data posted by logon.jsp is visible in the
> location
>
http://localhost/emailssl-struts/mainPage.do?password=hess&submit=Submit&use
> rname=ghess. I have tried having the LogonAction setRedirect(true) on the
> ActionForward returned but with no success. Unfortunately this is making
my
> secure data visible, how can I fix this bug.
>
> 
>  path="/mainPage"
> type="org.apache.struts.actions.ForwardAction"
> parameter="/maintemplate.jsp">
> 
> 
>
> 
>  path="/logon"
>type="com.wrappedapps.email.LogonAction"
>name="logonForm"
>   scope="request"
>   validate="true"
>   input="/logon.jsp">
>   
>   
> 
>
> Thanks,
> Greg
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: bean:write

2002-02-18 Thread Chris Birch

Mike,

The bean write tag defaults to filtering String for sensitive HTML chars.
You must set filter="false" to stop the filtering, e.g.



Should do the trick.

Chris.

-Original Message-
From: Mike Dewhirst [mailto:[EMAIL PROTECTED]]
Sent: 18 February 2002 14:54
To: 'Struts Users Mailing List'
Subject: bean:write


If I want to write out an html snippet (e.g. "mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 




bean:write

2002-02-18 Thread Mike Dewhirst

If I want to write out an html snippet (e.g. "


RE: Outputting dates to screen

2002-02-18 Thread Steve Earl

Thanks Stephen,

that's sorted out my prob!

regards,
steve

-Original Message-
From: Stephen Owens [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 2:27 PM
To: Struts Users Mailing List
Subject: RE: Outputting dates to screen


Steve,

I use the  taglib and it's working well. It doesn't use a date
object but rather the long value representing the number of milliseconds
since (?) some date that I don't remember. So you acutally want the
dateObj.getTime() function. 

regards,

Stephen Owens
Corner Software

> -Original Message-
> From: Steve Earl [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 18, 2002 4:36 AM
> To: [EMAIL PROTECTED]
> Subject: Outputting dates to screen
> 
> 
> Hi guys,
> 
> I know that this has been discussed over the past week or two 
> but I'm still
> a bit unclear. Can someone help me out with the best (most 
> recommended) way
> of displaying a java Date object on a jsp.
> 
> At present I'm trying to use the  taglib from 
> Apache. The docs for
> this seem to show that you can pass in a date object and the 
> tag will format
> it according to a pattern string you supply - so you can do:
> 
> 
> where dt:currentTime returns a Date object set to the current time.
> 

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: datasource management

2002-02-18 Thread Jimenez Daniel

Mike:
  Use the Websphere datasource!!!  I've had a plethora of stability
problems when it came to using the struts datasource on websphere.  I've
defined my datasource in struts for client development only.  And do,
you don't miss out on any features of struts if you use datasource
management separate from struts.  As a matter of fact you'd lose the
datasource tracking feature available from websphere.  It just doesn't
make sense not to use the websphere datasource.

Dan


>>> [EMAIL PROTECTED] 2/15/02 7:48:45 AM >>>
What is the benefit of configuring datasources in the struts-config.xml

file?  

My meaning is, I am adapting my existing webapp to use struts. 
Obviously, 
I replaced my home-grown controller because struts has many more
features, 
like token and validation.

But, I'm not sure I gain by replacing my home-grown "datasource
manager".  
I am using WebSphere, so presumably I don't need pool man.  Datasources
are 
defined in a property file (not xml, but good enough) and are cached. 
I 
also like the idea of having datasources defined in a separate file.

Am I over-looking something?  Will I miss out on some features if I
keep 
datasource management separate from struts classes?

Mike


--
To unsubscribe, e-mail:  

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: BeanUtil BUG

2002-02-18 Thread Fernando Esteban Barril Otero

I think that is the normal behavior for JavaBean properties.
When you have a setter/getter for a property starting with
more than one upper char, the property name must have exactly
the same name (without the "normal" convention).

- Original Message - 
From: "emmanuel.boudrant" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, February 18, 2002 11:32 AM
Subject: BeanUtil BUG


> 
> Hello,
> 
> I've got a FormBean with property like this:
> 
> private String nIdentifiant=null;
> 
> public String getNIdentifiant(...
> 
> public void setNIdentifiant(...
> 
>  
> 
> private String nmClient=null;
> 
> public String getNmClient(...
> 
> public void setNmClient(...
> 
>  
> 
> My action throw an exception ; no getter for property nIdentifiant
> 
> And when I make a BeanUtil.describe(myForm); I've got this output:
> 
> [NIdentifiant=null ; nmClient = null ... ]
> 
> NIdentifiant must be nIdentifiant !
> 
>  
> 
> I'm under Struts1.0
> 
>  
> 
> thank
> 
> Emmanuel


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




BeanUtil BUG

2002-02-18 Thread emmanuel.boudrant


Hello,

I've got a FormBean with property like this:

private String nIdentifiant=null;

public String getNIdentifiant(...

public void setNIdentifiant(...

 

private String nmClient=null;

public String getNmClient(...

public void setNmClient(...

 

My action throw an exception ; no getter for property nIdentifiant

And when I make a BeanUtil.describe(myForm); I've got this output:

[NIdentifiant=null ; nmClient = null ... ]

NIdentifiant must be nIdentifiant !

 

I'm under Struts1.0

 

thank

Emmanuel



-
Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !



RE: Outputting dates to screen

2002-02-18 Thread Stephen Owens

Steve,

I use the  taglib and it's working well. It doesn't use a date
object but rather the long value representing the number of milliseconds
since (?) some date that I don't remember. So you acutally want the
dateObj.getTime() function. 

regards,

Stephen Owens
Corner Software

> -Original Message-
> From: Steve Earl [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 18, 2002 4:36 AM
> To: [EMAIL PROTECTED]
> Subject: Outputting dates to screen
> 
> 
> Hi guys,
> 
> I know that this has been discussed over the past week or two 
> but I'm still
> a bit unclear. Can someone help me out with the best (most 
> recommended) way
> of displaying a java Date object on a jsp.
> 
> At present I'm trying to use the  taglib from 
> Apache. The docs for
> this seem to show that you can pass in a date object and the 
> tag will format
> it according to a pattern string you supply - so you can do:
> 
> 
> where dt:currentTime returns a Date object set to the current time.
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: struts template

2002-02-18 Thread Luis M. Rosso

Hi, Henry !

I think the problem is a confusion on which file is the template.

In the sample, the template should be 'main.jsp', and not 'header.jsp'; the
latter file is just an element that should be inserted inside the template.

Hence, I would change the names used for almost all of the files. But, for
the sake of simplicity, I will keep them in the suggestions given below.

In 'main.jsp', which is the template, I would use:

<%@ taglib uri="/tags/struts-template.tld" prefix="g_template" %>

instead of:

<%@ taglib uri="mytemplate.jsp" prefix="g_template" %>

and would place this directive at the top of the page, among the other ones.

Then, I would create the following JSP page, which is an 'instance' of the
template, and will be the page exposed to the users of the application:

<%@ taglib uri="/tags/struts-template.tld" prefix="template"%>

  


Hope this helps

Cheers

Luis

- Original Message -
From: "Henry Lu" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, February 18, 2002 10:13 AM
Subject: RE: struts template


> I got the following error:
> javax.servlet.ServletException: Exception forwarding for name welcome:
> org.apache.jasper.JasperException: XML parsing error on file
> /WEB-INF/jsp/reg/mytemplate.jsp: (line 1, col 2): The markup in the
> document preceding the root element must be well-formed.
>
> the main jsp file:
> <%@ page language="java" %>
> <%@ taglib uri="/tags/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/tags/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/tags/struts-logic.tld" prefix="logic" %>
> 
> 
> 
> 
> 
> <%@ taglib uri="mytemplate.jsp" prefix="g_template" %>
> 
>
> Hello, STRUTS!
> 
> 
> ---
> the mytemplate.jsp file:
>
> <%@ taglib uri="/template" prefix="template" %>
> 
>  
> 
> ---
> header.jsp file
> 
> 
> University of Michigan
> 
> 
>
>
> --
-
> Henry Lu
> MCITphone: (734) 936-2063
> University of Michigan Medical Center   fax:   (734) 763-4372
>
> On Mon, 18 Feb 2002, Arik  Levin ( Tikal ) wrote:
>
> > What is the problem shoot.
> >
> > -Original Message-
> > From: Henry Lu [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, February 18, 2002 2:39 PM
> > To: Struts Users Mailing List
> > Subject: struts template
> >
> > Is there any examples with struts template tag? I have had difficulties
to
> > use it.
> >
> > Thanks,
> >
> >
>
> --
-
> > Henry Lu
> > MCITphone: (734) 936-2063
> > University of Michigan Medical Center   fax:   (734) 763-4372
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Why no "indexed" attribute defined in struts-html.tld?

2002-02-18 Thread Christopher Cheng

Just download from the nightly build
http://jakarta.apache.org/builds/jakarta-struts/nightly/

But the debug message are missing, instead

Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
[INFO] sax - -startDocument()
[INFO] sax - -endDocument()
[INFO] sax - -startDocument()
[INFO] sax - -endDocument()
Starting service Tomcat-Apache
Apache Tomcat/4.0.1

-Original Message-
From: SUPRIYA MISRA [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 14, 2002 9:45 PM
To: [EMAIL PROTECTED]
Subject: RE: Why no "indexed" attribute defined in struts-html.tld?

try indexed=true. If you need the stuts.jar which has indexed tag and
works 
I have it and send it to you.


>From: "Galbreath, Mark" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>Subject: RE: Why no "indexed" attribute defined in struts-html.tld?
>Date: Thu, 14 Feb 2002 07:35:47 -0500
>
>Well, perhaps Ted will address this issue sometime today. In the
meantime,
>you can always write your own custom tag based on the HTML tags' source

>code
>that you need (the beauty of open-source).
>
>Mark
>
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, February 14, 2002 7:22 AM
>
>I think I need the "indexed" attribute but it is'nt there ...
>So that's a problem ...
>
>
>On Thu, 14 Feb 2002 07:07:22 -0500 "Galbreath, Mark"
<[EMAIL PROTECTED]>
>wrote:
>
> >How could it be a problem if it never worked?  Sounds like a 
>documentation
> >error.
>
> >-Original Message-
>
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> >Sent: Thursday, February 14, 2002 4:14 AM
>
> >I'm having the same problem ...
> >No one to help ???
>
> >On Wed, 13 Feb 2002 16:13:31 -0800 "Liu, Xin"
<[EMAIL PROTECTED]>
> >wrote:
>
> >>From Struts on-line doc, I saw the new attribute "indexed" is added
to
>some
> >html tags.
> >>But the JSP engine told me attribute "indexed" is invalid. After 
>checking
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: struts template

2002-02-18 Thread Arik Levin ( Tikal )

Here is an example:


This is a xtestTemplate.jsp:

<%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %>






  




  
  
   





this is how u use it:

<%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %>
  
  
  
  



make your JSP's and just put them wherever u want them.


-Original Message-
From: Henry Lu [mailto:[EMAIL PROTECTED]] 
Sent: Monday, February 18, 2002 3:14 PM
To: Struts Users Mailing List
Subject: RE: struts template

I got the following error:
javax.servlet.ServletException: Exception forwarding for name welcome:
org.apache.jasper.JasperException: XML parsing error on file
/WEB-INF/jsp/reg/mytemplate.jsp: (line 1, col 2): The markup in the
document preceding the root element must be well-formed.

the main jsp file:
<%@ page language="java" %>
<%@ taglib uri="/tags/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/tags/struts-html.tld" prefix="html" %>
<%@ taglib uri="/tags/struts-logic.tld" prefix="logic" %>





<%@ taglib uri="mytemplate.jsp" prefix="g_template" %>


Hello, STRUTS!


---
the mytemplate.jsp file:

<%@ taglib uri="/template" prefix="template" %>

 

---
header.jsp file


University of Michigan




---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372

On Mon, 18 Feb 2002, Arik  Levin ( Tikal ) wrote:

> What is the problem shoot.
>
> -Original Message-
> From: Henry Lu [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 18, 2002 2:39 PM
> To: Struts Users Mailing List
> Subject: struts template
>
> Is there any examples with struts template tag? I have had difficulties to
> use it.
>
> Thanks,
>
>
>
---
> Henry Lu
> MCITphone: (734) 936-2063
> University of Michigan Medical Center   fax:   (734) 763-4372
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>


--
To unsubscribe, e-mail:

For additional commands, e-mail:




exception redirect [OT] ?

2002-02-18 Thread Ivan Siviero

Maybe this will be a little bit OT
i want to redirect all the exception occurred in all actions and custom tags
to a page which send me an email with exception details.
In my web.xml i set the following tags

java.lang.Throwable
/errorPage.jsp


the errorPage.jsp  contain the directive: <%page isErrorPage="true"%>

In an action a try to call a method on a null object which causes a
NullPointerException.
I get redirect to my errorPage.jsp but when i get the exception with
pageContext.getException(), it is null;
I also have tried to set <%page errorPage="/errorPage.jsp"%> in every jsp
page i have, but nothing seems to work.

Any clue ?
Ivan.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: logic:iterate

2002-02-18 Thread Adam Hardy

Yes it's on the request, but that's not the problem - it's the bean definition in the 
iterate body that's causing the exception (I've just realised, by deleting it).

This is the bit:


  

  

I copied this from the struts example and have tried to adapt it to my purposes, but 
it's not happening right now. 

Any more ideas?

Thanks
Adam 


On Mon, 18 February 2002, [EMAIL PROTECTED] wrote:

> 
> Is the questionset on the request ?
> Then specify you logic:iterate like this 
> 
> 
> 
> (idem for session)
> 
> On 18 Feb 2002 04:51:33 -0800 Adam Hardy <[EMAIL PROTECTED]> wrote:
> >A question about the logic:iterate tag. I'm having problems getting the JSP to 
> compile, tomcat
> tells me it can't find the bean that I named in the id of the iterator tag. 
> >
> >This is my tag:
> >
> >
> >
> >So tomcat can't find bean "idata" in scope null and throws an exception. 
> >
> >Going through the struts docs, I can't see what my problem is. I've created an 
> array of objects,
> put it in a bean and put the bean in the request with the attribute 
> tag "questionset". 
> >
> >The bean has the getter method "list" which returns the array of objects. This 
> works, I've
> debugged it with a scriptlet in the JSP.
> >
> >Can anyone say what I'm doing wrong? Thanks
> >Adam
> >
> >
> >
> >Find the best deals on the web at AltaVista Shopping!
> >http://www.shopping.altavista.com
> >
> >--
> >To unsubscribe, e-mail:   
> >For additional commands, e-mail: 
> >
> >
> 
> 
> -- 
> Get your firstname@lastname email at http://Nameplanet.com/?su
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: struts template

2002-02-18 Thread Henry Lu

I got the following error:
javax.servlet.ServletException: Exception forwarding for name welcome:
org.apache.jasper.JasperException: XML parsing error on file
/WEB-INF/jsp/reg/mytemplate.jsp: (line 1, col 2): The markup in the
document preceding the root element must be well-formed.

the main jsp file:
<%@ page language="java" %>
<%@ taglib uri="/tags/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/tags/struts-html.tld" prefix="html" %>
<%@ taglib uri="/tags/struts-logic.tld" prefix="logic" %>





<%@ taglib uri="mytemplate.jsp" prefix="g_template" %>


Hello, STRUTS!


---
the mytemplate.jsp file:

<%@ taglib uri="/template" prefix="template" %>

 

---
header.jsp file


University of Michigan




---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372

On Mon, 18 Feb 2002, Arik  Levin ( Tikal ) wrote:

> What is the problem shoot.
>
> -Original Message-
> From: Henry Lu [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 18, 2002 2:39 PM
> To: Struts Users Mailing List
> Subject: struts template
>
> Is there any examples with struts template tag? I have had difficulties to
> use it.
>
> Thanks,
>
>
> ---
> Henry Lu
> MCITphone: (734) 936-2063
> University of Michigan Medical Center   fax:   (734) 763-4372
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Form -> Bean conversion

2002-02-18 Thread Christopher Cheng

Why don't we use PropertyEditor?

http://java.sun.com/j2se/1.3/docs/api/java/beans/PropertyEditor.html

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, February 16, 2002 2:27 PM
To: 'Struts Users Mailing List'
Subject: RE: Form -> Bean conversion

I have also seen this done as an "embedded bean" object for generic
action
form.

What you would do is create a generic ActionForm with a setBean() method
and
a getBean() method.

Then in your ActionClass, call setBean( bean ) in the form and pass it
to
the action forward.

Then in your jsp, always refer to the ActionForm with "bean."

This concept forces the struts ActionForm to act as a wrapper to your
bean
classes and you never have to write a single "duplicate" line of code.

Example:
Say you have a bean called Customer:
---
public class Customer {
  private String firstName;
  private String lastName;

 public String getFirstName() {
return firstName;
  }
  public void setFirstName(String firstName) {
this.firstName = firstName;
  }
  public void setLastName(String lastName) {
this.lastName = lastName;
  }
  public String getLastName() {
return lastName;
  }
}


Now you want to use it in struts without using some mapping utility or
writing a bunch of this:
...
...
form.setFirstName( bean.getFirstName() );
form.setLastName( bean.getLastName() );
...
...

right?

Then don't.

Create one ActionForm (for each bean) like so:
---
public class GenericDetailForm extends ActionForm {

  private Customer bean = null;

  public void setBean( Customer bean ){
this.bean = bean;
  }
  public Customer getBean(){
return this.bean;
  }
...
...
//rest of required code here
...
...

}
---


Then in your jsp page.do something like this:

...
...

 
...
...

Struts will auto-populate your existing bean for you and hand it to you
(stuffed) in your ActionForm (in the perform() of your Action class)



*Note - you could even take it a step further and use the same wrapper
for
**ALL** your beans.  Of course that would mean changing your bean field
in
the wrapper class to java.lang.Object and then casting it out of the
form at
the top of each jsp page, which isn't much work considering the time
saved
in code reuse. (Let's face it, some people just can't stand
scripletslike me)


James Mitchell
Software Engineer
Open-Tools.org
Home Phone (770) 822-3359
Cell Phone: (678) 910-8017


-Original Message-
From: CyberZombie [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 11:36 PM
To: Struts Users Mailing List
Subject: Re: Form -> Bean conversion


Here's a rudimentary wrapper tool.  The commented out section is used
when wrapping for Struts 1.0.x -- 1.1 does a much better job there.  I
still have hardcoded the file masks (I assume all VO's end in
Value.java).  And I assume that all wrapped getters have corresponding
setters.  What can I say...I got lazy when I got it working and went
back to solving the business problems on this app... :)

John M. Corro wrote:

>We have a bunch of existing beans that we'd like to use w/ ActionForms.
For each bean we'll need to obviously expose the getters/setters in the
corresponding ActionForm.  The ideal scenario we'd like to see happen is
prevent the ActionForms from having all the corresponding
getters/setters
hardcoded into it.  We're ok w/ coding the validate() method for each
class
by hand, but we'd like to avoid having to code each ActionForm w/ a
getter/setter (even if it is templated out for us by a Struts plug in or
even a custom written batch file).
>
>Has anyone implemented something like this?
>




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


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: logic:iterate

2002-02-18 Thread geert

Is the questionset on the request ?
Then specify you logic:iterate like this 



(idem for session)

On 18 Feb 2002 04:51:33 -0800 Adam Hardy <[EMAIL PROTECTED]> wrote:
>A question about the logic:iterate tag. I'm having problems getting the JSP to 
compile, tomcat
tells me it can't find the bean that I named in the id of the iterator tag. 
>
>This is my tag:
>
>
>
>So tomcat can't find bean "idata" in scope null and throws an exception. 
>
>Going through the struts docs, I can't see what my problem is. I've created an 
array of objects,
put it in a bean and put the bean in the request with the attribute 
tag "questionset". 
>
>The bean has the getter method "list" which returns the array of objects. This 
works, I've
debugged it with a scriptlet in the JSP.
>
>Can anyone say what I'm doing wrong? Thanks
>Adam
>
>
>
>Find the best deals on the web at AltaVista Shopping!
>http://www.shopping.altavista.com
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>


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

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




logic:iterate

2002-02-18 Thread Adam Hardy

A question about the logic:iterate tag. I'm having problems getting the JSP to 
compile, tomcat tells me it can't find the bean that I named in the id of the iterator 
tag. 

This is my tag:



So tomcat can't find bean "idata" in scope null and throws an exception. 

Going through the struts docs, I can't see what my problem is. I've created an array 
of objects, put it in a bean and put the bean in the request with the attribute tag 
"questionset". 

The bean has the getter method "list" which returns the array of objects. This works, 
I've debugged it with a scriptlet in the JSP.

Can anyone say what I'm doing wrong? Thanks
Adam



Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: struts template

2002-02-18 Thread Arik Levin ( Tikal )

What is the problem shoot.

-Original Message-
From: Henry Lu [mailto:[EMAIL PROTECTED]] 
Sent: Monday, February 18, 2002 2:39 PM
To: Struts Users Mailing List
Subject: struts template

Is there any examples with struts template tag? I have had difficulties to
use it.

Thanks,


---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372



--
To unsubscribe, e-mail:

For additional commands, e-mail:




struts template

2002-02-18 Thread Henry Lu

Is there any examples with struts template tag? I have had difficulties to
use it.

Thanks,


---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Fill a list of textboxes ...

2002-02-18 Thread geert

I thank you !

On Mon, 18 Feb 2002 22:55:20 +1100 Arron Bates <[EMAIL PROTECTED]> wrote:
>It's because you're trying to use the non-nesting tags in a nested 
>manner. Basically the text tags don't know that they're inside the 
>iterate tags.
>
>If you're running the nightly build, change the  to 
> and the  to . If you're not 
>on the nightly build, get the tags in separate jar form from here...
>http://www.keyboardmonkey.com/struts and do the same.
>
>Only other way is indexed tags, but you're already trying to logically 
>nest, so keep nestin'.
> 
>The nested tags are the exact fit to what you expected from the tags.
>
>Arron.
>
>[EMAIL PROTECTED] wrote:
>
>>Here is my problem : 
>>
>>I have a from with an according form class :
>>public class OrderForm extends ActionFrom
>>{
>>private String name; // name of the person that is ordering
>>private ArrayList orderItems; // list of ordered items.
>>
>>// getters and setters ...
>>}
>>
>>Each order item is a bean like this :
>>public class ProductBean
>>{
>>private String productName; // the name of the product
>>private int number; // how many of this product do you want 
>>
>>// getters and setters ..
>>}
>>
>>I have a form on a jsp that diplayes a textbox for the name of the person 
that 
>>wants to order, and a textbox for each product so you can enter a number .
>>The problem is that these numbers are not stored  in the according 
ProductBeans.
>>
>>Here is my form. ( processOrder uses an OrderFrom 
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>If I click the submit button, my action is called.  The name is on the 
>>OrderForm, but there is not 1 number filled out !!
>>
>>How is this possible and how do I need to handle this problem .
>>
>>Thanks !
>>Geert
>>
>>
>>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>


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

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Fill a list of textboxes ...

2002-02-18 Thread Arron Bates

It's because you're trying to use the non-nesting tags in a nested 
manner. Basically the text tags don't know that they're inside the 
iterate tags.

If you're running the nightly build, change the  to 
 and the  to . If you're not 
on the nightly build, get the tags in separate jar form from here...
http://www.keyboardmonkey.com/struts and do the same.

Only other way is indexed tags, but you're already trying to logically 
nest, so keep nestin'.
 
The nested tags are the exact fit to what you expected from the tags.

Arron.

[EMAIL PROTECTED] wrote:

>Here is my problem : 
>
>I have a from with an according form class :
>public class OrderForm extends ActionFrom
>{
>private String name; // name of the person that is ordering
>private ArrayList orderItems; // list of ordered items.
>
>// getters and setters ...
>}
>
>Each order item is a bean like this :
>public class ProductBean
>{
>private String productName; // the name of the product
>private int number; // how many of this product do you want 
>
>// getters and setters ..
>}
>
>I have a form on a jsp that diplayes a textbox for the name of the person that 
>wants to order, and a textbox for each product so you can enter a number .
>The problem is that these numbers are not stored  in the according ProductBeans.
>
>Here is my form. ( processOrder uses an OrderFrom 
>
>
>
>
>
>
>
>
>
>
>
>
>If I click the submit button, my action is called.  The name is on the 
>OrderForm, but there is not 1 number filled out !!
>
>How is this possible and how do I need to handle this problem .
>
>Thanks !
>Geert
>
>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Second Message Ressource

2002-02-18 Thread Luke Studley

I just created my own Servlet class to load other Resource bundles and place
them in the context where appropriate.

-Original Message-
From: Benoit Segaert [mailto:[EMAIL PROTECTED]] 
Sent: 18 February 2002 09:03
To: [EMAIL PROTECTED]
Subject: Second Message Ressource

How can I use a second ApplicationResource  ?

In the JSP page, I can use 

Is it possible to define "secondApplicationResource" in the
ActionServlet parameters
in web.xml? If not how to define it in the servlet context?





--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Form -> Bean conversion - Not getting values

2002-02-18 Thread Santhosh Kumar

Thanks James.
It works when I expose all the fields in the html outputs (though I don't
use them ) as hidden fields. But why do I need to do this ? Aren't my action
form fields that are populated in the first page available in the second
page if the scope of the bean is declared as session (or request) in the
struts-config.xml. 

Santhosh

> --
> From: James Mitchell
> Reply To: Struts Users Mailing List
> Sent: Sunday, February 17, 2002 4:45 AM
> To:   'Struts Users Mailing List'
> Subject:  RE: Form -> Bean conversion - Not getting values
> 
> I apologize for not getting back to you sooner.
> I realized that as I began responding to you last post, my response was
> quickly becoming a full blown tutorial on "wizards in struts".
> I think I'll publish a tutorial on my web site in a few days, but for
> now here is a summary what I wrote
> 
> 
> If I understand correctly:
> 1. You are trying to persist input values across multiple
>pages (such as a 3-step-wizard might do)
> 2. You are wanting to reuse existing bean classes within struts framework
> (perhaps and Entity Bean???)
> 
> 
> **Requirements - User must be able to hit next and previous (submit
> buttons
> on page  **Not Browser buttons**)
> and system should maintain state across pages. (Without using session or
> db
> persistence)
> 
> 
> 
> 
> I have written several wizards in struts and I have found that
> the best way to handle the persistance (on the servlet container side) is
> to
> create your wizard in such a way that you use the same jsp and same action
> class
> for each step in the process.  Just use a different section of the page.
> (Separated by logic:equal tags)
> 
> Doing this will:
> 1. Allow you to have better consistency across your pages (look and feel)
> 2. Allow for Code reuse (my personal favorite)
> 
> Lets assume this is a 3 step wizard.
> Step 1. - fill in first name and last name
> Step 2. = fill in address
> Step 3. - check an "I agree" on a terms page.
> 
> The ActionForms/Beans and fields we want to use are as follows:
> (assuming they have accessor methods implemented)
> 
> com.mybean.MyActionForm
>   boolean agreed
> 
> com.mybean.MyExistingCustomerBean (could be an Entity bean)
>   String firstName
>   String lastName
>   String address1
>   String address2
>   String city
>   String state
>   String zipCode
> 
> 
> Be sure to expose all fields into the html output (even if it's not used,
> just put it in a hidden input tag).  Doing this will
> persist your ActionForm and Bean fields from step1 to the end, and allows
> the user to hit previous and back "submit" buttons.
> 
> -
> --
> 
> I'm not sure how you want to validate the ActionForm or Bean class at any
> given step, but:
> 1. Change the ActionForm scope to "request"
> 2. Add a field in your ActionForm called "step" and put a hidden field in
> the jsp named "step".
> 3. Put two submit buttons (each named "action") in your jsp page (one is
> "<>"
> 
> So when you are in the action class you will know where you are coming
> from
> by getting the form.getStep() and you will know where you should forward
> to by getting the form.getAction().
> Therefore:
> if ( form.getStep().equals( "1" ) && ( form.getAction().equals(
> "Next>>" ) ){
>   form.setStep( "2" );
> }
> 
> if ( form.getStep().equals( "2" ) && ( form.getAction().equals(
> "Next>>" ) ){
>   form.setStep( "3" );
> }else{
>   form.setStep( "1" );
> }
> 
> // if the action is not "Finish" then forward to "next" (see action
> mapping
> forward below)
> ...
> ...
> 
> 
> 
> --- struts-config.xml ---
> 
>  
>
>  
> 
>   
> type="mypackage.MyAction"
>name="MyForm"
>scope="request"  <- make this request
>  validate="false">
>   
>   
> 
> 
> 
> 
> --- wizard.jsp ---
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
>   scope="request" value="1"><- make sure your
> ActionForm.getStep() retuns "1" as a default.
>   First Name:   size="16" maxlength="16"/>
>   Last Name:size="16" maxlength="16"/>
>   
>   
> 
>   
>   scope="request" value="2">
> 
>   Address1: 
>   Address2: 
>   city: 
>   state:
>   zipCode:  
> 
>   
>   
>   
> 
>   
>   scope="request" value="3">
>   
> 
>   
>   
>   
>   
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --

Outputting dates to screen

2002-02-18 Thread Steve Earl

Hi guys,

I know that this has been discussed over the past week or two but I'm still
a bit unclear. Can someone help me out with the best (most recommended) way
of displaying a java Date object on a jsp.

At present I'm trying to use the  taglib from Apache. The docs for
this seem to show that you can pass in a date object and the tag will format
it according to a pattern string you supply - so you can do:


where dt:currentTime returns a Date object set to the current time.

Unfortunately, I'm trying to get the date from a bean so I was trying:

dt:format pattern="dd/MMM/">

but this ends up with "Invalid Date" being output to the screen. Does anyone
know if there's a particular syntax which needs to be used with this tag and
that I'm not using correctly?

Also, I saw that Ted suggested having separate getter methods which returned
the date in the format required for the screen. Can I ask a 
question and ask how you call that method from a bean:write? I was under the
impression that the bean:write took a field name as the property value and
then under the covers it would be looking for the getter method for this
property. If I was to add a new getter then there wouldn't be an equivalent
field within the class.

For example, here's my class

Class MyObject {
 private Date myDate;
 
 public Date getMyDate() {
return myDate;
 }
 public void setMyDate(Date inDate) {
myDate = inDate;
 }
}

If I add a new getter to this to return a string equivalent of myDate, how
do I call that from the bean:write?

Sorry if this is all a bit dumb - it is Monday morning after all...!!

regards,
steve


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Second Message Ressource

2002-02-18 Thread Benoit Segaert

How can I use a second ApplicationResource  ?

In the JSP page, I can use 

Is it possible to define "secondApplicationResource" in the
ActionServlet parameters
in web.xml? If not how to define it in the servlet context?





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Determining the name of a calling class

2002-02-18 Thread Sandor Murakozi

Hi!

I think it can help you.

/**
* Prints the name of the class from a static context + the list of classes on the 
stack.
*/
public class StackTest {

public static void main (String[] args) {
Test test1 = new Test();
System.out.println("\nClass name:\n" + ClassFromStatic.getMyClass().getName() 
+ "\n");
Class[] classesOnStack = ClassFromStatic.getClassesOnStack();
System.out.println("Classes on stack:");
for (int i = 0; i <  classesOnStack.length; i++) {
System.out.println(classesOnStack[i].getName());
}
}

public static class ClassFromStatic extends SecurityManager{
public static Class getMyClass(){
return new ClassFromStatic().getClassContext()[1];
}
public static Class[] getClassesOnStack(){
return new ClassFromStatic().getClassContext();
}
}
}


BR, 
don

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Fill a list of textboxes ...

2002-02-18 Thread geert

Here is my problem : 

I have a from with an according form class :
public class OrderForm extends ActionFrom
{
private String name; // name of the person that is ordering
private ArrayList orderItems; // list of ordered items.

// getters and setters ...
}

Each order item is a bean like this :
public class ProductBean
{
private String productName; // the name of the product
private int number; // how many of this product do you want 

// getters and setters ..
}

I have a form on a jsp that diplayes a textbox for the name of the person that 
wants to order, and a textbox for each product so you can enter a number .
The problem is that these numbers are not stored  in the according ProductBeans.

Here is my form. ( processOrder uses an OrderFrom 












If I click the submit button, my action is called.  The name is on the 
OrderForm, but there is not 1 number filled out !!

How is this possible and how do I need to handle this problem .

Thanks !
Geert



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

--
To unsubscribe, e-mail:   
For additional commands, e-mail: