enctype set to multipart/form-data loses session

2003-10-16 Thread Miriam Aguirre


 Hi All, 

 I've come across a struts oddity.. in an struts form designed to upload a
file, i set the enctype="multipart/form-data". When a user does not use
cookies iplanet tacks on two parameters to all requests to keep track of the
session info. Like so (in the resulting html) :

 


 However, for some reason, when the request reaches the action, the session
is new (and therefore not authenticated). This is not happening with any of
our countless other struts forms.. only this one. Has anyone come across
this ?

 We are using struts 1.0.2 and iPlanet Application Server 6.5. Is there a
work-around ?


 Thanks!
 -Miriam


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



RE: struts vs. JSP/Servlets

2003-04-04 Thread Miriam Aguirre

 http://jakarta.apache.org/struts/

 http://jakarta.apache.org/struts/faqs/kickstart.html#why

-Original Message-
From: Chin, Ed [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 1:37 PM
To: '[EMAIL PROTECTED]'
Subject: struts vs. JSP/Servlets


I want to use JSP and Servlets. Nothing else. 
What exactly does struts do for me that I can't do with Tomcat alone? 

I often hear struts/JSP. I also hear that struts allows us to build
applications in model 2 MVC form. But I also hear that about JSP and
Servlets. So then I started to think that struts is the framework that
allows us to use JSP/Servlet technology. But that must be wrong because I
installed Tomcat and it's running JSP/Servlets fine without installing
struts. So my question is still the one posed above. What does struts do for
me that I can't do with Tomcat alone (in the world of JSP/Servlets)?

- Edward




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

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



RE: [OT] intermittent build and deploy Struts application to WLS problem

2003-04-04 Thread Miriam Aguirre

 iplanet has a whole slew of its own inadequacies.. for example, we can't
even get struts 1.1 to run unless we add the jar to its classpath (which is
not an option for us) - the class loader says it can't find the
PropertyMessageResourcesFactory even though its under the WEB-INF/lib
directory, so we're stuck with the older version of struts. Deployment is a
pain with iplanet, the deployment tool is really picky and inconsistent with
the command line deploy tool (which we prefer to use with ant, to make
'deploy' another target in the build file), sometimes it reports no errors,
but it doesn't deploy anything! To summarize, Iplanet sucks ( app server 6.0
SP4 and 6.5, still waiting for 7.0 enterprise edition).

-Original Message-
From: Piper, James D CECOM SEC EPS
[mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 11:56 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] intermittent build and deploy Struts application to
WLS problem


I wondered if your post meant that you had similar problems with
build/deploy giving funny intermittent errors or if you were just fed up
with pricey app servers giving you headaches? 

For me changing app servers is not an option, but I would be fascinated to
know if you were having similar build/deploy intermittent errors - since you
apparently use iPlanet and I use WLS, that would lead me to think my problem
lies more with the ant/javac/jar tools or EAR structure than it does with
the WLS app server.  I really don't think it is the WLS app server, because
when an EAR file works it will continue to work over many deployments, and
when an EAR file fails it will always fail the same way over many deployment
attempts.

- Jim Piper

-----Original Message-
From: Miriam Aguirre [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 1:22 PM
To: 'Struts Users Mailing List'
Subject: RE: [OT] intermittent build and deploy Struts application to
WLS pro blem



 we're currently struggling with this as well, I'm all for dumping iplanet
and move to jboss, but other people in the organization do not feel
comfortable with switching over to a non-sun-certified-freeware-app server..
so far, "so what, it's better!" is not working, any suggestions from the
group?? 

-Original Message-
From: Daniel Jaffa [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 9:10 AM
To: Struts Users Mailing List
Subject: Re: [OT] intermittent build and deploy Struts application to
WLS pro blem


Dump WLS and go over to JBOSS in production.  We are currenly going to save
something like
500k  by not upgrading to wls 7.0 or wls 8.0 and go directly to Jboss in
production.

- Original Message -
From: "Piper, James D CECOM SEC EPS" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 11:51 AM
Subject: [OT] intermittent build and deploy Struts application to WLS pro
blem


> This is a bit OT (probably has nothing to do with struts), but the problem
> has gone from an irritation to annoying to really starting to tick me off.
I
> hope that since many of you are working with similar environments that you
> may be able to help me out here:
>
> Problem
> ---
> Intermittently when I deploy to WLS I will receive anywhere from 1 to
about
> 40 errors of the form: 'Public class blah blah blah must be defined in a
> file called blah blah blah' (I think these errors are thrown when the WLS
is
> attempting to recompile my EJB JAR within the server, not sure about that
> though).  The clinker is that if I change no source code, recompile and
> redeploy again, then occasionally I will not have the errors and
everything
> will run fine from there on in.
>
> There have been times where I have gone through the hair pulling process
of
> running my ant clean, ant build scripts, and attempting to deploy 10 times
> before all of the sudden Blamo, it works only to fail again the next
> time I need to recompile.
>
> Environment description
> ---
> 1. I edit source, compile and build WAR, EJB JAR, support class JAR, and
EAR
> on Windows 2K using ant.  I use the manifest.update feature to put class
> path info about classes used in both EJBs and Servlets into the EAR file.
> 2. ANT_HOME = \apache-ant-1.5.3Beta1 (also tried 1.5.2  and 1.5.1)
> 3. JAVA_HOME = \j2sdk_forte\jdk1.4.0 (also tried 1.3.1)
> 4. Attempting to deploy EAR to BEA Web Logic Server 6.1 sp4 (also tried
sp2)
> running on a Sun server using WLS browser based admin tool.
> 5. The application uses Struts, log4j, rowtag among other things.
>
> Some Observations
> -
> 1. The size of my EAR file changes each time I run my ant build script.
> Looking inside the EAR I see that the compressed sizes of my WAR and EJB
> JAR, and support class JAR files change each time the EAR

RE: html:link and array

2003-04-04 Thread Miriam Aguirre

 name/property will append the map values to the URL such as

 page.jsp?param1=someValue¶m2=someOtherValue

 try using paramName and paramProperty if that is what you mean

 http://jakarta.apache.org/struts/userGuide/struts-html.html#link

-Original Message-
From: Brian Buckley [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 10:28 AM
To: Struts Users
Subject: html:link and array


All I want is a single html link created from a single element of the array
(in my example the third element).  I am thinking that I do have the correct
html:link attributes for "name" and/or "property" but I am not sure.

Did you really mean to say  name="foos" property="params.2"?  I tried it and
it did not work either.

Brian




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

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



RE: [OT] intermittent build and deploy Struts application to WLS pro blem

2003-04-04 Thread Miriam Aguirre

 we're currently struggling with this as well, I'm all for dumping iplanet
and move to jboss, but other people in the organization do not feel
comfortable with switching over to a non-sun-certified-freeware-app server..
so far, "so what, it's better!" is not working, any suggestions from the
group?? 

-Original Message-
From: Daniel Jaffa [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 9:10 AM
To: Struts Users Mailing List
Subject: Re: [OT] intermittent build and deploy Struts application to
WLS pro blem


Dump WLS and go over to JBOSS in production.  We are currenly going to save
something like
500k  by not upgrading to wls 7.0 or wls 8.0 and go directly to Jboss in
production.

- Original Message -
From: "Piper, James D CECOM SEC EPS" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 11:51 AM
Subject: [OT] intermittent build and deploy Struts application to WLS pro
blem


> This is a bit OT (probably has nothing to do with struts), but the problem
> has gone from an irritation to annoying to really starting to tick me off.
I
> hope that since many of you are working with similar environments that you
> may be able to help me out here:
>
> Problem
> ---
> Intermittently when I deploy to WLS I will receive anywhere from 1 to
about
> 40 errors of the form: 'Public class blah blah blah must be defined in a
> file called blah blah blah' (I think these errors are thrown when the WLS
is
> attempting to recompile my EJB JAR within the server, not sure about that
> though).  The clinker is that if I change no source code, recompile and
> redeploy again, then occasionally I will not have the errors and
everything
> will run fine from there on in.
>
> There have been times where I have gone through the hair pulling process
of
> running my ant clean, ant build scripts, and attempting to deploy 10 times
> before all of the sudden Blamo, it works only to fail again the next
> time I need to recompile.
>
> Environment description
> ---
> 1. I edit source, compile and build WAR, EJB JAR, support class JAR, and
EAR
> on Windows 2K using ant.  I use the manifest.update feature to put class
> path info about classes used in both EJBs and Servlets into the EAR file.
> 2. ANT_HOME = \apache-ant-1.5.3Beta1 (also tried 1.5.2  and 1.5.1)
> 3. JAVA_HOME = \j2sdk_forte\jdk1.4.0 (also tried 1.3.1)
> 4. Attempting to deploy EAR to BEA Web Logic Server 6.1 sp4 (also tried
sp2)
> running on a Sun server using WLS browser based admin tool.
> 5. The application uses Struts, log4j, rowtag among other things.
>
> Some Observations
> -
> 1. The size of my EAR file changes each time I run my ant build script.
> Looking inside the EAR I see that the compressed sizes of my WAR and EJB
> JAR, and support class JAR files change each time the EAR build is run
> (while the sizes of the original WAR and JARs remain the same - and the
> original and compressed sizes of all my 3rd party JARs also remain the
> same).
>
> 2. Also I notice that when the size of the EAR gets smaller then the app
is
> more likely to deploy ok.
>
> 3. If I attempt to redeploy the same EAR file over and over then I will
get
> the same number of errors each time.  If I recompile and deploy I will get
a
> different number of errors (or none).  If I have an EAR file that works
then
> I can redeploy that EAR file over and over and never get an error.
>
> 4. Have never seen the error when I deploy to JBOSS on my local Win 2K
> machine.
>
> Some Things I've tried
> --
> 1. change time out settings on http within WLS
> 2. deleting the old .ear file from WLS before redeploy
> 3. deleting the .wlnotdelete file from WLS before deploy
> 4. restarting the wls
> 5. undeploying, refreshing wls view, compiling, redeploying all in
different
> orders
> 6. holding my breath and crossing my fingers
> 7. not watching the deployment dos screen
> 8. watching the deployment dos screen
> 9. manually ftping the file to wls
> 10. wls running in debug mode
> 11. wls running in production mode
> 12. wls update from 6.1 to 6.1.4 something
> 13. removing all dos crlf from java and jsp in ant
> 14. touching all java and jsp files in ant
> 15. browsing ear and jar files for clues
> 16. asking wls admin for help
> 17. tracking size of ear files
> 18. noticing that ear file size changes even when no source has changed
> 19. suspecting something screwey with build process
> 20. stop wls during build
> 21. starting wls duing build
> 22. changed structure of EAR file
> 23. removed common classes from WAR and JAR and put in EAR with Manifest
> 24. put shared classes in a common JAR
> 25. updated from ant version 5.0 to 5.2
>
> I've been living with this for months now, but my patience with it is
> wearing out the closer I get to the due date.
>
> Any help very much appreciated.
>
> - Jim Piper
>
>
>
>
>
>
> -
> To unsubscribe, e-mail

RE: html:link and array

2003-04-04 Thread Miriam Aguirre

 are you trying to create html links for all items in foos ? if so, you'll
need
  tags surrounding your html:link tags.
 And i think you mean name="foos" property="params.2"

-Original Message-
From: Brian Buckley [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 9:55 AM
To: Struts Users
Subject: html:link and array


Hello,

I've have an array of Foo (Foo[]) in requestScope under the name "foos".
Foo has a getParams() method that returns a Map.

The following is not working.

...

What is the correct syntax to use a specific array element in a html:link ?

Brian




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

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



RE: java.lang.IllegalStateException: Cannot forward after response has been committed

2003-03-27 Thread Miriam Aguirre

 make sure you are not writing anything to the response stream before you
forward.. 

-Original Message-
From: Becky Norum [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 27, 2003 4:48 PM
To: [EMAIL PROTECTED]
Subject: java.lang.IllegalStateException: Cannot forward after response
has been committed



Does anyone know what the following exception means?

javax.servlet.jsp.JspException: java.lang.IllegalStateException: Cannot
forward after response has been committed

It seemed to be related to something in this area of code:

// ModuleConfig config = (ModuleConfig)
pageContext.getRequest()
// .getAttribute(org.apache.struts.Globals.MODULE_KEY);
//  try {
//  pageContext.forward(config.getPrefix() + page);
//  } catch (Exception e) {
//  

Thanks!

Becky


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

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



RE: ConcurrentModificationException in logoff

2003-03-27 Thread Miriam Aguirre
use iterator.remove() instead

-Original Message-
From: awc [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 27, 2003 3:15 PM
To: Struts Users Mailing List
Subject: ConcurrentModificationException in logoff


Hi All,

In log off action, I have code like this...

 Enumeration enum = session.getAttributeNames();
 while(enum.hasMoreElements())
 {
  String att = (String)enum.nextElement();
 session.removeAttribute( att );
   }
 session.invalidate();
 return (mapping.findForward(Constants.ROOT));

I guess I am taking off something struts need too. I get exception like
this...

java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:762)
at java.util.HashMap$KeyIterator.next(HashMap.java:798)
at
org.apache.catalina.util.Enumerator.nextElement(Enumerator.java:166)
at ca.awcl.struts.user.LogoffAction.execute(Unknown Source)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:480)

at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)

.

If  I comment out

Enumeration enum = session.getAttributeNames();
 while(enum.hasMoreElements())
 {
  String att = (String)enum.nextElement();
 session.removeAttribute( att );
   }

I do not get the Exception

any ideas... Or how do I log off tomcat-apache cleanly..

or is it good idea to just invalidate the session when you log off??

Thanks

.anil

This is on struts-1.1b3 with tomcat 4.1.18 with sun java-1.4.1_01_b01 on
Redhat Linux 7.3.





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

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



RE: struts 1.1 with Iplanet App server 6.0 SP4

2003-03-27 Thread Miriam Aguirre


 were you able to fix it  ? anyone get the new struts running on a newer
version of iplanet ?

-Original Message-
From: Pingili, Madhupal [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 27, 2003 12:35 PM
To: 'Struts Users Mailing List'
Subject: RE: struts 1.1 with Iplanet App server 6.0 SP4


I got those same errors while I tried to run struts-validator example
application came with
struts 1.1 RC1 in Tomcat 3.2.4 container.

> -Original Message-
> From: Miriam Aguirre [SMTP:[EMAIL PROTECTED]
> Sent: Thursday, March 27, 2003 3:28 PM
> To:   '[EMAIL PROTECTED]'
> Subject:  struts 1.1 with Iplanet App server 6.0 SP4
> 
> 
> 
>  Has anyone gotten this to work ? I keep getting the following stack trace
> when deploying the struts-example or struts-upload web applications using
> iplanet's deployment tool.
> 
>  of course, iplanet is working fine with struts 1.0.2.
> 
>  Any ideas ?
> 
> 
>  [ERROR] MessageResourcesFactory - -MessageResourcesFactory.createFactory
>  truts.util.PropertyMessageResourcesFactory>java.lang.ClassNotFoundExceptio
> n:
> org.apache.struts.util.PropertyMessageResou
> rcesFactory
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:191)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:298)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:285)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
> at
> org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:182
> )
> at
> org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResour
> ce
> sFactory.java:192)
> at
> org.apache.struts.util.MessageResources.getMessageResources(MessageResourc
> es
> .java:576)
> at
> org.apache.struts.util.RequestUtils.(RequestUtils.java:138)
> at
> org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResour
> ce
> sFactory.java:192)
> at
> org.apache.struts.util.MessageResources.getMessageResources(MessageResourc
> es
> .java:576)
> at
> org.apache.struts.action.ActionServlet.initInternal(ActionServlet.java:127
> 6)
> at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:459)
> at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> at
> com.netscape.server.servlet.servletrunner.ServletRepository.loadServlet(Un
> kn
> own Source)
> at
> com.netscape.server.servlet.servletrunner.ServletRepository.createInstance
> (U
> nknown Source)
> at
> com.netscape.server.servlet.servletrunner.ServletRunner.createServletInfo(
> Un
> known Source)
> at
> com.netscape.server.servlet.servletrunner.AppInfo.preLoadServlets(Unknown
> Source)
> at
> com.netscape.server.servlet.servletrunner.AppInfo.resetServlets(Unknown
> Source)
> at
> com.netscape.server.servlet.servletrunner.AppInfo.(Unknown
> Source)
> at
> com.netscape.server.servlet.servletrunner.ServletModule.getAppInfo(Unknown
> Source)
> at
> com.netscape.server.servlet.servletrunner.ServletModule.getPlatformServlet
> Co
> ntext(Unknown Source)
> at
> com.netscape.server.servlet.platformhttp.PlatformServletContext.getContext
> (U
> nknown Source)
> at
> com.netscape.server.servlet.servletrunner.WelcomeListServlet.doJSPInclude(
> Un
> known Source)
> at
> com.netscape.server.servlet.servletrunner.WelcomeListServlet.streamFileToC
> li
> ent(Unknown Source)
> at
> com.netscape.server.servlet.servletrunner.WelcomeListServlet.service(Unkno
> wn
> Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> at
> com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
> Source)
> at
> com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
> Source)
> at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
> at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
> at com.kivasoft.thread.ThreadBasic.run(Native Method)
> at java.lang.Thread.run(Thread.java:479)
> 
> [ERROR] MessageResourcesFactory - -MessageResourcesFactory.createFactory
> java.lan
> g.ExceptionInInitializerError: java.lang.NullPointerException
> at
> org.apache.struts.util.MessageResources.getMessageResources(MessageResourc
> es
> .java:577)
> at
> org.apache.struts.util.RequestUtils.(RequestUtils.java:138)
> at
> org.a

RE: how to invoke the action servlet?

2003-03-27 Thread Miriam Aguirre
why don;t you make your welcome-file the default action ? ginsu.do or
whatever it is you are trying to invoke...

-Original Message-
From: Dan Tarkenton [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 27, 2003 12:32 PM
To: [EMAIL PROTECTED]
Subject: how to invoke the action servlet?



I have been referencing the book Struts in Action by Ted Husted as well as
the struts site. I cannot figure out what to point my browser to in order to
invoke struts. I have zero JSPs in my struts application -- I have no need
for them because I am utilizing Model X where I have one XSLT servlet that
represents my entire view layer. I thought I could just point my browser to
http://localhost:8080/ginsu (ginsu being the name of my web app). I realize
I have no index.html or index.jsp, but I'm just trying to go directly to the
action servlet from the browser. 

Is this not possible in struts? 


Here is my struts-config file: 


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

 
 

 

 
 
 
 
 
 

 
 
 
 

 
 
 
 
 
 
 
 
 




And here is my web.xml file: 


 

http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> 

 
 
 
action 
org.apache.struts.action.ActionServlet 
 
config 
/WEB-INF/struts-config.xml 
 
 
debug 
2 
 
 
detail 
2 
 
2 
 
 
 
XSLServlet 
ginsu.XSLServlet 
 
 

 
 
XSLServlet 
/XSLServlet 
 

 
 
action 
*.do 
 



 
 
index.jsp 
 


 
 
/tags/struts-bean 
/WEB-INF/struts-bean.tld 
 

 
/tags/struts-html 
/WEB-INF/struts-html.tld 
 

 
/tags/struts-logic 
/WEB-INF/struts-logic.tld 
 

 
/tags/struts-nested 
/WEB-INF/struts-nested.tld 
 

 
/tags/struts-tiles 
/WEB-INF/struts-logic.tld 
 

 
 


I noticed that there is an element: 


 
index.jsp 
 


Is this an absolutely necessary element in the web.xml file? I figure the
index.jsp would just contain a redirect to the action servlet. 


Any help is appreciated. Thanks!



-
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!

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



struts 1.1 with Iplanet App server 6.0 SP4

2003-03-27 Thread Miriam Aguirre


 Has anyone gotten this to work ? I keep getting the following stack trace
when deploying the struts-example or struts-upload web applications using
iplanet's deployment tool.

 of course, iplanet is working fine with struts 1.0.2.

 Any ideas ?


 [ERROR] MessageResourcesFactory - -MessageResourcesFactory.createFactory
java.lang.ClassNotFoundException:
org.apache.struts.util.PropertyMessageResou
rcesFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:191)
at java.lang.ClassLoader.loadClass(ClassLoader.java:298)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:285)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:182)
at
org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResource
sFactory.java:192)
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:576)
at
org.apache.struts.util.RequestUtils.(RequestUtils.java:138)
at
org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResource
sFactory.java:192)
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:576)
at
org.apache.struts.action.ActionServlet.initInternal(ActionServlet.java:1276)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:459)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
com.netscape.server.servlet.servletrunner.ServletRepository.loadServlet(Unkn
own Source)
at
com.netscape.server.servlet.servletrunner.ServletRepository.createInstance(U
nknown Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.createServletInfo(Un
known Source)
at
com.netscape.server.servlet.servletrunner.AppInfo.preLoadServlets(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.AppInfo.resetServlets(Unknown
Source)
at com.netscape.server.servlet.servletrunner.AppInfo.(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletModule.getAppInfo(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletModule.getPlatformServletCo
ntext(Unknown Source)
at
com.netscape.server.servlet.platformhttp.PlatformServletContext.getContext(U
nknown Source)
at
com.netscape.server.servlet.servletrunner.WelcomeListServlet.doJSPInclude(Un
known Source)
at
com.netscape.server.servlet.servletrunner.WelcomeListServlet.streamFileToCli
ent(Unknown Source)
at
com.netscape.server.servlet.servletrunner.WelcomeListServlet.service(Unknown
Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)

[ERROR] MessageResourcesFactory - -MessageResourcesFactory.createFactory
java.lan
g.ExceptionInInitializerError: java.lang.NullPointerException
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:577)
at
org.apache.struts.util.RequestUtils.(RequestUtils.java:138)
at
org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResource
sFactory.java:192)
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:576)
at
org.apache.struts.action.ActionServlet.initInternal(ActionServlet.java:1276)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:459)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
com.netscape.server.servlet.servletrunner.ServletRepository.loadServlet(Unkn
own Source)
at
com.netscape.server.servlet.servletrunner.ServletRepository.createInstance(U
nknown Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.createServletInfo(Un
known Source)
at
com.netscape.server.servlet.servletrunner.AppInfo.preLoadServlets(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.AppInfo.resetServlets(Unknown
Source)
at com.netscape.server.servlet.servletrunner.AppInfo.(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletModule.getAppInfo(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletModule.getPlatformServletCo
ntext(Unknown Source)
at
com.netscape.server.servlet.platformhttp.PlatformServletContext.getContext(U
nknown Source)
at
com.netscape.server.servlet.servletrunner.WelcomeLi

last item in iterate loop

2003-02-17 Thread Miriam Aguirre


 Hi hi,

 Quick question, (I hope this is easy), is there any way to easily find
out if the current item in a  loop is the last item ?

 -Miriam


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




RE: How do I pass value

2002-07-16 Thread Miriam Aguirre


 I'm sure there's many ways to do it, my (lazy) way of doing is to simply
append the parameter to forward name, such as:

 return new ActionForward(actionMapping.findForward(Success).getPath()
+"?parameterName="+ someName;

-Original Message-
From: Radhakrishnan R [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 9:01 PM
To: [EMAIL PROTECTED]
Subject: How do I pass value


I am new to struts and currently trying to test the following scenario.

After submitting a form, a image has to be displayed to the user. The image
is dynamically generated.The image file name is generated by the business
tier.As a part of the submission process, I have an action bean , action and
business logic class. I also have a forward for success.

  

  





In other words after the image.jsp is processed, I want to invoke the
showimage.jsp. This jsp file displays the image using .

The problem I have is how do I pass the filename generated by the
business(model) tier
to showimage.jsp.

Any help will be appreciated.

Thanks in advance


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: BeanUtils.populate exception

2002-07-16 Thread Miriam Aguirre


 unfortunately, that's the only exception in the log :
 i;m going to try to change all the field/method names to all capitals.. not
sure
 if that will help, but i guess it can't hurt to try.
 
 -Miriam

[15/Jul/2002 17:04:47:1] error: Exception: SERVLET-execution_failed: Error
in executing servlet action: javax.servlet.ServletException:
BeanUtils.populate 
Exception Stack Trace: 
javax.servlet.ServletException: BeanUtils.populate  at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:774) at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
61) at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:772) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source) at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)   at
com.kivasoft.thread.ThreadBasic.run(Native Method)  at
java.lang.Thread.run(Thread.java:479) 

-Original Message-
From: Tomas Viberg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 16, 2002 12:26 AM
To: Struts Users Mailing List
Subject: Re: BeanUtils.populate exception


Do you know what the root exception is? It's usually included in the stack
trace of the servlet exception (called nested exception or something like
that). I think that would give a hint at what's really wrong.

/ Tomas


- Original Message -
From: "Miriam Aguirre" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, July 16, 2002 1:36 AM
Subject: RE: BeanUtils.populate exception


>
>
>  ok.. since i haven't gotten anywhere in the past 3 hours, i'll repost
> this..
>  (i even looked through the source code, RequestUtils.java:774 is a throw
> exception,
>  ha ha).
>
>  anyway, to further clarify my exasperation i have the following in a jsp:
>
>   property="trng"/>  
>TRNG
> property="mb30"/>  
>MB30
>
>
>  which is rendered as follows :
>
>   value="true">  
> size="2">TRNG
> value="true">  
> size="2">MB30
>
>
>  and in the form bean i have :
>
>   public boolean getTrng() {
> if(getRecord() != null) {
> if(getRecord().getMedsAccessInfo().getTrng().intValue() ==
> Constants.TRUE)
> return true;
> }
> return false;
> }
>
> public boolean getMb30() {
> if(getRecord() != null) {
> if(getRecord().getMedsAccessInfo().getMb30().intValue() ==
> Constants.TRUE)
> return true;
> }
> return false;
> }
>
> public void setTrng(boolean _trng) {
> getRecord().getMedsAccessInfo().setTrng(new
> Integer(Constants.TRUE));
> }
>
> public void setMb30(boolean _mb30) {
> getRecord().getMedsAccessInfo().setMb30(new
> Integer(Constants.TRUE));
> }
>
>
>  when displaying the page with a record, all the getters work fine.
>  if trng is checked, and the form is submitted, it works.
>  if trng is checked, and any other box(es) is/are checked, and the form is
> submitted, it works.
>  if trng is unchecked, and the form is submitted, it does not work.
>
>  i'm not sure what the BeanUtils is complaining about.. i searched through
> the archives, and it looks like these bean util exceptions occur with
> indexed properties, but in my case, they're not indexed. does anyone see
the
> problem here?
>
>  thanks,
>  -Miriam
>
>
> -Original Message-
> From: Miriam Aguirre [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 15, 2002 1:19 PM
> To: '[EMAIL PROTECTED]'
> Subject: BeanUtils.populate exception
>
>
>
>
>  I'm having a weird problem with a form ---
>the form has some basic html:text, html:select and html:checkbox ,
>fields are available to the user depending on the level of access they
> have.
>the weird part happens with a  bunch of checkbox fields, for some
users,
> they all work great,
>for other users, if i unselect a specific box i get :
>
>  javax.servlet.ServletException: BeanUtils.populate
> at
> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:774)
> at
>
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
> 61)
> at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
> at

RE: BeanUtils.populate exception

2002-07-15 Thread Miriam Aguirre


 
 ok.. since i haven't gotten anywhere in the past 3 hours, i'll repost
this..
 (i even looked through the source code, RequestUtils.java:774 is a throw
exception,
 ha ha).

 anyway, to further clarify my exasperation i have the following in a jsp:

   
   TRNG
     
   MB30


 which is rendered as follows :

     
   TRNG
     
   MB30


 and in the form bean i have :
 
  public boolean getTrng() {
if(getRecord() != null) {
if(getRecord().getMedsAccessInfo().getTrng().intValue() ==
Constants.TRUE)
return true;
}
return false;
}

public boolean getMb30() {
if(getRecord() != null) {
if(getRecord().getMedsAccessInfo().getMb30().intValue() ==
Constants.TRUE)
return true;
}
return false;
}

public void setTrng(boolean _trng) {
getRecord().getMedsAccessInfo().setTrng(new
Integer(Constants.TRUE));
}

public void setMb30(boolean _mb30) {
getRecord().getMedsAccessInfo().setMb30(new
Integer(Constants.TRUE));
}


 when displaying the page with a record, all the getters work fine.
 if trng is checked, and the form is submitted, it works.
 if trng is checked, and any other box(es) is/are checked, and the form is
submitted, it works.
 if trng is unchecked, and the form is submitted, it does not work.

 i'm not sure what the BeanUtils is complaining about.. i searched through
the archives, and it looks like these bean util exceptions occur with
indexed properties, but in my case, they're not indexed. does anyone see the
problem here?

 thanks,
 -Miriam


-Original Message-
From: Miriam Aguirre [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 1:19 PM
To: '[EMAIL PROTECTED]'
Subject: BeanUtils.populate exception




 I'm having a weird problem with a form ---
   the form has some basic html:text, html:select and html:checkbox ,
   fields are available to the user depending on the level of access they
have.
   the weird part happens with a  bunch of checkbox fields, for some users,
they all work great,
   for other users, if i unselect a specific box i get : 

 javax.servlet.ServletException: BeanUtils.populate
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:774)
at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
61)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)


 this is really bizzare, because if all the boxes are checked, it works
fine. so it isn't some Action form/ jsp field naming discrepancy...

 anyone have any ideas ? or seen anything like it?

 i'm using struts-1.0.2 with iplanet 6.0 sp 4 on both win2000 and solaris

 thanks.
 -Miriam


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

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




BeanUtils.populate exception

2002-07-15 Thread Miriam Aguirre



 I'm having a weird problem with a form ---
   the form has some basic html:text, html:select and html:checkbox ,
   fields are available to the user depending on the level of access they
have.
   the weird part happens with a  bunch of checkbox fields, for some users,
they all work great,
   for other users, if i unselect a specific box i get : 

 javax.servlet.ServletException: BeanUtils.populate
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:774)
at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
61)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)


 this is really bizzare, because if all the boxes are checked, it works
fine. so it isn't some Action form/ jsp field naming discrepancy...

 anyone have any ideas ? or seen anything like it?

 i'm using struts-1.0.2 with iplanet 6.0 sp 4 on both win2000 and solaris

 thanks.
 -Miriam


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




bean define problems

2002-03-14 Thread Miriam Aguirre



 Ok, after spending over a day on what seems to be a trivial task, I finally
have to ask!
 bean define is not "defining" variables in the page scope the way i thought
it should

 i have this in my jsp :

 

then somewhere further along :

 <%=fooBar.getColumnDisplayName(columnName)%>

 I get this error :
 [14/Mar/2002 11:27:24:5] error: Exception: SERVLET-compile_failed: Failed
in compiling template: /NASApp/webapp/reportTemplate.jsp, javac error:
c:\iplanet\ias6\ias\APPS\modules\webapp\WEB-INF\compiled_jsp\jsp\APPS\webapp
\reportTemplate.java:480: Undefined variable or class name: fooBar
  out.print(fooBar.getColumnDisplayName(columnName));

 
 ReportActionForm is the type of ActionForm i use for the jsp :



 
  


 
 I also tried adding 'toScope="page"' and that seems to make struts barf
[basically the java file is never completely generated from the jsp]:

2002-03-14 11:49:29 - ERROR-the file '\reportTemplate.jsp' generated the
following general exception: java.lang.NullPointerException
[14/Mar/2002 11:49:30:5] error: Exception: SERVLET-compile_failed: Failed in
compiling template: /NASApp/webapp/reportTemplate.jsp, javac error:
c:\iplanet\ias6\ias\APPS\modules\webapp\WEB-INF\compiled_jsp\jsp\APPS\webapp
\reportTemplate.java:270: Invalid expression statement.
org.apache.stru
  ^
c:\iplanet\ias6\ias\APPS\modules\webapp\WEB-INF\compiled_jsp\jsp\APPS\webapp
\reportTemplate.java:270: ';' expected.
org.apache.stru
   ^
c:\iplanet\ias6\ias\APPS\modules\webapp\WEB-INF\compiled_jsp\jsp\APPS\webapp
\reportTemplate.java:270: '}' expected.
org.apache.stru
   ^
3 errors


 by the way, i'm using iplanet & struts 1.0.2 . What the hell is my
problem??

 Thanks.
 -Miriam

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