Getting Locale from a non-struts servlet

2001-03-13 Thread Neal Kaiser

Does Struts store the client's Locale in their session somewhere? If so, how
would
I access it?

I have a non-struts servlet which I want to try to pull the Locale object
from.

Thanks,

Neal




ActionError Substitution Problem

2001-02-23 Thread Neal Kaiser

All my substitutions are showing up like this:

Sorry, the username [Ljava.lang.Object;@7268de is already in use.

My code is like this:

String user_username="test";

errors.add("username",
new ActionError("error.user_username.unique",user_username));

I've also tried:

new ActionError("error.user_username.unique",new
String(user_username)));

And my properties file has: 

error.user_username.unique = Sorry, the username {0} is already in use.


I am using Orion and Struts build from 2 nights ago.

What am I doing wrong?

Thanks, Neal

 winmail.dat


Strange Error with html:select

2001-02-19 Thread Neal Kaiser

I am using Orion 1.4.7. I don't know if this is an Orion bug, or possibly
Struts?  I have a jsp which uses the include directive to read in a list of
countries:


The jsp looks like this:

html:select property="addressBook_country" size="1" 
%@ include file="../util/countries.jsp" %
/html:select


And the countries.jsp is something like this:
..
html:option value="TV"Tuvalu/html:option
html:option value="VI"U.S. Virgin Islands /html:option
html:option value="UG"Uganda/html:option

If I have 223 lines in my countries.jsp file, it works, no problem. However,
if I go over 223 lines (no matter what line it is) I get this error:

Error parsing JSP page /galacy/register/layout.jsp

Error creating jsp-page instance: java.lang.VerifyError: (class:
__jspPage28_register_regstep2_jsp, method: _jspService signature:
(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletRespo
nse;)V) Illegal target of jump or branch

I just tried putting the select list in the .jsp rather than using an
include -- same error.

I am leaning towards this being a container bug, not a Struts one. But I
just wanted to verify and make sure this wasn't know with Struts first...

Thanks, Neal




RE: Strange Error with html:select

2001-02-19 Thread Neal Kaiser

Yep, same here. Increasing the heap didn't do it.  I wish there was a better
solution to this!

 -Original Message-
 From: Martin Cooper [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 19, 2001 4:34 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Strange Error with html:select
 
 
 In our case, increasing the JVM's heap size didn't fix the 
 problem. The only
 thing that fixed it was reducing the number of tags on the 
 page, so I'm
 leaning towards believing that a method size limit in a class 
 file (someone
 mentioned 64KB) is the most likely cause. Nasty. Now I'm 
 having to write
 custom tags just to reduce the total number of tags on a page!
 
 --
 Martin Cooper
 Tumbleweed Communications
 
 
 - Original Message -
 From: "Dan Connelly" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, February 19, 2001 8:26 AM
 Subject: Re: Strange Error with html:select
 
 
 This one came up earlier this month.   Nothing to do with 
 html:select
 per se.  A large number of tags on a page can cause this.
 
 Check the archive at http://marc.theaimsgroup.com/
 http://marc.theaimsgroup.com/
 
 Search struts-user for the topic "Illegal target of branch or jump"
 
 The last post on that topic says that the cure is to give 
 yourself more
 heap in the JVM with -mx and -ms
 
 (I wonder if its really more stack space per thread that on 
 needs for a
 large number of tags on a JSP (??).  I haven't looked into it, but
 stack(s) are usually more fragile than heap in multi-threaded system.)
 
 - Original Message -
 From: "Neal Kaiser"   mailto:[EMAIL PROTECTED] 
 [EMAIL PROTECTED]
 To:   mailto:[EMAIL PROTECTED]
 [EMAIL PROTECTED]
 Sent: Monday, February 19, 2001 9:45 AM
 Subject: Strange Error with html:select
 
 
  I am using Orion 1.4.7. I don't know if this is an Orion bug, or
 possibly
  Struts?  I have a jsp which uses the include directive to read in a
 list of
  countries:
 
 
  The jsp looks like this:
 
  html:select property="addressBook_country" size="1" 
  %@ include file="../util/countries.jsp" %
  /html:select
 
 
  And the countries.jsp is something like this:
  ..
  html:option value="TV"Tuvalu/html:option
  html:option value="VI"U.S. Virgin Islands /html:option
  html:option value="UG"Uganda/html:option
 
  If I have 223 lines in my countries.jsp file, it works, no problem.
 However,
  if I go over 223 lines (no matter what line it is) I get this error:
 
  Error parsing JSP page /galacy/register/layout.jsp
 
  Error creating jsp-page instance: java.lang.VerifyError: (class:
  __jspPage28_register_regstep2_jsp, method: _jspService signature:
 
 (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/Ht
 tpServletR
 espo
  nse;)V) Illegal target of jump or branch
 
  I just tried putting the select list in the .jsp rather 
 than using an
  include -- same error.
 
  I am leaning towards this being a container bug, not a 
 Struts one. But
 I
  just wanted to verify and make sure this wasn't know with Struts
 first...
 
  Thanks, Neal
 
 
 
 



RE: Strange Error with html:select

2001-02-19 Thread Neal Kaiser

Rather than going custom taglib route, is it possible to use jsp:include ?
The problem with that is that the file must inherit from the calling file's
struts
elements.

For example, something like this:

html:select property="country" size="1" 
jsp:include page="../util/countries.jsp" flush="true"/
/html:select

The only include that works is the %@ include directive, but that doesn't
solve this
method size limit problem.

Is this a container thing? Or is this a spec thing?



 -Original Message-
 From: Martin Cooper [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 19, 2001 4:34 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Strange Error with html:select


 In our case, increasing the JVM's heap size didn't fix the
 problem. The only
 thing that fixed it was reducing the number of tags on the
 page, so I'm
 leaning towards believing that a method size limit in a class
 file (someone
 mentioned 64KB) is the most likely cause. Nasty. Now I'm
 having to write
 custom tags just to reduce the total number of tags on a page!

 --
 Martin Cooper
 Tumbleweed Communications


 - Original Message -
 From: "Dan Connelly" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, February 19, 2001 8:26 AM
 Subject: Re: Strange Error with html:select


 This one came up earlier this month.   Nothing to do with
 html:select
 per se.  A large number of tags on a page can cause this.

 Check the archive at http://marc.theaimsgroup.com/
 http://marc.theaimsgroup.com/

 Search struts-user for the topic "Illegal target of branch or jump"

 The last post on that topic says that the cure is to give
 yourself more
 heap in the JVM with -mx and -ms

 (I wonder if its really more stack space per thread that on
 needs for a
 large number of tags on a JSP (??).  I haven't looked into it, but
 stack(s) are usually more fragile than heap in multi-threaded system.)

 - Original Message -
 From: "Neal Kaiser"   mailto:[EMAIL PROTECTED]
 [EMAIL PROTECTED]
 To:   mailto:[EMAIL PROTECTED]
 [EMAIL PROTECTED]
 Sent: Monday, February 19, 2001 9:45 AM
 Subject: Strange Error with html:select


  I am using Orion 1.4.7. I don't know if this is an Orion bug, or
 possibly
  Struts?  I have a jsp which uses the include directive to read in a
 list of
  countries:
 
 
  The jsp looks like this:
 
  html:select property="addressBook_country" size="1" 
  %@ include file="../util/countries.jsp" %
  /html:select
 
 
  And the countries.jsp is something like this:
  ..
  html:option value="TV"Tuvalu/html:option
  html:option value="VI"U.S. Virgin Islands /html:option
  html:option value="UG"Uganda/html:option
 
  If I have 223 lines in my countries.jsp file, it works, no problem.
 However,
  if I go over 223 lines (no matter what line it is) I get this error:
 
  Error parsing JSP page /galacy/register/layout.jsp
 
  Error creating jsp-page instance: java.lang.VerifyError: (class:
  __jspPage28_register_regstep2_jsp, method: _jspService signature:
 
 (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/Ht
 tpServletR
 espo
  nse;)V) Illegal target of jump or branch
 
  I just tried putting the select list in the .jsp rather
 than using an
  include -- same error.
 
  I am leaning towards this being a container bug, not a
 Struts one. But
 I
  just wanted to verify and make sure this wasn't know with Struts
 first...
 
  Thanks, Neal
 







RE: [Q] TRANSACTION_TOKEN_KEY

2001-02-10 Thread Neal Kaiser

How does this work when they are registering for the first time, not
editing. I can
see that in EditRegistrationAction the token is set... but if they are
registering
for the first time where is the token set? It seems that it would fail when
it hits
the token check in SaveRegistrationAction, but I know it doesn't, so it must
be set
somewhere, right?



 -Original Message-
 From: Rob Leland [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 09, 2001 9:52 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [Q] TRANSACTION_TOKEN_KEY


 EditRegistrationAction.java  SaveRegistrationAction.java
 provide examples.

 You would probably never use generateToken().

 It is used whenever you want to prevent the user
 from bookmarking a page, or from using the browser
 back arrow and then posting a second time.

 In the EditRegistrationAction, once the data is loaded
 from a database a call to saveToken() is made. It should
 probably be named 'setToken()' to be consistent with
 'resetToken()'. This sets a variable in both the session
 and request scope of the app. Control is then forwarded
 to the edit jsp. When the user 'posts' the page the
 Token is validated in SaveRegistrationPage, then it is
 destroyed by the 'resetToken call. Then the next page is
 'forwarded' to. If at this time the user hits the 'back'
 button and hits 'post' again, when SaveRegistrationAction
 checks to see if the token is valids it finds can find
 one of two things:
   1) Either the 'Token' variable didn't exist in the session scope.
  This happen if 'resetToken' was the last method called
   2) Or it will find that the "request" and "session" scope
 Token do not
 match.
  This happen if 'saveToken' was the last method called.


 Alexander Staff wrote:
 
  Hello,
  does anyone here have any examples/explanations about using the
  TRANSACTION_TOKEN_KEY feature in struts ?
  I am not sure using the generateToken(), isTokenValid(),
 resetToken() and
  saveToken() functions properly and in the right place.
 
  Thanks in advance
  Ciao
  Alexander
 
  --
  Sent through GMX FreeMail - http://www.gmx.net




JspException: Must specify type attribute if name is specified

2001-02-09 Thread Neal Kaiser

I just upgraded to last nights build and get the following error:

javax.servlet.jsp.JspException: Must specify type attribute if name is
specified   at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:669)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441)   at
/getstarted/regstep1.jsp._jspService(/getstarted/regstep1.jsp.java:84) (JSP
page line 47)

This is the line in the .jsp it is complaining about:

form:form name="registrationForm" action="regstep1.do" 

And this is what I have in struts-config.xml:

   form-bean  name="registrationForm"
type="com.mas.ebiz.asp.register.RegistrationForm"/

and


 !-- Seller Registration - Selection of plan --
action   path="/regstep1"
  type="com.mas.ebiz.asp.register.SaveRegistrationAction"
  name="registrationForm"
  scope="session"
  validate="true"
  forward name="success"  path="/getstarted/regstep2.jsp"/
  forward name="failure"  path="/getstarted/regstep1.jsp"/
/action


I do seem to be passing the type, so I'm not sure why I get an error?

Any pointers for places for me to look?

When I upgraded, I updated the struts.jar and copied in the latest .tlds.

Thanks, Neal




RE: Help Debug Form Error?

2001-01-15 Thread Neal Kaiser

Also, FYI, I updated to last night's struts nightly build and I still have
the
same problem.  For what it's worth, here's the genereated registration.jsp
servlet
snippet that's causing the error:

 // form:text size="25" maxlength="30" property="addressBook_company"/
start
__tag5.setParent(__tag4);
__tag5.setProperty("addressBook_company");
__tag5.setMaxlength("30");
__tag5.setSize("25");
__tempInt = __tag5.doStartTag();

IT DIES RIGHT HERE in the doStartTag()

My container is Orion 1.4.4.

Thanks,

Neal


 -Original Message-
 From: Neal Kaiser [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, January 14, 2001 10:43 PM
 To: [EMAIL PROTECTED]
 Subject: Help Debug Form Error?


 I have a strange problem. I have a simple form that is making
 use of some
 form: tags.  Everything works fine until I get to this line:

 form:text property="AddressBook_company" maxlength="30" size="25"/

 The page stops loading and the following exception is thrown:

 1/14/01 10:29 PM galacyWeb: Servlet error
 java.lang.NoClassDefFoundError:
 org/apache/struts/upload/MultipartRequestHandler
 at java.lang.Class.getMethods0(Native Method)
 at java.lang.Class.getDeclaredMethods(Class.java:1039)
 at java.beans.Introspector$1.run(Introspector.java:852)
 at java.security.AccessController.doPrivileged(Native Method)
 at
 java.beans.Introspector.getPublicDeclaredMethods(Introspector.
 java:850)
 at
 java.beans.Introspector.getTargetEventInfo(Introspector.java:556)
 at java.beans.Introspector.getBeanInfo(Introspector.java:294)
 at java.beans.Introspector.init(Introspector.java:271)
 at java.beans.Introspector.getBeanInfo(Introspector.java:81)
 at
 org.apache.struts.util.PropertyUtils.getPropertyDescriptors(Pr
 opertyUtils.ja
 va:452)
 at
 org.apache.struts.util.PropertyUtils.getPropertyDescriptor(Pro
 pertyUtils.jav
 a:419)
 at
 org.apache.struts.util.PropertyUtils.getSimpleProperty(Propert
 yUtils.java:56
 3)
 at
 org.apache.struts.util.PropertyUtils.getNestedProperty(Propert
 yUtils.java:33
 8)
 at
 org.apache.struts.util.PropertyUtils.getProperty(PropertyUtils
 .java:363)
 at
 org.apache.struts.util.BeanUtils.getScalarProperty(BeanUtils.java:524)
 at
 org.apache.struts.taglib.form.BaseFieldTag.doStartTag(BaseFiel
 dTag.java:177)
 at /register.jsp._jspService(/register.jsp.java:83)
 (JSP page line
 107)
 at com.orionserver.http.OrionHttpJspPage.service(JAX)
 at com.evermind.server.http.HttpApplication.xi(JAX)
 at com.evermind.server.http.JSPServlet.service(JAX)
 at com.evermind.server.http.d5.sv(JAX)
 at com.evermind.server.http.d5.st(JAX)
 at com.evermind.server.http.eh.s0(JAX)
 at com.evermind.server.http.eh.do(JAX)
 at com.evermind.util.f.run(JAX)


 I've checked my RegistrationForm.java and it looks OK. There
 is a get/set
 method for AddressBook_company.
 Could it be the "_" throwing it off?

 Any help is appreciated...

 Thanks.





RE: Help Debug Form Error? - Can ActionForms be Serialized ?

2001-01-15 Thread Neal Kaiser

This is a long shot, but one difference between my ActionForm and the
one from the struts example is that my ActionForm implements
java.io.Serializable
(and of course extends ActionForm).  I do this because my Action Form is
eventually
passed to an EJB.  Could that somehow break struts?

Thanks.

 -Original Message-
 From: Neal Kaiser [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 15, 2001 8:54 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Help Debug Form Error?


 Also, FYI, I updated to last night's struts nightly build and
 I still have
 the
 same problem.  For what it's worth, here's the genereated
 registration.jsp
 servlet
 snippet that's causing the error:

  // form:text size="25" maxlength="30"
 property="addressBook_company"/
 start
 __tag5.setParent(__tag4);
 __tag5.setProperty("addressBook_company");
 __tag5.setMaxlength("30");
 __tag5.setSize("25");
 __tempInt = __tag5.doStartTag();

   IT DIES RIGHT HERE in the
 doStartTag()

 My container is Orion 1.4.4.

 Thanks,

 Neal


  -Original Message-
  From: Neal Kaiser [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, January 14, 2001 10:43 PM
  To: [EMAIL PROTECTED]
  Subject: Help Debug Form Error?
 
 
  I have a strange problem. I have a simple form that is making
  use of some
  form: tags.  Everything works fine until I get to this line:
 
  form:text property="AddressBook_company" maxlength="30" size="25"/
 
  The page stops loading and the following exception is thrown:
 
  1/14/01 10:29 PM galacyWeb: Servlet error
  java.lang.NoClassDefFoundError:
  org/apache/struts/upload/MultipartRequestHandler
  at java.lang.Class.getMethods0(Native Method)
  at java.lang.Class.getDeclaredMethods(Class.java:1039)
  at java.beans.Introspector$1.run(Introspector.java:852)
  at
 java.security.AccessController.doPrivileged(Native Method)
  at
  java.beans.Introspector.getPublicDeclaredMethods(Introspector.
  java:850)
  at
  java.beans.Introspector.getTargetEventInfo(Introspector.java:556)
  at
 java.beans.Introspector.getBeanInfo(Introspector.java:294)
  at java.beans.Introspector.init(Introspector.java:271)
  at java.beans.Introspector.getBeanInfo(Introspector.java:81)
  at
  org.apache.struts.util.PropertyUtils.getPropertyDescriptors(Pr
  opertyUtils.ja
  va:452)
  at
  org.apache.struts.util.PropertyUtils.getPropertyDescriptor(Pro
  pertyUtils.jav
  a:419)
  at
  org.apache.struts.util.PropertyUtils.getSimpleProperty(Propert
  yUtils.java:56
  3)
  at
  org.apache.struts.util.PropertyUtils.getNestedProperty(Propert
  yUtils.java:33
  8)
  at
  org.apache.struts.util.PropertyUtils.getProperty(PropertyUtils
  .java:363)
  at
 
 org.apache.struts.util.BeanUtils.getScalarProperty(BeanUtils.java:524)
  at
  org.apache.struts.taglib.form.BaseFieldTag.doStartTag(BaseFiel
  dTag.java:177)
  at /register.jsp._jspService(/register.jsp.java:83)
  (JSP page line
  107)
  at com.orionserver.http.OrionHttpJspPage.service(JAX)
  at com.evermind.server.http.HttpApplication.xi(JAX)
  at com.evermind.server.http.JSPServlet.service(JAX)
  at com.evermind.server.http.d5.sv(JAX)
  at com.evermind.server.http.d5.st(JAX)
  at com.evermind.server.http.eh.s0(JAX)
  at com.evermind.server.http.eh.do(JAX)
  at com.evermind.util.f.run(JAX)
 
 
  I've checked my RegistrationForm.java and it looks OK. There
  is a get/set
  method for AddressBook_company.
  Could it be the "_" throwing it off?
 
  Any help is appreciated...
 
  Thanks.
 





RE: Help Debug Form Error? - Can ActionForms be Serialized ?

2001-01-15 Thread Neal Kaiser

Thanks, I already did that. I just got it working, FYI. It was an Orion
abnormality.
I had to move the struts.jar to orion/lib instead of WEB-INF/lib and move my
classes
to orion/lib as well.



 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 15, 2001 10:42 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Help Debug Form Error? - Can ActionForms be Serialized ?



 Neal Kaiser wrote:

  This is a long shot, but one difference between my
 ActionForm and the
  one from the struts example is that my ActionForm implements
  java.io.Serializable
  (and of course extends ActionForm).  I do this because my
 Action Form is
  eventually
  passed to an EJB.  Could that somehow break struts?
 

 ActionForm is already defined to be Serializable in the
 current 1.0 code, so
 that will not make any difference.

 There have been various reports of problems on various
 versions of Orion in the
 past.  In the most recent versions, my understanding is that
 you have to extract
 the properties files out of struts.jar and place them (unpacked) under
 WEB-INF/classes due to bugs in the Orion classloader.


 
  Thanks.
 

 Craig McClanahan


 
   -Original Message-
   From: Neal Kaiser [mailto:[EMAIL PROTECTED]]
   Sent: Monday, January 15, 2001 8:54 AM
   To: [EMAIL PROTECTED]
   Subject: RE: Help Debug Form Error?
  
  
   Also, FYI, I updated to last night's struts nightly build and
   I still have
   the
   same problem.  For what it's worth, here's the genereated
   registration.jsp
   servlet
   snippet that's causing the error:
  
// form:text size="25" maxlength="30"
   property="addressBook_company"/
   start
   __tag5.setParent(__tag4);
   __tag5.setProperty("addressBook_company");
   __tag5.setMaxlength("30");
   __tag5.setSize("25");
   __tempInt = __tag5.doStartTag();
  
 IT DIES RIGHT HERE in the
   doStartTag()
  
   My container is Orion 1.4.4.
  
   Thanks,
  
   Neal
  
  
-Original Message-
From: Neal Kaiser [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 14, 2001 10:43 PM
To: [EMAIL PROTECTED]
Subject: Help Debug Form Error?
   
   
I have a strange problem. I have a simple form that is making
use of some
form: tags.  Everything works fine until I get to this line:
   
form:text property="AddressBook_company"
 maxlength="30" size="25"/
   
The page stops loading and the following exception is thrown:
   
1/14/01 10:29 PM galacyWeb: Servlet error
java.lang.NoClassDefFoundError:
org/apache/struts/upload/MultipartRequestHandler
at java.lang.Class.getMethods0(Native Method)
at java.lang.Class.getDeclaredMethods(Class.java:1039)
at java.beans.Introspector$1.run(Introspector.java:852)
at
   java.security.AccessController.doPrivileged(Native Method)
at
java.beans.Introspector.getPublicDeclaredMethods(Introspector.
java:850)
at
   
 java.beans.Introspector.getTargetEventInfo(Introspector.java:556)
at
   java.beans.Introspector.getBeanInfo(Introspector.java:294)
at java.beans.Introspector.init(Introspector.java:271)
at
 java.beans.Introspector.getBeanInfo(Introspector.java:81)
at
org.apache.struts.util.PropertyUtils.getPropertyDescriptors(Pr
opertyUtils.ja
va:452)
at
org.apache.struts.util.PropertyUtils.getPropertyDescriptor(Pro
pertyUtils.jav
a:419)
at
org.apache.struts.util.PropertyUtils.getSimpleProperty(Propert
yUtils.java:56
3)
at
org.apache.struts.util.PropertyUtils.getNestedProperty(Propert
yUtils.java:33
8)
at
org.apache.struts.util.PropertyUtils.getProperty(PropertyUtils
.java:363)
at
   
  
 org.apache.struts.util.BeanUtils.getScalarProperty(BeanUtils.java:524)
at
org.apache.struts.taglib.form.BaseFieldTag.doStartTag(BaseFiel
dTag.java:177)
at /register.jsp._jspService(/register.jsp.java:83)
(JSP page line
107)
at com.orionserver.http.OrionHttpJspPage.service(JAX)
at com.evermind.server.http.HttpApplication.xi(JAX)
at com.evermind.server.http.JSPServlet.service(JAX)
at com.evermind.server.http.d5.sv(JAX)
at com.evermind.server.http.d5.st(JAX)
at com.evermind.server.http.eh.s0(JAX)
at com.evermind.server.http.eh.do(JAX)
at com.evermind.util.f.run(JAX)
   
   
I've checked my RegistrationForm.java and it looks OK. There
is a get/set
method for AddressBook_company.
Could it be the "_" throwing it off?
   
Any help is appreciated...
   
Thanks.
   
  





Help Debug Form Error?

2001-01-14 Thread Neal Kaiser

I have a strange problem. I have a simple form that is making use of some
form: tags.  Everything works fine until I get to this line:

form:text property="AddressBook_company" maxlength="30" size="25"/

The page stops loading and the following exception is thrown:

1/14/01 10:29 PM galacyWeb: Servlet error
java.lang.NoClassDefFoundError:
org/apache/struts/upload/MultipartRequestHandler
at java.lang.Class.getMethods0(Native Method)
at java.lang.Class.getDeclaredMethods(Class.java:1039)
at java.beans.Introspector$1.run(Introspector.java:852)
at java.security.AccessController.doPrivileged(Native Method)
at
java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:850)
at java.beans.Introspector.getTargetEventInfo(Introspector.java:556)
at java.beans.Introspector.getBeanInfo(Introspector.java:294)
at java.beans.Introspector.init(Introspector.java:271)
at java.beans.Introspector.getBeanInfo(Introspector.java:81)
at
org.apache.struts.util.PropertyUtils.getPropertyDescriptors(PropertyUtils.ja
va:452)
at
org.apache.struts.util.PropertyUtils.getPropertyDescriptor(PropertyUtils.jav
a:419)
at
org.apache.struts.util.PropertyUtils.getSimpleProperty(PropertyUtils.java:56
3)
at
org.apache.struts.util.PropertyUtils.getNestedProperty(PropertyUtils.java:33
8)
at
org.apache.struts.util.PropertyUtils.getProperty(PropertyUtils.java:363)
at
org.apache.struts.util.BeanUtils.getScalarProperty(BeanUtils.java:524)
at
org.apache.struts.taglib.form.BaseFieldTag.doStartTag(BaseFieldTag.java:177)
at /register.jsp._jspService(/register.jsp.java:83) (JSP page line
107)
at com.orionserver.http.OrionHttpJspPage.service(JAX)
at com.evermind.server.http.HttpApplication.xi(JAX)
at com.evermind.server.http.JSPServlet.service(JAX)
at com.evermind.server.http.d5.sv(JAX)
at com.evermind.server.http.d5.st(JAX)
at com.evermind.server.http.eh.s0(JAX)
at com.evermind.server.http.eh.do(JAX)
at com.evermind.util.f.run(JAX)


I've checked my RegistrationForm.java and it looks OK. There is a get/set
method for AddressBook_company.
Could it be the "_" throwing it off?

Any help is appreciated...

Thanks.




Form errors

2001-01-02 Thread Neal Kaiser

I probably missed this in the documentation, but if I want to pull out the
error message for a specific field, how would I do it?  Let's say I have a
username which was left blank and I create a new ActionError :

errors.add("username",new ActionError("error.username.required"));

Now, in my .jsp, rather than having all the errors displayed with
form:errors/, I want to put the
error.username.required error right next to the username field:

form:text property="username" size="16" maxlength="16"/ nbsp;
form:errors username-only

I don't want it to use errors.header or errors.footer either in this case.

Is that possible?
Thanks.




Can't Connect to PostgreSQL with struts-example on Orion App Server

2000-12-27 Thread Neal Kaiser

Can someone tell me what I'm missing?

In web.xml I have:

servlet
servlet-namedatabase/servlet-name
servlet-classorg.apache.struts.example.DatabaseServlet/servlet-class
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
load-on-startup1/load-on-startup
  /servlet


In struts-config.xml I have:

data-source
 autoCommit="false"
description="Example Data Source Configuration"
driverClass="org.postgresql.Driver"
   maxCount="4"
   minCount="2"
   password="password"
url="jdbc:postgresql://localhost/galacy"
   user="galacy"
  /


I know that my postgresql.jar is OK and have tried a connection successfully
with the jdbc URL above.

When I go to localhost/struts-example I get:

ERROR: User database not loaded -- check servlet container logs for error
messages

What's weird is that since I have debug=2 I should see some log() statements
about connecting to PostgreSQL. I get nothing in my log. The only thing I
see on my console is:

New org.apache.struts.util.GenericDataSource
Set org.apache.struts.util.GenericDataSource properties
Call
org.apache.struts.action.ActionServlet.setDataSource(GenericDataSource[activ
eCount=0, autoCommit=false, closed=false, description=Example Data Source
Configuration, driverClass=org.postgresql.Driver, loginTimeout=0,
maxCount=4, minCount=2, password=password, readOnly=false,
url=jdbc:postgresql://localhost/galacy, useCount=0, user=galacy])
Pop org.apache.struts.util.GenericDataSource


Any ideas?

Thanks.




Missing message for key index.title

2000-12-20 Thread Neal Kaiser

Can someone tell me what this error means:

javax.servlet.jsp.JspException: Missing message for key index.title at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:261)

I get it when trying to run the  struts-example on Orion Server.

THanks



RE: Missing message for key index.title

2000-12-20 Thread Neal Kaiser

Thanks. I actually have both of those already. I think it might have to do
with
the Orion Server.  I did take the steps that have been posted in the past to
get it to work with Orion, but still no luck.  Could this be related? In my
orion console I see:

[root@www orion]# Orion/1.4.4 initialized
resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
 Not registered, use system identifier
Parse Error at line 37 column -1: Element "struts-config" does not allow
"form-beans" here.
org.xml.sax.SAXParseException: Element "struts-config" does not allow
"form-beans" here.

and a bunch more errors.

Neal

 -Original Message-
 From: Jason Haase [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 20, 2000 9:22 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: Missing message for key index.title



 It sounds like your ApplicationResources.properties file is not there.
 Check to make sure it is in
 ...\struts-example\WEB-INF\classes\org\apache\struts\example.
 Orion should
 have unpacked the struts-example.war file for you.  Otherwise,
 look in your
 web.xml file to make sure your "Action Servlet Configuration"
 specifies the
 right properties file.  Like this:

 init-param
   param-nameapplication/param-name

 param-valueorg.apache.struts.example.ApplicationResources/param-value
 /init-param


 Jason Haase



 -Original Message-
 From: Neal Kaiser [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 20, 2000 6:09 PM
 To: [EMAIL PROTECTED]
 Subject: Missing message for key index.title


 Can someone tell me what this error means:

 javax.servlet.jsp.JspException: Missing message for key index.title   at
 org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:261)

 I get it when trying to run the  struts-example on Orion Server.

 THanks





RE: struts 1.0 pre-release example web application deployment on Orion

2000-12-19 Thread Neal Kaiser

I did exactly what you specified below, and can get the .ear to deploy, but
now get a different error:

javax.servlet.jsp.JspException: Missing message for key index.title at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:261)at
/index.jsp._jspService(/index.jsp.java:51) (JSP page line 8)at
com.orionserver.http.OrionHttpJspPage.service(JAX)  at
com.evermind.server.http.HttpApplication.xi(JAX)at
com.evermind.server.http.JSPServlet.service(JAX)at
com.evermind.server.http.d5.sv(JAX) at com.evermind.server.http.d5.st(JAX)
at com.evermind.server.http.eh.s0(JAX)  at
com.evermind.server.http.eh.do(JAX) at com.evermind.util.f.run(JAX)


Any ideas what I am missing now? Thank you.

 -Original Message-
 From: Ate Douma [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 15, 2000 2:23 PM
 To: [EMAIL PROTECTED]
 Subject: FYI: struts 1.0 pre-release example web application deployment
 on Orion


 - Original Message -
 From: "Ate Douma" [EMAIL PROTECTED]
 To: "Orion-Interest" [EMAIL PROTECTED]
 Sent: Friday, December 15, 2000 20:19
 Subject: Re: Struts 1.0 - Anyone Do It?


  Ok, once more: Deploying the stuts 1.0 pre-release example web
 application
  on Orion in (more or less) five steps
  (based on Orion 1.3.8 and jakarta-struts-src-20001209.zip on
 W2k, jdk1.3):
 
  1. build the struts example web application (or retrieve it from the
 nightly
  build distribution)
  1.1. extract the struts src distribution in a temporary directory
  ([struts])
  1.2. build struts distribution by executing
 "[struts]\jakarta-struts\ant
  dist" (using [struts]\jakata-struts\build.xml)
  2. modify the web application archive
  [struts]\dist\struts\webapps\struts-example.war:
  2.1. extract struts-example.war in a clean temporary directory
 ([temp])
  2.2. open [temp]\WEB-INF\lib\struts.jar and extract
  org\apache\struts\resources\struts-config_1_0.dtd to
 [temp]\WEB-INF\classes\
  creating file
  [temp]\WEB-INF\classes\org\apache\struts\resources\struts-config_1_0.dtd
  2.3 delete the above file from struts.jar and save struts.jar in
  [temp]\WEB-INF\lib\
  2.4 jar (or zip) the contents of [temp]\ in a new web application
  archive [temp]\struts-example.war (don't forget keeping the
 folder names)
  3. create a struts.ear file by:
  3.1. create file [temp]\META-INF\application.xml containing the
  following:
  ?xml version="1.0"?
  !DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD
  J2EE Application 1.2//EN"
  "http://java.sun.com/j2ee/dtds/application_1_2.dtd"
  application
display-namestruts/display-name
module
  web
web-uristruts-example.war/web-uri
context-root/struts-example/context-root
  /web
/module
  /application
  3.2 jar (or zip) [temp]\META-INF\application.xml and
  [temp]\struts-examples.war into a new enterprise application archive
  [temp]\struts.ear (using folder names)
  4. deploy the example web application on orion
  4.1. extract orion1.3.8.zip in some directory ([orion])
  4.2. copy the struts.ear file into [orion]/application
  4.3. modify [orion]\config\server.xml by adding the
 following element
  under (nested within) the application-server ... element:
application name="struts"
 path="../applications/struts.ear" /
  4.4. modify [orion]\config\default-web-site.xml by adding the
 following
  element under (nested within) the web-site ... element:
web-app application="struts" name="struts-example"
  root="/struts-example" /
  5. run the example web application
  5.1. startup orion by executing "java -jar orion.jar" within the
  [orion]\ directory
  5.2. access the example web application from a browser using url:
  http://localhost/struts-example
 
  Ate Douma
 
  - Original Message -
  From: "Neal Kaiser" [EMAIL PROTECTED]
  To: "Orion-Interest" [EMAIL PROTECTED]
  Sent: Friday, December 15, 2000 16:18
  Subject: Struts 1.0 - Anyone Do It?
 
 
   I get the common "Missing resources attribute
   org.apache.struts.action.MESSAGE" error. I've read a lot of threads on
  this,
   but didn't find a solution yet.
  
   If anyone has successfully deployed the struts-examples could
 you please
   post the steps? I'm sure there are many people that would benefit from
  this.
  
   Thank you.
  
  
  
 





Struts and Orion?

2000-12-15 Thread Neal Kaiser

Sorry if this has been covered before, I just joined (and don't know how to
get to the archives).

Has anyone successfully deployed the struts-examples for version 1.0 with
Orion 1.4.4?
I get the "Missing resources attribute org.apache.struts.action.MESSAGE"
error when
accessing it.

THank you.