FormatKey in html:text

2004-03-05 Thread Struts Framework


I need format a date with dd/MM/, in the text box.

How can I apply formatKey in a tag html:text ??

Thanks so 



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



Fwd: RE: FormatKey in html:text

2004-03-05 Thread Struts Framework

Sorry

It's a solution, but I need to use internationalization and I can't to fix dd/MM/.

I suggest to implement this functionality - formatKey - in the BaseHandlerTag class.

- Segue mensagem encaminhada -

De: Parthasarathy Kesavaraj [EMAIL PROTECTED]
Data: Fri, 5 Mar 2004 18:38:15 +0530 
Para: 'Struts Users Mailing List' [EMAIL PROTECTED]
Assunto: RE: FormatKey in html:text

U can give like this i think...
html:text property = ... format=dd/MM//

With Regards

Partha


-Original Message-
From: Struts Framework [mailto:[EMAIL PROTECTED]
Sent: Friday, March 05, 2004 6:12 PM
To: [EMAIL PROTECTED]
Subject: FormatKey in html:text




I need format a date with dd/MM/, in the text box.

How can I apply formatKey in a tag html:text ??

Thanks so 



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







U can give like this i think...
html:text property = ... format=dd/MM//

With Regards

Partha


-Original Message-
From: Struts Framework [mailto:[EMAIL PROTECTED]
Sent: Friday, March 05, 2004 6:12 PM
To: [EMAIL PROTECTED]
Subject: FormatKey in html:text




I need format a date with dd/MM/, in the text box.

How can I apply formatKey in a tag html:text ??

Thanks so 



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




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

RE: RE: FormatKey in html:text

2004-03-05 Thread Struts Framework

I have a form that extends ActionForm.

The form contain a attribute private Date startDate; that get value from database.

When the user is logged in the system, I set the session attribute with 
org.apache.struts.action.Action.LOCALE_KEY, based in the language selected for the 
user.

With bean:write, it's very well, so the Struts get the format date.


- Segue mensagem original! -

De: [EMAIL PROTECTED]
Data: Fri, 5 Mar 2004 20:35:44 +0530
Para: [EMAIL PROTECTED]
Assunto: RE: RE: FormatKey in html:text


Not clear as to how the date is being populated in the text box and what is the post 
processing action.The possible way of taking care of internationalization of the date 
format is to specify one in the validation.xml and then use the same to ensure that 
the date being entered by the user is of the correct format.

-Original Message-
From: Struts Framework [mailto:[EMAIL PROTECTED]
Sent: Friday, March 05, 2004 7:48 PM
To: [EMAIL PROTECTED]
Subject: Fwd: RE: FormatKey in html:text



Sorry

It's a solution, but I need to use internationalization and I can't to fix dd/MM/.

I suggest to implement this functionality - formatKey - in the BaseHandlerTag class.

- Segue mensagem encaminhada -

De: Parthasarathy Kesavaraj [EMAIL PROTECTED]
Data: Fri, 5 Mar 2004 18:38:15 +0530
Para: 'Struts Users Mailing List' [EMAIL PROTECTED]
Assunto: RE: FormatKey in html:text

U can give like this i think...
html:text property = ... format=dd/MM//

With Regards

Partha


-Original Message-
From: Struts Framework [mailto:[EMAIL PROTECTED]
Sent: Friday, March 05, 2004 6:12 PM
To: [EMAIL PROTECTED]
Subject: FormatKey in html:text




I need format a date with dd/MM/, in the text box.

How can I apply formatKey in a tag html:text ??

Thanks so



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







U can give like this i think...
html:text property = ... format=dd/MM//

With Regards

Partha


-Original Message-
From: Struts Framework [mailto:[EMAIL PROTECTED]
Sent: Friday, March 05, 2004 6:12 PM
To: [EMAIL PROTECTED]
Subject: FormatKey in html:text




I need format a date with dd/MM/, in the text box.

How can I apply formatKey in a tag html:text ??

Thanks so



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





Confidentiality Notice

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

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



html:text question

2004-02-20 Thread struts
Question,
how can i add the test value to the html:text like below

bean:define id=test name=testForm property=testers.testerName/  
html:text name=username value='bean:write name=test/'/

but this is not working, any idea ?
thks





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



html:javascript simple question

2004-02-19 Thread struts
Hi,
In my jsp's i do on the bottom of the jsp:

script
  today();
/script

In my head section i then define the method...

function today(){
  var today = new Date();
  var month = today.getMonth()+1;
  var year = today.getYear();
  var day = today.getDate();
  if(day10) day = 0 + day;
  if(month10) month= 0 + month ;
  if(year1000) year+=1900;
  var date=day + / + month + / + year;
  window.document.forms[0]'shipments.shipmentDate'].value=date;
}

This is working fine, but thaught might there be a better way doing this ? Using 
html:javascript ? 

Thanks !!



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



easy question... logic:iterate

2004-02-19 Thread struts
I have the following code:

logic:iterate id=users name=userInfo 
bean:write name=users property=userName/
/logic:iterate

How can i get the first record ?
Something like bean:define name=userInfo[0] property=userName/
but thats not working, any idea ?

Thanks !





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



html link tag

2004-02-18 Thread struts fox

I just did an example strust project in JBuilder, and it works.
I have a jsp with a form that issues an action that forwards to itself and it works.

Now I wanted to just do a html link to call the action from a new generic jsp page and 
it doesn't work.

html:link page=/do/myactionAdd An Employee/html:link

but it says error resource not available.  From what I read a form or link can call an 
action, and this action, called myaction, being a servlet should just be able to be 
called.
So what do I have wrong with my syntax?

 

Below is the struts config and the form that does work.

 action-mappings
action name=empForm path=/myaction scope=session 
type=strutstest1.Myaction
  forward name=forward path=/myjsp.jsp redirect=true /
/action
  /action-mappings

 

 Below is the form code that does work:

html:form action=/myaction.do method=POST
html:text property=name/
html:submit property=submit value=Submit/br
/html:form

 

 


-
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.

Re: Open Source UML Tool (Freeware) as an Eclipse Plugin.

2004-02-12 Thread Karma Struts
See Omondo Eclipse UML maybe
http://www.omondo.com/download/index.jsp
I've already downloaded it, but I haven't tried it yet



=
KARMA Project - Development Team

__
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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



Monolithic Struts application to modules cookbook ?

2004-02-12 Thread Karma Struts
Hi all,

We are currently trying to split an existing Struts
application into sub-modules, but it seems it is not
as easy as it is usually said in the short articles we
have found about it.

So, I'll try to explain a bit more where we are and
what we have done until now.

1. File structure
-

We have a classical Struts web-app directory
structure, with a sub-module as follows:

*.jsp
/WEB-INF - web.xml
 - struts-config.xml
 - tiles-definitions.xml
 - validator.xml
 /lib
 /classes/ourPackage - *.java
/scripts
/stylesheets
/templates
/testsubmodule
 *.jsp
 /WEB-INF - struts-config.xml
 /classes/ourPackage - *.java

2. Web.xml
--

In our web.xml file, we have added the following xml
for the new sub-module: 

init-param
   param-nameconfig/testsubmodule/param-name
  
param-value/testsubmodule/WEB-INF/struts-config.xml/param-value
/init-param

3. struts-config.xml


Then we have added the necessary ActionMapping entries
for this sub-module. These definitions are loaded and
the mapping is working fine. We only have
ActionMapping AND FormBeans really used by this
module.  Anyway, sometimes determining which FormBeans
from your root application is also used by your
sub-module is not easy.  Duplicating everything can
maybe be an easy solution.
As far as we have read and from our experience, it
seems that RequestProcessor, MessageResources and
PlugIns have to be duplicated from the root
struts-config.xml file.  Is this correct ? 
We have also created a SwitchAction and a global
forward:

forward name=gotoTestModule
path=/toTestModule.do?page=/bodyTest.jspamp;prefix=/testsubmodule
/

and

action path=/toTestModule
type=org.apache.struts.actions.SwitchAction/

As the path attribute is context-relative, there can
be a mapping in the root that has the same name as one
in the sub-module, i.e.
http://myserver/myapp/myaction.do is different from
http://myserver/myapp/testsubmodule/myaction.do
 
4. JSP and Tiles


Of course, accessing the stylesheets, scripts and
templates from the JSP files in the sub-modules must
be context (path) relative too. So one solution is to
use a relative path to the files, i.e.
./stylesheets/mycss.css for JSP in the root directory,
and ../stylesheets/mycss.css for JSP contained in the
testsubmodule directory.
Another solution can be to use a BASE tag in order
to set the base URI to the application URI. As we are
using tiles, this tag can be added in the main tile
file. But in this case, it is important to take care
about links used in the JSP.  But can it lead to
unexpected problems ?

5. Java
---

Access to Java objects doesn't seem to have problems
in the sub-module, wherever they are located (root or
sub-module), if the objects in the sub-module are well
compiled.

6. Problems
---

Seems that our main problems are due to incorrect
context. 
First of all, as we use tiles, and that the main tile
template is contained in the root, html:form and
calls to mapping.getName() inside the template JSP are
NOT in the sub-module context.  So the ActionMapping
defined in the sub-modules are not known.  Well, first
of all, we don't use the SwitchAction yet, but will it
solve our problem ? Also another solution may be to
duplicate the template tile in our sub-module, and use
it instead of the one in the root directory.  For the
moment, we have found in the mailing list archive what
I would call a temporary solution, using
org.apache.struts.util.RequestUtils.selectModule(testsubmodule,request,application)
before any form or call to the mapping Object.
Another problem is that we are using a tile with two
frames.  If the first one is an action from the root
directory, and the second frame is an application from
the sub-module, and that they are called from a JSP in
the sub-module, then we can use the SwitchAction to
call both parts.  But the problem is that the final
context will be the last one called, i.e. the one from
the second frame.  So if we do some action in the part
from the root directory, it doesn't work as it thinks
the context is now the one of the sub-module.
Well, in general, it seems not easy, and needs more
care, to be sure to be in the right context for any
action that can be made from one JSP, which can be a
headache if you are using multiple tile levels.  

So, if anyone can help us giving some good pieces of
advice regarding our current work, or to complete this
text, he/she is welcome.
If I've got new information, I'll add it to this
thread too.

Thanks a lot

Alexandre Dumortier
 

=
KARMA Project - Development Team

__
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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



action executed and input ignored (?)

2004-02-01 Thread struts
Hi!

action
path=/search
type=f4t.view.SearchAction
attribute=searchForm
scope=request
input=/search.jsp
name=searchForm
validate=false
forward name=failure path=/failure.jsp /
forward name=display path=/display.jsp /
exception type=java.lang.Exception path=/failure.jsp/
/action

This did work once. I did something trivial I don't remember and now 
visiting /search.do does immediately call SearchAction.execute() and does not 
load search.jsp.

I don't see the wood for the tree - can somebody help please?

Thanks in advance!
Timo


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



Re: AW: action executed and input ignored (?)

2004-02-01 Thread struts
Hi Oliver,

On Sunday 01 February 2004 14:37, Oliver Thiel wrote:
 If you want to load search.jsp just call it from another jsp with
[...]
 In your search.jsp you probably should have something like that:
 html:form action=search.do

Yes, I can directly link to search.jsp but it did previously work with 
search.do. And I have no idea what I did that it does not work no more...

Timo


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



Updated WebApp Tutorial

2004-02-01 Thread struts
Hi,

Some of you may know my site:

HOWTO: Installing Web Services with
  Linux / Tomcat / Apache / Struts / Postgresql / Openssl / JDBC

I've worked on it a lot and have added many features, including

-JDBC/JNDI configuration w/DBCP-commons Pool

-build scripts for everything
-all the configuration files
-Virtual Host configuration
-A Struts-based Database Test Web App

I am having to move the site, and am now hosting this site here:
http://www.linuxjava.net/howto/webapp/

I'm including my README file for people's perusal. Please visit the site
for more info.


README
--
These files can all be downloaded with the one link:
-webapp_files.tar

I recommend doing things in this order.

Install Java
-java_install.sh

Install Ant
-ant_install.sh

Install OpenSSL. It needs to be installed before Apache.
-openssl_install.sh

Install Apache. Pretty straight-forward. Builds a few modules, not all or
most, just fairly common ones. Add
 more modules if you want them built here.
-http_install.sh

Install Tomcat4
-tomcat_setup_user.sh
-tomcat4_install.sh

Install Mod_JK
-modjk_install.sh

Install Postgres
Read these install script. It needs to remove the bison RPM first, but it
is commented out, cause I don't wa
nt someone to do something to their system that they don't intend. Install
in the listed order.
-bison_install.sh
-postgres_setup_user.sh
-postgres_install.sh

Install PgAccess
-pgaccess_install.sh
-pgaccess #Put this in /usr/local/bin/ for easy access

Sample Database
#Import the testdb.psql into your Postgres DB. This is for the Test DB
Struts Web App.
-testdb.psql

Configuration Scripts:
Apache
-httpd.conf
-ssl.conf

Tomcat
-workers.properties
-server.xml

Daemon Scripts for Apache, Tomcat, and Postgres
-httpd
-tomcatd
-postgresqld

Struts Web App
#Extract and put in /usr/local/tomcat/webapps
-strutsdb_webapp.tar.bz2

Once everything is running, you should be able to test the webapp by going 
to:
http://www.myhost.mydomain/mydomain_public/

It will also be available here:
http://www.myhost.mydomain:8080/mydomain_public/

There is also a JSP file called showJNDI.jsp that will give you some
info about your setup. Delete that file for anything in production as it
will display your database configuration.
--

Please visit the site and any feedback is appreciated.

Regards,

Oscar Carrillo
http://www.linuxjava.net/



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



request scope vs. session scope

2004-01-28 Thread struts fox

  I have the following weird problem.

I start off with a web page, that has a hyperlink, not a submit button.
When the hyperlink is selected the page goes to Tomcat/Struts.
Two actions are executed and the page is forwarded to a jsp page and displayed.

  The second action executed, as stated above, sets a bean up in the session before it 
is forwarded.  The problem is in the jsp if I declare the bean via 'session' scope it 
sees the attribute and displays the value properly, but if I declare it as 'request' 
scope it doesn't and just prints null.  Request scope should work here but it doesn't. 

 

 


 


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!

Re: request scope vs. session scope

2004-01-28 Thread struts fox
 I never specified, but adding it doesn't effect anything.  Same results, it just 
doesn't like the request scope.  Other example code does work with request, just not 
the one I'm trying to do myself.
 
 
 
 
 


James Mitchell [EMAIL PROTECTED] wrote:Does your action-mapping use redirect=true?


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (cell)
AIM: jmitchtx
MSN: [EMAIL PROTECTED]



- Original Message -
From: struts fox 
To: Struts Users Mailing List 
Sent: Wednesday, January 28, 2004 2:38 PM
Subject: request scope vs. session scope



 I have the following weird problem.

 I start off with a web page, that has a hyperlink, not a submit button.
 When the hyperlink is selected the page goes to Tomcat/Struts.
 Two actions are executed and the page is forwarded to a jsp page and
displayed.

 The second action executed, as stated above, sets a bean up in the
session before it is forwarded. The problem is in the jsp if I declare the
bean via 'session' scope it sees the attribute and displays the value
properly, but if I declare it as 'request' scope it doesn't and just prints
null. Request scope should work here but it doesn't.









 -
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free web site building tool. Try it!


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



-
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!

Action mappings

2004-01-27 Thread struts fox
I t seems Struts lets you use action mappings that it figures out and forwards for 
you, but I have had no luck testing this.


action-mappings

action path=/setUpEmployeeForm
type=net.strutstest.SetUpEmployeeAction
name=employeeForm
scope=request
validate=false

forward name=continue path=/steve/
/action



action path=/steve
type=net.strutstest.SteveAction
name=employeeForm
scope=request
validate=false

forward
name=continue
path=/employeeForm.jsp/
/action


So basically SetUpEmployeeAction should be called when the user submits.  Then 
SetUpEmployeeAction forward to SteveAction and then that forwards to employeeForm.jsp. 
It errors out trying to load the resource SteveAction, but I see nothing else I need 
to declare in any properties file or resource file. Struts should be able to do this 
from what I've read.


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!

RE: Action mappings

2004-01-27 Thread struts fox
  That fixed it!!  Thanks.
I was getting the application resource not found, which now obviously makes sense.
Loving struts!
 
 
 
 
 


Gopalakrishnan, Jayesh [EMAIL PROTECTED] wrote:Do you have web.xml configured with 
/do URLS going to struts.

If so, your entry should be, Notice that the path is the complete path with
the prefix.

type=net.strutstest.SetUpEmployeeAction
name=employeeForm
scope=request
validate=false





Hope this helps

-jayash

-Original Message-
From: struts fox [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 27, 2004 11:45 AM
To: [EMAIL PROTECTED]
Subject: Action mappings


I t seems Struts lets you use action mappings that it figures out and
forwards for you, but I have had no luck testing this.




type=net.strutstest.SetUpEmployeeAction
name=employeeForm
scope=request
validate=false






type=net.strutstest.SteveAction
name=employeeForm
scope=request
validate=false

name=continue
path=/employeeForm.jsp/



So basically SetUpEmployeeAction should be called when the user submits.
Then SetUpEmployeeAction forward to SteveAction and then that forwards to
employeeForm.jsp. It errors out trying to load the resource SteveAction, but
I see nothing else I need to declare in any properties file or resource
file. Struts should be able to do this from what I've read.


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!

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



-
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!

URLClassLoader Issue for Hot Deploy of Classes

2003-12-23 Thread struts
I am trying to use a custom loader for a utility class for an Action 
class.  This is not working.  The utility tests fine off the net.  When I 
get it on the net and in Tomcat, it breaks.  The loader is for a hot 
deploy.  The following is the code.  Can anyone tell me why this 
breaks?  It returns a good Class object but when initializing a variable 
for Class with Tomcat and Struts, it throws a null pointer exception.  That 
is an odd thing, since nothing is null.  But, I suspect it must be because 
of some classloader conflict.  ANyone know?

The code for the classloading hot deploy factory is:

  public static synchronized ResourceRetriever 
createResourceRetriever(ResourceRetriever template) {
if(resourceClass == null) {
  reloadImpl();
}
ResourceRetriever newResourceRetriever = null;
try {
  newResourceRetriever = (ResourceRetriever)resourceClass.newInstance();
} catch (InstantiationException ie) {
  LogFactory.getLog(ResourceRetriever.class).error(ie.getMessage());
} catch (IllegalAccessException iae) {
  LogFactory.getLog(ResourceRetriever.class).error(iae.getMessage());
}
return newResourceRetriever;
  }

  public static synchronized void reloadImpl() {
URL [] serverURLs = null;
try {
  serverURLs = new URL[] { new URL(file:../hot_deploy/) };
} catch (java.net.MalformedURLException mue) {
  LogFactory.getLog(ResourceRetriever.class).error(mue.getMessage());
}
classLoader = new URLClassLoader(serverURLs);
try {
  resourceClass = 
classLoader.loadClass(com.michaelmcgrady.resource.ResourceRetrieverImpl);
} catch (ClassNotFoundException cnfe) {
  LogFactory.getLog(ResourceRetriever.class).error(cnfe.getMessage());
}

return;
  }
Thanks.

Michael McGrady 



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


logic:iterate question

2003-12-19 Thread struts
I have 
logic:iterate id=testers name=testerInfo

.

/logic:iterate

I only have one item in the testerInfo collection.

Why can't i do

bean:define id=testers name=testerInfo/

Or how can i put it to the first item?

Thanks !

Question dynamic value for a logic:iterate

2003-12-18 Thread struts
How can i have a dynamic value ?

eg:

logic:equal name=element property=weightType value= 

should be something like

logic:equal name=element property=weightType value=bean:write name=operator 
property=operatorWeightType/

but that is not working.

Any Idea ?

Thanks

Re: Question dynamic value for a logic:iterate

2003-12-18 Thread struts
Got the following error.

symbol  : method setValue (java.lang.Object)
location: class org.apache.struts.taglib.logic.EqualTag
  _jspx_th_logic_equal_1.setValue(foo);
^
1 error


Thx !


- Original Message - 
From: Nicolas De Loof [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 11:12 AM
Subject: Re: Question dynamic value for a logic:iterate


 use this :

 bean:define id=foo name=operator property=operatorWeightType/
 logic:equal name=element property=weightType value=%= foo %
 ...

 Nico


 - Original Message - 
 From: struts [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Thursday, December 18, 2003 11:09 AM
 Subject: Question dynamic value for a logic:iterate


 How can i have a dynamic value ?

 eg:

 logic:equal name=element property=weightType value= 

 should be something like

 logic:equal name=element property=weightType value=bean:write
name=operator property=operatorWeightType/

 but that is not working.

 Any Idea ?

 Thanks

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



validation

2003-12-17 Thread struts
can the validator plugin be used for the following.

I have a delete button which deletes a user. Prior to the delete i want to show a 
warning : 'are you sure you want to delete? '

I can do it whith a javascript but can it be done using the validator as well ?

Thanks !

object.name

2003-12-12 Thread struts
Question:

Is it possible to store nested data just as property names, instead of using 
object.name.

E.g.: Users are referred as users.username can we simply store username ?  

thx !


deployment environment

2003-12-10 Thread struts
Hi,
I have an intranet application created locally struts framework, tomcat/with a sybase 
database. I want to distribute to the intranet sites of other users. So basically I 
need to install tomcat, JDK, .war and the database engine. So my question... What is 
the best way to install this all at other places ? Install everything seperately ? Or 
using a Wise, or installshield program ?  And what if there is allready a JDK 
installed ? or somebody has another idea... ? 
Thanks


session taglib

2003-12-05 Thread struts
In the Jsp i have:

sess:attribute name=userName/

witch prints the username. Now i want something like:

%

String username= sess:attribute name=userName/;

%

but that doesn't work. How can i assign the session variable to the String username ?

Thanks !




Re: intRange Validation works but displays always null

2003-11-06 Thread struts
Untill now no solutions where found for this problem. Anybody has the
solution ?

thx.


Hello Martin,

   change
arg0 key=insertData.p_datum_t /
   to
arg0 key=errors.range /
***

MG Hello togehter,

MG i have a problem with range validation. I think it is a simple thing but
I
MG can't get it solved.
MG I already searched the archive but can't find a solution.
MG I defined a Form in validation.xml with a field like this:

MG field property=p_datum_t depends=integer,intRange
MG arg0 key=insertData.p_datum_t /
MG arg1 name=intRange key=${var:min} resource=false/ // Tried it
MG already with name=range
MG arg2 name=intRange key=${var:max} resource=false/
MG var
MG   var-namemin/var-name
MG   var-value1/var-value
MG /var
MG var
MG   var-namemax/var-name
MG   var-value31/var-value
MG /var
MG /field

MG in Application Resources the entry is:

MG errors.range=i{0}/i ist nicht im Bereich von {1} bis {2}.

MG Results in my jsp to message :
MG Datum ist nicht im Bereich von null bis null

MG Why does it not Display not Datum ist nicht im Bereich von 1 bis 31?

MG Thanks in advance,
MG Martin Grüneberg




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



Regards,
Dirk

+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-- to success! -+


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



nested iterate

2003-11-04 Thread struts
Hi all,

Question:
I've two collections in the session. A collection salesGroup and a collection 
salesPeople. salesGroup contains groupId and groupName. salesPeople contains 
salesUserName and salesGroupId (FK). How can i display all salesGroups and all 
salesUsers in it
Like
Salesgroup1
saleswoman1
salesmen2 
...
Salesgroup2
...

Thanks  !


Re: [OT]How can i reply to the thread ???

2003-10-31 Thread struts
Your email client should prompt or have an option to use Reply-To  
instead of From address.

If not, just before you send it substitute 
[EMAIL PROTECTED] for the To address.

Oscar

On Fri, 31 Oct 2003, Looser wrote:

 Hi,
 
 sorry by this OT post, but i need to know how to reply to another reply 
 in a thread. When i open an message, there´s  just one button 'reply via 
 email to xxx'. When i use this button, my answer is obviously send to 
 the author, but not to the mailing-list. How do i achieve this ???
 
 Thanx for your answer...
 
 
 -
 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]



html:text

2003-10-31 Thread struts
This is maybe a stupid question but how can i print the user.userName value on screen 
instead of in a text box ?

eg:

html:text property=users.userName size=10 maxlength=10/

i want to do something like : bean:write property=users.userName/ but this is not 
working.

Thanks

Re: html:text

2003-10-31 Thread struts
No go , error...

javac] location: class org.apache.jsp.userlevel.pickup_jsp
[javac]   out.print(users.userName );
[javac] ^
[javac] 1 error



- Original Message - 
From: Marc AMIR-TAHMASSEB [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 2:23 PM
Subject: Re: html:text


 %=users.userName %

 struts wrote:

 This is maybe a stupid question but how can i print the user.userName
value on screen instead of in a text box ?
 
 eg:
 
 html:text property=users.userName size=10 maxlength=10/
 
 i want to do something like : bean:write property=users.userName/ but
this is not working.
 
 Thanks
 
 


 -
 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: html:text i'm lost

2003-10-31 Thread struts
When i do something like you proposed
bean:write name=users property=userName/

 error: org.apache.jasper.JasperException: Cannot find bean
sessionScope.users in any scope

In the action i have:
usersForm.setUsers(usersValues);

//-- assign form object to the request object

setForm(mapping, userForm, request);

//-- populate the form object

populateForm(form, request);





- Original Message - 
From: Firat TIRYAKI [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 31, 2003 2:35 PM
Subject: Re: html:text


 you should use the name too
 name is the id you define in tags (logic:iterate maybe)
 bean:write name=users property=userName/

 and also

 c:out value=${users.userName} should work

 F.



 - Original Message - 
 From: struts [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Friday, October 31, 2003 3:18 PM
 Subject: html:text


 This is maybe a stupid question but how can i print the user.userName
value
 on screen instead of in a text box ?

 eg:

 html:text property=users.userName size=10 maxlength=10/

 i want to do something like : bean:write property=users.userName/ but
 this is not working.

 Thanks


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



html:select onchange

2003-10-29 Thread struts
Problem how can i pass the userId ? so that i can do a request.getParameter(userId)  
?

example:



html:select property=users.userAccount 
onchange=setAction('setUpUsersForm.do?action=retrieveuserId= 

html:options labelProperty=userName collection=userList property=userId /

/html:select 





Thanks !


html:hidden +session

2003-10-29 Thread struts
how can i print a session value in a hidden field.

This doesn't work...

html:hidden property=users.userAccount value=session:attribute 
name=userAccount//

any solutions ?

Thanks


Re: html:hidden +session

2003-10-29 Thread struts
error: According to the TLD attribute name is mandatory for tag write

thx

- Original Message - 
From: EL AKARI Mehdi [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 3:11 PM
Subject: Re: html:hidden +session


 You can do it either like that :
 
 bean:define id=myValue 
 bean:write property=userAccount scope=session /
 /bean:define
 html:hidden property==users.userAccount value=%=myValue% /
 
 or like that (using JSTL) :
 
 c:set var=myValue 
 bean:write property=userAccount scope=session /
 /c:set
 html-el:hidden property==users.userAccount value=${myValue} /
 
 I hope that it will help
 Mehdi
 
 - Original Message - 
 From: struts [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2003 1:41 PM
 Subject: html:hidden +session
 
 
 how can i print a session value in a hidden field.
 
 This doesn't work...
 
 html:hidden property=users.userAccount value=session:attribute
 name=userAccount//
 
 any solutions ?
 
 Thanks
 
 -
 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: was Re: Struts and db access: OT: pgSQL

2003-10-29 Thread struts
If you are on Linux/Unix I really think Postgresql is the way to go. It's
easy to install and manage and supposedly will scale as well as just about
any db on the market. MySQL is a little easier to install in Windows,
cause w/Postgresql you'll need to install CygWin first.

Keep in mind that the default install for Postgresql using resources is
very, very conservative. So, you have to change a couple of values in the 
config file and that's it.

I like using PgAccess, when I want to view/edit the database with a GUI.

I have Postgres/PgAccess install instructions on my site:
http://daydream.stanford.edu/install_web_services.html

In my opinion, if you can afford Oracle and are a full-time Oracle admin,
or you have a full-time Oracle admin working for you, then you may want to
go with Oracle :)

If you're in a DIY (Do it Yourself) situation, then I highly recommend 
Postgresql.

Cheers,
Oscar

On Wed, 29 Oct 2003, David Friedman wrote:

 This article seems very old.  A significant portion
 of what they talk about was fixed in the Version 4.0
 of MySQL which has got to be at least 9 months old
 or so.
 
 Regards,
 David
 
 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] Behalf Of Vic Cekvenich
 Sent: Wednesday, October 29, 2003 12:17 PM
 To: [EMAIL PROTECTED]
 Subject: was Re: Struts and db access: OT: pgSQL
 
 
 oh and another link
 http://det-dbalice.if.pw.edu.pl/det-dbalice/ttraczyk/db_compare/db_compare.h
 tml
 
 Mark Lowe wrote:
 
  I didn't know the postgres was faster than oracle.. I agree that its the
  canine's genitalia .. But I still thought oracle was the daddy when it
  came to speed. Is that just read access or everything?
 
 
  On Wednesday, October 29, 2003, at 02:52 PM, Vic Cekvenich wrote:
 
  This might confuse you more than help... but it is meant to be helpful.
  Look at iBatis.com PetStore 3.
 
  I use a iBatis DB layer as DAO to pgSQL for a DAO layer.
 
  And NO Struts does not specify or endorse a certain way to access
  data. A formBean maps to a (JSP/HTML) form, and is data agnostic. This
  way people can chose.
 
  (pgSQL rocks!!! Free run time on windows and unix, stored procedure
  support, ANSI SQL, faster than Oracle/MS SQL)
 
  .V
 
  Steffen Gransow wrote:
 
  Hi,
  I am totally new to J2EE/EJB and Struts - so perhaps this is the wrong
  place to ask. In this case I would like to know where I should ask my
  question or what I should've read before again asking silly questions.
  :-)
  I have to use a Sun One Application Server and a PostGreSQL database for
  a project. And I am sure that I want to use Struts because of the whole
  MVC thing. I would like to know how I should access data in a
  appropriate way. I think I want to use CMP and I am wondering where or
  how I should address the database. Do I have to create a JDBC ressource
  on the Sun One Application Server or do I have to define a datasource
  using Struts DataSource manager?
  I thought of something like:
-- Controller  Actions
|(ActionServlet)  |
|  |  |
  Client   |  |
|  |  |
|  |  |
-- View (JSPs) - - - - - - Model (Beans) -- PostGreSQL
  DB
  And on the Model part of this simple ascii art I think it would be nice
  to have something like:
  Action ---
   |
   --- business logic bean ---
(use a facade?)  |
 --- data representaion (entity beans)
  Is this approach okay? Back to my question stated above: How do I get
  the entity  beans connected to the database? Is struts independent of
  this question? Should I try to do this by reading Sun's AppServer
  documentation? ;)
  Thanks in regards,
  Steffen Gransow
  
  newbie questioner
 
 
  --
  Victor Cekvenich,
  Struts Instructor
  (215) 321-9146
 
  Advanced Struts Training
  http://basebeans.com/do/cmsPg?content=TRAINING Server Side Java
  training with Rich UI, mentoring, designs, samples and project recovery
  in North East.
  Simple best practice basic Portal, a Struts CMS, Membership, Forums,
  Shopping and Credit processing, http://basicportal.com software, ready
  to develop/customize; requires a db to run.
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 --
 Victor Cekvenich,
 Struts Instructor
 (215) 321-9146
 
 Advanced Struts Training
 http://basebeans.com/do/cmsPg?content=TRAINING Server Side Java
 training with Rich UI, mentoring, designs, samples and project recovery
 in North East.
 Simple best practice basic Portal, a Struts CMS, Membership, Forums,
 Shopping and Credit processing, http://basicportal.com software, ready
 to develop/customize; requires a db to run

RE: Struts and Tomcat

2003-10-29 Thread struts
You must add the tld files too. Explanation on my site:
http://daydream.stanford.edu/tomcat/install_web_services.html#struts

Oscar

On Wed, 29 Oct 2003, Ramesh Bobba 
wrote:

 Hi,
 
 The struts.jar is in the WEB-INF/lib directory along with all the
 commons and the Jakarta-oro jars. I thought the jar files are picked up
 by tomcat at startup. Do you think I need to explicitly specify the
 paths?
 
 Thanks,
 
 Ramesh.
 
 -Original Message-
 From: Jeff Kyser [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, October 29, 2003 4:48 PM
 To: Struts Users Mailing List
 Subject: Re: Struts and Tomcat
 
 Looks like it can't find the following class - is your
 struts.jar deployed in the proper location?
 
   Caused by: java.lang.NoClassDefFoundError:
   org/apache/struts/action/ActionForm
 
 On Wednesday, October 29, 2003, at 06:39  PM, Ramesh Bobba wrote:
 
  Caused by: java.lang.NoClassDefFoundError:
  org/apache/struts/action/ActionForm
 
 
 -
 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]
 


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



Re: Cannot find message resources under key org.apache.struts.action. MESSAGE

2003-10-29 Thread struts
I don't have anything listed under struts-config.xml

The other thing I do differently is my ApplicationRescources.properties is 
in a directory under classes so that I reference it in web.xml as 

---
param-valuepackage.ApplicationResources/param-value
---

Good luck,
Oscar

On Wed, 29 Oct 2003, Prashanth Narayanan wrote:

 hi,
   i am getting the following message:
 org.apache.jasper.JasperException: Cannot find message resources under key
 org.apache.struts.action.MESSAGE 
 at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
 54) 
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) 
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) 
 ...
   i am running struts 1.1 on apache 4.1. and this is the most basic example:
 --
 my BookView.jsp
 --
 %@ page language=java %
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
 html:html locale=true
 head
 html:base/
 title
 bean:message key=index.title/
 /title
 /head
 body
 h2BookView/h2
 /body
 /html:html
 
 --
 from my web.xml:
 --
 web-app
 servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 init-param
 param-nameapplication/param-name
 param-valueApplicationResources/param-value
 /init-param
 init-param
 param-nameconfig/param-name
 param-value/WEB-INF/struts-config.xml/param-value
 /init-param
 init-param
 
 
 my struts-config.xml:
 
 ?xml version=1.0 encoding=ISO-8859-1 ?
 !DOCTYPE struts-config PUBLIC
 -//Apache Software Foundation//DTD Struts Configuration 1.0//EN
 http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;
 struts-config
   message-resources parameter=ApplicationResources.properties/
 /struts-config
 
 any help will be much appreciated,
 thanks,
 -prash.
 
 
 
 -
 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: Reset button not always working

2003-10-29 Thread struts
The reset should change all values on your jsp page to those matching the 
html page, which would be populated by your ActionForm.

In other words, if you haven't changed any of the values on your web page, 
then the reset would appear to do nothing. Is that the behavior you're 
expecting, or are you expecting it to do something else?

It basically just resolves to the following html in the simplest case:
---
input type=reset name=reset value=Reset
---

At least that's my understanding.

Regards,
Oscar


On Wed, 29 Oct 2003, ZYD wrote:

 Dear all,
 
 I have a Reset button on a Jsp page:
 
 html:reset
  bean:message key=button.reset/
 /html:reset
 
 It works at first load. But when I forward to this page from other
 pages, this Reset button does nothing, it does not reset anything.
 
 Does this problem sound familiar to you guys? 
 
 cheers
 
 bruce
 


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



Re: Tags creating Tags

2003-10-27 Thread struts
I was wondering the same thing.

Along with tags like logic:equal tags and using ApplicationResources for 
language specifics, it seems like it would work well.

Oscar

On Mon, 27 Oct 2003, Steve Apeero 
wrote:

 For what you want to do what is wrong with using a
 
 jsp:include page=common_tags.jsp flush=true /
 
 where common_tags.jsp contain all the tags and html you
 wanted to declare in a seperate tag.
 
 Stephan
 
 
 From: Lukas Bradley [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]
 Subject: Tags creating Tags
 Date: Sun, 26 Oct 2003 19:34:04 -0500
 
 Hi all,
 
 Maybe I'm just tired, but the answer to this is not to be found.  I could 
 me
 making this harder than it is, or something might be right in front of me,
 and I don't see it.
 
 What I want is a custom tag that creates other custom tags.  Here is a
 simple example:
 
 lukas:myTag lang=en /
 
 Should produce something like this:
 
 table
trtdEnglish/td/tr
trtdhtml:file property=formFile 
 styleClass=FormField//td/tr
 !-- Imagine a lot more custom tags here --
 /table
 
 Which should then evaluate to:
 
 table
trtdEnglish/td/tr
trtdinput type=file name=formFile value=
 class=FormField/td/tr
 !-- Imagine a lot more custom tags rendering here. --
 /table
 
 I've thought about trying to extend BodyTagSupport, return
 EVAL_BODY_BUFFERED in doStartTag(), modify the bodyContent in 
 doAfterBody(),
 then return EVAL_PAGE() in doEndTag().  However, BodyContent has a 
 protected
 constructor, and no way to set its content.
 
 I want to maintain the functionality gained from Struts-like custom tags,
 while extracting the creation of them in a super-duper momma tag.  Any 
 help?
 
 Lukas
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 _
 Cheer a special someone with a fun Halloween eCard from American Greetings! 
 Go to  http://www.msn.americangreetings.com/index_msn.pd?source=msne134
 
 
 -
 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: [Q] Free charting?

2003-10-27 Thread struts
Yes, and there are packages that let you use tags to incorporate 
jfreechart as well.

http://cewolf.sourceforge.net/

Haven't incorporated any of this functionality yet, but it does seem to 
get used quite a bit.

Oscar

On Mon, 27 Oct 2003, 
Nathan Maves wrote:

 JfreeChart
 
 On Oct 27, 2003, at 2:56 PM, Michael Korolyov wrote:
 
  Hello,
 
  Would anyone point me to a free chart lib? pls.
 
  tag support isn't must, but nice to have.
 
  thank you
 
  -
  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]
 


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



logic:equal

2003-10-23 Thread struts
Example:

logic:equal name=users property=userCreator 
value=%=session.getAttribute(userUserId)%

OK

/logic:equal

How can i do this a dynamic value ?

Thanks !! 


collection

2003-10-22 Thread struts
Hi,
I have a collection userInfo. how can i check if a collection item is true or false ?
Something like 
logic:equal name=userInfo value=editable 

there is a field editable wich is true or false in this collection...

any idea..
thx !

Re: validation

2003-10-17 Thread struts
duplication and rename it is not working because then I need to create
getter and setter methods. It should be a dummy field and the validator does
the work...
Idea ?

- Original Message - 
From: Adam Hardy [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 17, 2003 11:10 AM
Subject: Re: validation


 On 10/17/2003 10:12 AM [EMAIL PROTECTED] wrote:
  Question: Is there an easy way to create a dummy field for 'retype
pasword' ? And is it possible to validate this retype 'password field' with
the validator plugin ? If so how ?
  Thanks !

 Yes it's easy. Just duplicate the code for the password field, but
 rename it retypePassword.

 You can validate it using the 'twofields' validator, but that is not in
 the struts 1.1 release. Check the archives for links to pages with
 instructions for installing it, or check the validator nightly builds,
 it might be in there. (I'm not sure).

 Adam

 -- 
 struts 1.1 + tomcat 5.0.12 + java 1.4.2
 Linux 2.4.20 RH9


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



JSTL evaluate problems

2003-10-17 Thread struts
JSTL is not nesting appropriately.  Here is an example of what I am doing:

c:set var=person value=${requestScope.personForm}/
c:set var=nestedProp value=name.firstName/
c:out value=${person[nestedProp]}/

The error that I am getting is:
Unable to find a value for name.firstName in object of class
org.team.Person using operator [] (null)

If nestedProp was just firstName (and Person had a firstName property) then
this works just fine.  JSTL is not seeing the . and doing getName().getFirstName()

I have tried a number of combinations with [] and ' (escape) and \ and 
nothing works :(  Any help appreciated.


Carl 

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



Re: JSTL evaluate problems

2003-10-17 Thread struts
No.  The variable that is actually nestedProp is populated dynamically.  Most
of the time it is just a single property name, but from time to time, it needs
to be nested.

Carl

Quoting Kris Schneider [EMAIL PROTECTED]:

 Are you just trying to shorthand this:
 
 c:out value=${person.name.firstName}/
 
 In other words, person.getName().getFirstName().
 
 Quoting [EMAIL PROTECTED]:
 
  JSTL is not nesting appropriately.  Here is an example of what I am
 doing:
  
  c:set var=person value=${requestScope.personForm}/
  c:set var=nestedProp value=name.firstName/
  c:out value=${person[nestedProp]}/
  
  The error that I am getting is:
  Unable to find a value for name.firstName in object of class
  org.team.Person using operator [] (null)
  
  If nestedProp was just firstName (and Person had a firstName property)
 then
  this works just fine.  JSTL is not seeing the . and doing
  getName().getFirstName()
  
  I have tried a number of combinations with [] and ' (escape) and \ and
 
  nothing works :(  Any help appreciated.
  
  
  Carl
 
 -- 
 Kris Schneider mailto:[EMAIL PROTECTED]
 D.O.Tech   http://www.dotech.com/
 
 -
 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: JSTL evaluate problems

2003-10-17 Thread struts
It doesn't come in seperated.  It comes in name.firstName.

Quoting Ben Anderson [EMAIL PROTECTED]:

 this should work:
 
 c:set var=person value=${requestScope.personForm}/
 c:set var=_name value=name/
 c:set var=_firstName value=firstName/
 c:out value=${person[_name][_firstName]}/
 
 
 From: [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: JSTL evaluate problems
 Date: Fri, 17 Oct 2003 12:29:44 -0500
 
 No.  The variable that is actually nestedProp is populated dynamically. 
 
 Most
 of the time it is just a single property name, but from time to time, it
 
 needs
 to be nested.
 
 Carl
 
 Quoting Kris Schneider [EMAIL PROTECTED]:
 
   Are you just trying to shorthand this:
  
   c:out value=${person.name.firstName}/
  
   In other words, person.getName().getFirstName().
  
   Quoting [EMAIL PROTECTED]:
  
JSTL is not nesting appropriately.  Here is an example of what I am
   doing:
   
c:set var=person value=${requestScope.personForm}/
c:set var=nestedProp value=name.firstName/
c:out value=${person[nestedProp]}/
   
The error that I am getting is:
Unable to find a value for name.firstName in object of class
org.team.Person using operator [] (null)
   
If nestedProp was just firstName (and Person had a firstName
 property)
   then
this works just fine.  JSTL is not seeing the . and doing
getName().getFirstName()
   
I have tried a number of combinations with [] and ' (escape) and \
 and
   
nothing works :(  Any help appreciated.
   
   
Carl
  
   --
   Kris Schneider mailto:[EMAIL PROTECTED]
   D.O.Tech   http://www.dotech.com/
  
   -
   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]
 
 
 _
 Never get a busy signal because you are always connected  with high-speed
 
 Internet access. Click here to comparison-shop providers.  
 https://broadband.msn.com
 
 
 -
 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: JSTL evaluate problems

2003-10-17 Thread struts
Kris,

Thanks for your tip.  You lead me to the answer.  Here is what works:

c:set var=person value=${requestScope.personForm}/
c:set var=nestedProp value=name.firstName/
c:set var=val value=${nestedProp} property=${person} /

Now, we can all stand around and scratch our heads and say Duh! Why didn't I
think of that?  Setting the person as the property tells JSTL to use person
as a bean and allows it to do normal nested queries on nestedProp.  Oh man do
I feel like a dummy.

Carl

Quoting Kris Schneider [EMAIL PROTECTED]:

 Then I don't see how to make it work with JSTL. So, nestedProp is a
 scoped
 variable containing the nested property you want to access, right? Does
 this
 work for you:
 
 jsp:useBean id=nestedProp type=java.lang.String/
 bean:write name=personForm property=%= nestedProp %/
 
 Unfortunately, I don't think Struts-EL provides a version of bean:write
 or you
 could also try:
 
 bean-el:write name=personForm property=${nestedProp}/
 
 Quoting [EMAIL PROTECTED]:
 
  No.  The variable that is actually nestedProp is populated dynamically.
 
  Most
  of the time it is just a single property name, but from time to time,
 it
  needs
  to be nested.
  
  Carl
  
  Quoting Kris Schneider [EMAIL PROTECTED]:
  
   Are you just trying to shorthand this:
   
   c:out value=${person.name.firstName}/
   
   In other words, person.getName().getFirstName().
   
   Quoting [EMAIL PROTECTED]:
   
JSTL is not nesting appropriately.  Here is an example of what I am
   doing:

c:set var=person value=${requestScope.personForm}/
c:set var=nestedProp value=name.firstName/
c:out value=${person[nestedProp]}/

The error that I am getting is:
Unable to find a value for name.firstName in object of class
org.team.Person using operator [] (null)

If nestedProp was just firstName (and Person had a firstName
 property)
   then
this works just fine.  JSTL is not seeing the . and doing
getName().getFirstName()

I have tried a number of combinations with [] and ' (escape) and \
 and
   
nothing works :(  Any help appreciated.


Carl
   
   -- 
   Kris Schneider mailto:[EMAIL PROTECTED]
   D.O.Tech   http://www.dotech.com/
 
 -- 
 Kris Schneider mailto:[EMAIL PROTECTED]
 D.O.Tech   http://www.dotech.com/
 
 -
 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: JSTL evaluate problems

2003-10-17 Thread struts
Never mind... that didn't fix it either.  property is a property of target,
which is another object.

Carl

Quoting [EMAIL PROTECTED]:

 Kris,
 
 Thanks for your tip.  You lead me to the answer.  Here is what works:
 
 c:set var=person value=${requestScope.personForm}/
 c:set var=nestedProp value=name.firstName/
 c:set var=val value=${nestedProp} property=${person} /
 
 Now, we can all stand around and scratch our heads and say Duh! Why didn't
 I
 think of that?  Setting the person as the property tells JSTL to use
 person
 as a bean and allows it to do normal nested queries on nestedProp.  Oh man
 do
 I feel like a dummy.
 
 Carl
 
 Quoting Kris Schneider [EMAIL PROTECTED]:
 
  Then I don't see how to make it work with JSTL. So, nestedProp is a
  scoped
  variable containing the nested property you want to access, right? Does
  this
  work for you:
  
  jsp:useBean id=nestedProp type=java.lang.String/
  bean:write name=personForm property=%= nestedProp %/
  
  Unfortunately, I don't think Struts-EL provides a version of
 bean:write
  or you
  could also try:
  
  bean-el:write name=personForm property=${nestedProp}/
  
  Quoting [EMAIL PROTECTED]:
  
   No.  The variable that is actually nestedProp is populated
 dynamically.
  
   Most
   of the time it is just a single property name, but from time to time,
  it
   needs
   to be nested.
   
   Carl
   
   Quoting Kris Schneider [EMAIL PROTECTED]:
   
Are you just trying to shorthand this:

c:out value=${person.name.firstName}/

In other words, person.getName().getFirstName().

Quoting [EMAIL PROTECTED]:

 JSTL is not nesting appropriately.  Here is an example of what I
 am
doing:
 
 c:set var=person value=${requestScope.personForm}/
 c:set var=nestedProp value=name.firstName/
 c:out value=${person[nestedProp]}/
 
 The error that I am getting is:
 Unable to find a value for name.firstName in object of class
 org.team.Person using operator [] (null)
 
 If nestedProp was just firstName (and Person had a firstName
  property)
then
 this works just fine.  JSTL is not seeing the . and doing
 getName().getFirstName()
 
 I have tried a number of combinations with [] and ' (escape) and
 \
  and

 nothing works :(  Any help appreciated.
 
 
 Carl

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/
  
  -- 
  Kris Schneider mailto:[EMAIL PROTECTED]
  D.O.Tech   http://www.dotech.com/
  
  -
  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]
 
 




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



Re: JSTL evaluate problems

2003-10-17 Thread struts
Thank you Kris!  

Quoting Kris Schneider [EMAIL PROTECTED]:

 Here's a quick test page that emulates what it sounds like you want to do.
 The
 bean:write seems to work fine.
 
 %@ page contentType=text/plain %
 %@ taglib prefix=bean uri=http://jakarta.apache.org/struts/tags-bean;
 %
 %@ taglib prefix=curi=http://java.sun.com/jstl/core; %
 
 jsp:useBean id=person class=java.util.HashMap
 jsp:useBean id=name class=java.util.HashMap
 c:set target=${name} property=firstName value=Kris/
 c:set target=${name} property=lastName value=Schneider/
 /jsp:useBean
 c:set target=${person} property=name value=${name}/
 /jsp:useBean
 
 c:set var=nestedProp value=name.firstName/
 
 person:c:out value=${person}/
 person.name:   c:out value=${person.name}/
 person.name.firstName: c:out value=${person.name.firstName}/
 
 jsp:useBean id=nestedProp type=java.lang.String/
 bean:write: bean:write name=person property=%= nestedProp %/
 
 Quoting [EMAIL PROTECTED]:
 
  Never mind... that didn't fix it either.  property is a property of
 target,
  which is another object.
  
  Carl
  
  Quoting [EMAIL PROTECTED]:
  
   Kris,
   
   Thanks for your tip.  You lead me to the answer.  Here is what works:
   
   c:set var=person value=${requestScope.personForm}/
   c:set var=nestedProp value=name.firstName/
   c:set var=val value=${nestedProp} property=${person} /
   
   Now, we can all stand around and scratch our heads and say Duh! Why
  didn't
   I
   think of that?  Setting the person as the property tells JSTL to use
   person
   as a bean and allows it to do normal nested queries on nestedProp. 
 Oh
  man
   do
   I feel like a dummy.
   
   Carl
   
   Quoting Kris Schneider [EMAIL PROTECTED]:
   
Then I don't see how to make it work with JSTL. So, nestedProp is
 a
scoped
variable containing the nested property you want to access, right?
 Does
this
work for you:

jsp:useBean id=nestedProp type=java.lang.String/
bean:write name=personForm property=%= nestedProp %/

Unfortunately, I don't think Struts-EL provides a version of
   bean:write
or you
could also try:

bean-el:write name=personForm property=${nestedProp}/

Quoting [EMAIL PROTECTED]:

 No.  The variable that is actually nestedProp is populated
   dynamically.

 Most
 of the time it is just a single property name, but from time to
 time,
it
 needs
 to be nested.
 
 Carl
 
 Quoting Kris Schneider [EMAIL PROTECTED]:
 
  Are you just trying to shorthand this:
  
  c:out value=${person.name.firstName}/
  
  In other words, person.getName().getFirstName().
  
  Quoting [EMAIL PROTECTED]:
  
   JSTL is not nesting appropriately.  Here is an example of what
 I
   am
  doing:
   
   c:set var=person value=${requestScope.personForm}/
   c:set var=nestedProp value=name.firstName/
   c:out value=${person[nestedProp]}/
   
   The error that I am getting is:
   Unable to find a value for name.firstName in object of
 class
   org.team.Person using operator [] (null)
   
   If nestedProp was just firstName (and Person had a firstName
property)
  then
   this works just fine.  JSTL is not seeing the . and doing
   getName().getFirstName()
   
   I have tried a number of combinations with [] and ' (escape)
 and
   \
and
  
   nothing works :(  Any help appreciated.
   
   
   Carl
  
  -- 
  Kris Schneider mailto:[EMAIL PROTECTED]
  D.O.Tech   http://www.dotech.com/

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/
 
 -- 
 Kris Schneider mailto:[EMAIL PROTECTED]
 D.O.Tech   http://www.dotech.com/
 
 -
 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]



Cannot Find bean Error: html tag

2003-09-12 Thread Struts User
Hi There,

I am building the simple Logon application from the first few chapters
of 'Struts In Action' from Ted Husted. When I click on 'SignIn' link on
main welcome page (Welcome.do), I am getting the following message. I am
using html tag as Ted suggested html : link forward =logon/ I have
added an action mapping for /logon.do with type ForwardAction.. What
could possibly cause this problem?

Error:

javax.servlet.jsp.JspException: Cannot find bean
org.apache.struts.taglib.html.BEAN in any scope
 at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:714)
 at
org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:193)

 at org.apache.jsp.Logon$jsp._jspService(Logon$jsp.java:116)

Struts Config Elements
---Form Beans ---
/form-beans
form-bean
name=logonForm
type=app.view.LogonForm/
/form-beans

--- Global Forwards ---

global-forwards
forward
 name=logon
path=/Logon.do/

Action Mapping ---

action
 path=/Logon
 type=org.apache.struts.actions.ForwardAction
parameter=/pages/Logon.jsp/

thanks,
ritvik







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



RE: Validating uploaded file as an image only

2003-08-23 Thread struts
Hi-

Getting back to the Validating part of this question.  I've got some
REAL ugly code to take care of the problem.
Does anybody have any sample code that uses ValidatorForm so I could get
rid of this mess and put it in my
validation.xml


Cheers,

David Sperling



 public ActionErrors validate(ActionMapping mapping,
  HttpServletRequest request) {


ActionErrors errors = super.validate(mapping, request);

if (errors==null) errors = new ActionErrors();


String readFilePath =
this.getUploadedFile().getFileName().toLowerCase();
if(!readFilePath.equals() ) {
  if(!readFilePath.endsWith(jpg)  !readFilePath.endsWith(jpeg)

 //  !readFilePath.endsWith(gif)  
!readFilePath.endsWith(png) 
  ) {
ActionError error = new ActionError(error.fileMustBeAJPEG);
errors.add(fileNotImageError, error);
  }
}

if(this.getUploadedFile().getFileSize()  512000) {
  ActionError error = new ActionError(error.fileTooBig);
  errors.add(fileTooBig, error);
}


-Original Message-
From: Brian McSweeney [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 22, 2003 8:13 PM
To: 'Struts Users Mailing List'
Subject: Validating uploaded file as an image only


Hi everyone,
 
I've managed to get the struts file upload working successfully, 
using the struts FormFile class and the upload example.
 
Cool :-)
 
However, in my app, I only want images to be uploaded.
I'm going to store the images on disk and put the path of the 
image file into the database. So I need to validate that only images are
getting uploaded, not other file-types.
 
I know nothing really about how to do this. I could just check that 
string returned by:
 
FormFile.getContentType( ) 
 
is equal to image-gif, image-bnp, or image-jpeg. But is this enough?
 
 
Also, I have noticed that when I upload an image file and the little 
Browser window pops up, if I select a gif image, but the file type 
bar says All files then the file isn't recognized as an image. It's
recognized as an octet-stream. So does the browser window 
specify the file type to the browser?
 
Anyway,
 
Hope someone can give me some advice,
As always,
Thanks very much,
Brian



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



RE: How to set charset UTF-8

2003-08-21 Thread struts
Did you try % request.setCharacterEncoding(UTF-8); %  ?

-Original Message-
From: Billy Ng [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 21, 2003 4:14 PM
To: Struts Users Mailing List
Subject: How to set charset UTF-8


Hi folks,

I added the following to test what encoding my Struts app is using

%  
   response.setContentType(text/html; charset=UTF-8);
   System.out.println(response.getCharacterEncoding());
%

But it still print out the ISO-8859-1, why?  How can I set the
contentType to text/html; charset=UTF-8

Thanks!

Billy Ng


This mailbox protected from junk email by Matador
from MailFrontier, Inc. http://info.mailfrontier.com



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



ValidatorForm NoClassDefError every other Tomcat reload

2003-08-15 Thread struts
Hi-

After extending a form bean from an ActionForm class to a 
ValidatorForm Class I get a java.lang.NoClassDefFoundError on every other Tomcat 
Reload. 

On even reloads I get the NoClass error.  
On odd reloads everything works fine.


The error message points to this line in my addUserAction class.
   User user = new User();

User is the form bean that extends ValidatorForm.  When I switch back to extends 
ActionForm there are no problems.


I get the problem when working in NetBeans 3.5 with a 4.06 Internal Tomcat on WinXP.  


I don't have any problems when I run the same code from a Linux Tomcat 5 server.

I added my test code to the struts-blank war from the jakarta-struts-1.1-b3 distro



I'm new to Struts so my question is:
Is it my poor coding that is bringing about the bug?
Or is it a Struts doesn't work on Tomcat Version  problem. Or a possible NetBeans/ 
Struts bug.

I've listed my code and settings below.



Cheers,

David Sperling









/***   Error
root cause 

java.lang.NoClassDefFoundError: org.apache.struts.validator.ValidatorForm
at com.hakodatecgi.bbs.action.AddUserAction.execute(AddUserAction.java:37)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:465)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:505)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
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.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)



/*  validation.xml

form-validation
global
/global
formset
form name=inputUserForm
field
property=userName
depends=required
arg0 key=title resource=false/
 /field
 /form
/formset
/form-validation

/* struts-config

?xml version=1.0 encoding=ISO-8859-1 ?

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

struts-config
form-beans
form-bean
name=inputUserForm
type=com.hakodatecgi.bbs.om.User/
/form-beans
 
action-mappings
action
path=/AddUser
type=com.hakodatecgi.bbs.action.AddUserAction
name=inputUserForm
scope=session
validate=false
forward name=success path=/inputUserForm.jsp/
/action
action
path=/UserAUD
type=com.hakodatecgi.bbs.action.UserAUDAction
name=inputUserForm
input=/inputUserForm.jsp
scope=session
validate=true
parameter=action
forward name=added path=/index.jsp/
/action

  /action-mappings
   message-resources parameter=resources.application/

   
  plug-in className=org.apache.struts.validator.ValidatorPlugIn
set-property
property=pathnames
value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml/
  /plug-in

/struts-config

/** User.java


package com.hakodatecgi.bbs.om;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.validator.ValidatorForm;
/**
 */
public class User extends ValidatorForm {
private String userName;
  
public java.lang.String getUserName() {
  return userName;
}

public void setUserName(java.lang.String userName) {
  this.userName = userName;
}
   
}

/* AddUserAction


package com.hakodatecgi.bbs.action;

import com.hakodatecgi.bbs.om.User;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public class AddUserAction extends Action {

  public ActionForward execute(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response) {


request.getSession().setAttribute(mode, add);

// Create a new user for the form
User user = new User();
request.getSession(true

RE: ValidatorForm NoClassDefError every other Tomcat reload

2003-08-15 Thread struts
Hi-

I fixed the problem by changing:

User user = new User();   to 

User user = (User)form;



If anyone could tell me what whyUser user = new User(); doesn't work or is 
incorrect
and User user = (User)form; does work I'd greatly appreciate it.


BTW User user = new User();  worked fine when I tested it on Tomcat 5 Linux and 
Tomcat 4.1XP.


Cheers,

David Sperling



-Original Message-
From: struts [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 15, 2003 3:34 PM
To: [EMAIL PROTECTED]
Subject: ValidatorForm NoClassDefError every other Tomcat reload 


Hi-

After extending a form bean from an ActionForm class to a 
ValidatorForm Class I get a java.lang.NoClassDefFoundError on every other Tomcat 
Reload. 

On even reloads I get the NoClass error.  
On odd reloads everything works fine.


The error message points to this line in my addUserAction class.
   User user = new User();

User is the form bean that extends ValidatorForm.  When I switch back to extends 
ActionForm there are no problems.


I get the problem when working in NetBeans 3.5 with a 4.06 Internal Tomcat on WinXP.  


I don't have any problems when I run the same code from a Linux Tomcat 5 server.

I added my test code to the struts-blank war from the jakarta-struts-1.1-b3 distro



I'm new to Struts so my question is:
Is it my poor coding that is bringing about the bug?
Or is it a Struts doesn't work on Tomcat Version  problem. Or a possible NetBeans/ 
Struts bug.

I've listed my code and settings below.



Cheers,

David Sperling









/***   Error
root cause 

java.lang.NoClassDefFoundError: org.apache.struts.validator.ValidatorForm
at com.hakodatecgi.bbs.action.AddUserAction.execute(AddUserAction.java:37)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:465)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:505)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
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.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)



/*  validation.xml

form-validation
global
/global
formset
form name=inputUserForm
field
property=userName
depends=required
arg0 key=title resource=false/
 /field
 /form
/formset
/form-validation

/* struts-config

?xml version=1.0 encoding=ISO-8859-1 ?

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

struts-config
form-beans
form-bean
name=inputUserForm
type=com.hakodatecgi.bbs.om.User/
/form-beans
 
action-mappings
action
path=/AddUser
type=com.hakodatecgi.bbs.action.AddUserAction
name=inputUserForm
scope=session
validate=false
forward name=success path=/inputUserForm.jsp/
/action
action
path=/UserAUD
type=com.hakodatecgi.bbs.action.UserAUDAction
name=inputUserForm
input=/inputUserForm.jsp
scope=session
validate=true
parameter=action
forward name=added path=/index.jsp/
/action

  /action-mappings
   message-resources parameter=resources.application/

   
  plug-in className=org.apache.struts.validator.ValidatorPlugIn
set-property
property=pathnames
value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml/
  /plug-in

/struts-config

/** User.java


package com.hakodatecgi.bbs.om;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.validator.ValidatorForm;
/**
 */
public class User extends ValidatorForm {
private String userName;
  
public java.lang.String getUserName() {
  return userName;
}

public void setUserName(java.lang.String userName) {
  this.userName = userName;
}
   
}

/* AddUserAction


package com.hakodatecgi.bbs.action;

import com.hakodatecgi.bbs.om.User;

import

Populating an ArrayList in an ActionForm from with in a iterate tag

2003-08-15 Thread Meka Struts
Hi,

I am browsing an ArrayList from a view, it contains questions. The arraylist is called 
questionAL. Now i am iterating the questionAL using logic:iterate as below

html:form action=someAction.do
table width=500 border=0
logic:iterate id=xxBO name=QuestionArrayList
trtdbean:write name=xxBO property=question //td/tr
trtdhtml:text  property=answer //td/tr
/logic:iterate
trtdhtml:submit value=Next //tr/td
/table
/html:form

I am trying to take answers from the user using a text area that is right below every 
question. I want to read all the answers into an ArrayList present in the action form. 
How can i do this ?

What i tried to do in above code is 
* use a string called answer in the action form. In the setter of the answer call 
another setter method in the action form which sets values to the arraylist. But above 
code is obviously wrong as only one value will be set.

Any ideas



Regards,

Meka Toka

Iterating on ArrayList present in a View

2003-08-14 Thread Meka Struts
Hi,

* I have an ArrayList which contains objects of type Strings. 
* This ArrayList is being set in the view

Can somebody tell me how can i iterate the ArrayList present in the View?

*  I have implemented iterate tag on ArrayList containing some BussinessObjects 
(BO's), and the ArrayList was set into the session using 

session.setAttribute(ArrayList, alObj);

Regards,

MekaToka

Re: struts-el example app not working?

2003-07-31 Thread struts
Hi Steve,

Going from Full Integration to minimum works as you describe.  As I am
coming up to speed on the IDE what impact does changing the Integration have
on development.

Thanks,
Barry



- Original Message -
From: Steve Raeburn [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, July 30, 2003 10:09 PM
Subject: RE: struts-el example app not working?


 Well, I managed to get it running but I'm definitely not a convert to
 Netbeans :-(

   - In Netbeans, go to the Runtime tab and expand the Explorer view until
 you see the 'Internal Tomcat' server.
   - Right click on it and change the IDE Integration Mode from Full to
 Minimum.

 That seems to get it working. You could also look at the External Tomcat
 Server feature as an alternative. There's information in the application
 Help.

 I think this http://www.netbeans.org/issues/show_bug.cgi?id=32425 is the
 cause of the problem. In any case, this issue is with Netbeans integration
 of Tomcat and not with Struts.

 Related information:
 James Mitchell has written a guide to setting up a Struts project in
 Netbeans (version 3.4)
 http://jakarta.apache.org/struts/faqs/netbeans.html. He's using Ant to
 build and deploy the web application so that probably gets round the
 problems by avoiding the IDE's build/deploy features.

 If you have access to WebSphere Studio it is IMHO a *much* more pleasant
 experience than Netbeans and importing a WAR is straightforward. I haven't
 tried Eclipse (on which Websphere Studio is based) with the Sysdeo plugin
 for Tomcat, but that would be a cheaper (free!) option than WS Studio.

 Hope this works for you... now where's that uninstall option :-)

 Steve

  -Original Message-
  From: Steve Raeburn [mailto:[EMAIL PROTECTED]
  Sent: July 30, 2003 7:12 PM
  To: Struts Users Mailing List
  Subject: RE: struts-el example app not working?
 
 
  I'll try to take a look at Netbeans sometime, but it may not be for a
few
  days. If I have any success I'll post back to the list and copy
  you. If, in
  the meantime you find the problem, do post the result here.
 
  Steve
 
   -Original Message-
   From: struts [mailto:[EMAIL PROTECTED]
   Sent: July 30, 2003 5:51 PM
   To: Struts Users Mailing List; [EMAIL PROTECTED]
   Subject: Re: struts-el example app not working?
  
  
   Yep the stand alone (Tomcat 4.1) works fine.  Just install the
   struts-el-exercise-taglib.war through
   the tomcat manager and no problems.
   Barry
  
   - Original Message -
   From: Steve Raeburn [EMAIL PROTECTED]
   To: Struts Users Mailing List [EMAIL PROTECTED]
   Sent: Wednesday, July 30, 2003 4:27 PM
   Subject: RE: struts-el example app not working?
  
  
4.0.6 works for me. I don't remember the details, but I
  *think* Netbeans
   has
cropped up as a problem before.
If you can, try it with a standalone version of Tomcat and
   check the mail
archives for Netbeans issues.
   
Steve
   
   
 -Original Message-
 From: struts [mailto:[EMAIL PROTECTED]
 Sent: July 30, 2003 4:06 PM
 To: Struts Users Mailing List; [EMAIL PROTECTED]
 Subject: Re: struts-el example app not working?


 I am running Tomcat 4.0xx
 (using netbeans 3.5 with Tomcat bundle)

 Barry



 - Original Message -
 From: Steve Raeburn [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Wednesday, July 30, 2003 4:03 PM
 Subject: RE: struts-el example app not working?


  Works fine for me with the 1.1 release version on Tomcat 4.1.24.
 
  What container are you running on?
 
  Steve
 
   -Original Message-
   From: struts [mailto:[EMAIL PROTECTED]
   Sent: July 30, 2003 3:52 PM
   To: [EMAIL PROTECTED]
   Subject: struts-el example app not working?
  
  
   Hello,
  
   When testing the struts-el example I get the following error.
   The problem goes away
   if I remove:
  
   %@ taglib uri=/WEB-INF/struts-html-el.tld
  prefix=html-el %
  
   Of course this is useless because the html-el tags do not
   function.
  
   I have even tried incorporating the struts-html-el in my
   own app and
   included all jars from the struts 1.1 release, defined
   the el tld's
   in
 my
   web.xml and I get the same exact error.  Same partial
  solution if
   I remove the
  
   %@ taglib uri=/WEB-INF/struts-html-el.tld
  prefix=html-el %
  
   the error goes away and the jsp page is displayed and of
 course without
   the properly generated html.
  
   Appreciate any suggestions
  
   Barry
  
  
   I get the following error:
  
   index.jsp [-1:-1] java.lang.ExceptionInInitializerError
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:141

Re: struts-el example app not working?

2003-07-31 Thread struts
I guess I can answer my own question.  Full integraton compiles the JSP
(runs faster).  Minimum integration does not compile the JSP (runs slower).

Barry


- Original Message -
From: struts [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 11:32 AM
Subject: Re: struts-el example app not working?


 Hi Steve,

 Going from Full Integration to minimum works as you describe.  As I am
 coming up to speed on the IDE what impact does changing the Integration
have
 on development.

 Thanks,
 Barry



 - Original Message -
 From: Steve Raeburn [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Wednesday, July 30, 2003 10:09 PM
 Subject: RE: struts-el example app not working?


  Well, I managed to get it running but I'm definitely not a convert to
  Netbeans :-(
 
- In Netbeans, go to the Runtime tab and expand the Explorer view
until
  you see the 'Internal Tomcat' server.
- Right click on it and change the IDE Integration Mode from Full to
  Minimum.
 
  That seems to get it working. You could also look at the External Tomcat
  Server feature as an alternative. There's information in the application
  Help.
 
  I think this http://www.netbeans.org/issues/show_bug.cgi?id=32425 is
the
  cause of the problem. In any case, this issue is with Netbeans
integration
  of Tomcat and not with Struts.
 
  Related information:
  James Mitchell has written a guide to setting up a Struts project in
  Netbeans (version 3.4)
  http://jakarta.apache.org/struts/faqs/netbeans.html. He's using Ant to
  build and deploy the web application so that probably gets round the
  problems by avoiding the IDE's build/deploy features.
 
  If you have access to WebSphere Studio it is IMHO a *much* more pleasant
  experience than Netbeans and importing a WAR is straightforward. I
haven't
  tried Eclipse (on which Websphere Studio is based) with the Sysdeo
plugin
  for Tomcat, but that would be a cheaper (free!) option than WS Studio.
 
  Hope this works for you... now where's that uninstall option :-)
 
  Steve
 
   -Original Message-
   From: Steve Raeburn [mailto:[EMAIL PROTECTED]
   Sent: July 30, 2003 7:12 PM
   To: Struts Users Mailing List
   Subject: RE: struts-el example app not working?
  
  
   I'll try to take a look at Netbeans sometime, but it may not be for a
 few
   days. If I have any success I'll post back to the list and copy
   you. If, in
   the meantime you find the problem, do post the result here.
  
   Steve
  
-Original Message-
From: struts [mailto:[EMAIL PROTECTED]
Sent: July 30, 2003 5:51 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: struts-el example app not working?
   
   
Yep the stand alone (Tomcat 4.1) works fine.  Just install the
struts-el-exercise-taglib.war through
the tomcat manager and no problems.
Barry
   
- Original Message -
From: Steve Raeburn [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, July 30, 2003 4:27 PM
Subject: RE: struts-el example app not working?
   
   
 4.0.6 works for me. I don't remember the details, but I
   *think* Netbeans
has
 cropped up as a problem before.
 If you can, try it with a standalone version of Tomcat and
check the mail
 archives for Netbeans issues.

 Steve


  -Original Message-
  From: struts [mailto:[EMAIL PROTECTED]
  Sent: July 30, 2003 4:06 PM
  To: Struts Users Mailing List; [EMAIL PROTECTED]
  Subject: Re: struts-el example app not working?
 
 
  I am running Tomcat 4.0xx
  (using netbeans 3.5 with Tomcat bundle)
 
  Barry
 
 
 
  - Original Message -
  From: Steve Raeburn [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Wednesday, July 30, 2003 4:03 PM
  Subject: RE: struts-el example app not working?
 
 
   Works fine for me with the 1.1 release version on Tomcat
4.1.24.
  
   What container are you running on?
  
   Steve
  
-Original Message-
From: struts [mailto:[EMAIL PROTECTED]
Sent: July 30, 2003 3:52 PM
To: [EMAIL PROTECTED]
Subject: struts-el example app not working?
   
   
Hello,
   
When testing the struts-el example I get the following
error.
The problem goes away
if I remove:
   
%@ taglib uri=/WEB-INF/struts-html-el.tld
   prefix=html-el %
   
Of course this is useless because the html-el tags do not
function.
   
I have even tried incorporating the struts-html-el in my
own app and
included all jars from the struts 1.1 release, defined
the el tld's
in
  my
web.xml and I get the same exact error.  Same partial
   solution if
I remove

Re: struts-el example app not working?

2003-07-31 Thread struts
Hue,

I followed Brian's steps (repost of thread below).  It does work.  I can run
in full integration now.

Hi Brian,

Great stuff! Yes, it now works for me, too. I narrowed it down to the
following jars that need to be added to the netbeans/lib directory:

From Struts:
struts.jar
struts-el.jar
commons-logging.jar

From bundled TC installation:
servlet.jar

I'm not sure whether it only requires these jars because it is a simple test
project and more complex projects may require more jars but I'm impressed
that you've got it to work!

Are you going to raise this at netbeans as a bug report, as to be honest it
does look more and more as an issue with netbeans?

Hue.




- Original Message -
From: Hue Holleran [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 1:44 AM
Subject: RE: struts-el example app not working?


 Yep, I've been bitten by this one too. There are a few workarounds:

 1) Change the JSP compiler to not compile JSPs:
 http://marc.theaimsgroup.com/?l=struts-userm=105334711431267w=2

 2) Workaround by Brian Cross (at end of this thread) - this works well for
 us:
 http://marc.theaimsgroup.com/?l=struts-userm=105147011604944w=2

 Hope that helps.

 Hue.

  -Original Message-
  From: Steve Raeburn [mailto:[EMAIL PROTECTED]
  Sent: 31 July 2003 06:10
  To: Struts Users Mailing List
  Subject: RE: struts-el example app not working?
 
 
  Well, I managed to get it running but I'm definitely not a convert to
  Netbeans :-(
 
- In Netbeans, go to the Runtime tab and expand the Explorer view
until
  you see the 'Internal Tomcat' server.
- Right click on it and change the IDE Integration Mode from Full to
  Minimum.
 
  That seems to get it working. You could also look at the External Tomcat
  Server feature as an alternative. There's information in the application
  Help.
 
  I think this http://www.netbeans.org/issues/show_bug.cgi?id=32425 is
the
  cause of the problem. In any case, this issue is with Netbeans
integration
  of Tomcat and not with Struts.
 
  Related information:
  James Mitchell has written a guide to setting up a Struts project in
  Netbeans (version 3.4)
  http://jakarta.apache.org/struts/faqs/netbeans.html. He's using Ant to
  build and deploy the web application so that probably gets round the
  problems by avoiding the IDE's build/deploy features.
 
  If you have access to WebSphere Studio it is IMHO a *much* more pleasant
  experience than Netbeans and importing a WAR is straightforward. I
haven't
  tried Eclipse (on which Websphere Studio is based) with the Sysdeo
plugin
  for Tomcat, but that would be a cheaper (free!) option than WS Studio.
 
  Hope this works for you... now where's that uninstall option :-)
 
  Steve
 
   -Original Message-
   From: Steve Raeburn [mailto:[EMAIL PROTECTED]
   Sent: July 30, 2003 7:12 PM
   To: Struts Users Mailing List
   Subject: RE: struts-el example app not working?
  
  
   I'll try to take a look at Netbeans sometime, but it may not be
  for a few
   days. If I have any success I'll post back to the list and copy
   you. If, in
   the meantime you find the problem, do post the result here.
  
   Steve
  
-Original Message-
From: struts [mailto:[EMAIL PROTECTED]
Sent: July 30, 2003 5:51 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: struts-el example app not working?
   
   
Yep the stand alone (Tomcat 4.1) works fine.  Just install the
struts-el-exercise-taglib.war through
the tomcat manager and no problems.
Barry
   
- Original Message -
From: Steve Raeburn [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, July 30, 2003 4:27 PM
Subject: RE: struts-el example app not working?
   
   
 4.0.6 works for me. I don't remember the details, but I
   *think* Netbeans
has
 cropped up as a problem before.
 If you can, try it with a standalone version of Tomcat and
check the mail
 archives for Netbeans issues.

 Steve


  -Original Message-
  From: struts [mailto:[EMAIL PROTECTED]
  Sent: July 30, 2003 4:06 PM
  To: Struts Users Mailing List; [EMAIL PROTECTED]
  Subject: Re: struts-el example app not working?
 
 
  I am running Tomcat 4.0xx
  (using netbeans 3.5 with Tomcat bundle)
 
  Barry
 
 
 
  - Original Message -
  From: Steve Raeburn [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Wednesday, July 30, 2003 4:03 PM
  Subject: RE: struts-el example app not working?
 
 
   Works fine for me with the 1.1 release version on Tomcat
4.1.24.
  
   What container are you running on?
  
   Steve
  
-Original Message-
From: struts [mailto:[EMAIL PROTECTED]
Sent: July 30, 2003 3:52 PM
To: [EMAIL PROTECTED

JSTL in html-el:option

2003-07-31 Thread struts
The following yields Attribute ${i} has no value (first occurrence) error.

html-el:select property=yearsreferences 
 c:forEach var=i begin=1 end=10 
 html-el:option value=c:out value=${i}/c:out 
value=${i}//html-el:option 
 /c:forEach 
/html-el:select   

Any suggestions on alternative syntax?

Thanks,
Barry 



struts-el example app not working?

2003-07-30 Thread struts
Hello,

When testing the struts-el example I get the following error.   The problem goes away
if I remove:

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

Of course this is useless because the html-el tags do not function.

I have even tried incorporating the struts-html-el in my own app and
included all jars from the struts 1.1 release, defined the el tld's in my
web.xml and I get the same exact error.  Same partial solution if
I remove the 

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

the error goes away and the jsp page is displayed and of course without
the properly generated html.

Appreciate any suggestions

Barry


I get the following error:

index.jsp [-1:-1] java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at 
org.apache.strutsel.taglib.html.ELLinkTagBeanInfo.class$(ELLinkTagBeanInfo.java:88)
at 
org.apache.strutsel.taglib.html.ELLinkTagBeanInfo.getPropertyDescriptors(ELLinkTagBeanInfo.java:88)
at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:459)
at java.beans.Introspector.getBeanInfo(Introspector.java:372)
at java.beans.Introspector.getBeanInfo(Introspector.java:144)
at org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCache.java:116)
at 
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:146)
at 
org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.addGenerator(AnalyzerParseEventListener.java:154)
at 
org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.handleTagBegin(AnalyzerParseEventListener.java:962)
at 
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListener.java:221)
at 
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListener.java:216)
at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:878)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:214)
at 
org.netbeans.modules.web.jspparser.JspParserImpl.callTomcatParser(JspParserImpl.java:126)
at 
org.netbeans.modules.web.jspparser.JspParserImpl.analyzePage(JspParserImpl.java:93)
at 
org.netbeans.modules.web.core.jsploader.JspDataObject.createCompiler(JspDataObject.java:297)
at 
org.netbeans.modules.web.core.jsploader.JspCompilerSupport.addToJob(JspCompilerSupport.java:62)
at 
org.openide.actions.AbstractCompileAction.prepareJobFor(AbstractCompileAction.java:361)
at 
org.openide.actions.AbstractCompileAction.createJob(AbstractCompileAction.java:198)
at 
org.openide.actions.AbstractCompileAction.compile(AbstractCompileAction.java:209)
at 
org.netbeans.modules.tomcat.tomcat40.autocompile.CompileServlet.processRequest(CompileServlet.java:76)
at 
org.netbeans.modules.tomcat.tomcat40.autocompile.CompileServlet.doGet(CompileServlet.java:122)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.NullPointerException
at 
org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:577)
at 
org.apache.struts.taglib.html.BaseHandlerTag.clinit(BaseHandlerTag.java:108)
... 38 more
Errors compiling index.


Re: struts-el example app not working?

2003-07-30 Thread struts
I did include the struts-el.jar file.



- Original Message -
From: Canning, Chuck [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, July 30, 2003 3:58 PM
Subject: RE: struts-el example app not working?


 Hey Barry,

 Did you include the struts-el jars from the contrib directory or just the
 standard struts1.1 jars?

 Chuck

 -Original Message-
 From: struts [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 30, 2003 5:52 PM
 To: [EMAIL PROTECTED]
 Subject: struts-el example app not working?


 Hello,

 When testing the struts-el example I get the following error.   The
problem
 goes away
 if I remove:

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

 Of course this is useless because the html-el tags do not function.

 I have even tried incorporating the struts-html-el in my own app and
 included all jars from the struts 1.1 release, defined the el tld's in my
 web.xml and I get the same exact error.  Same partial solution if
 I remove the

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

 the error goes away and the jsp page is displayed and of course without
 the properly generated html.

 Appreciate any suggestions

 Barry


 I get the following error:

 index.jsp [-1:-1] java.lang.ExceptionInInitializerError
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:141)
 at

org.apache.strutsel.taglib.html.ELLinkTagBeanInfo.class$(ELLinkTagBeanInfo.j
 ava:88)
 at

org.apache.strutsel.taglib.html.ELLinkTagBeanInfo.getPropertyDescriptors(ELL
 inkTagBeanInfo.java:88)
 at
 java.beans.Introspector.getTargetPropertyInfo(Introspector.java:459)
 at java.beans.Introspector.getBeanInfo(Introspector.java:372)
 at java.beans.Introspector.getBeanInfo(Introspector.java:144)
 at
 org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCache.java:116)
 at

org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:146
 )
 at

org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.addGenerator(A
 nalyzerParseEventListener.java:154)
 at

org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.handleTagBegin
 (AnalyzerParseEventListener.java:962)
 at

org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe
 ner.java:221)
 at

org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe
 ner.java:216)
 at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:878)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
 at

org.apache.jasper.compiler.ParserController.parse(ParserController.java:214)
 at

org.netbeans.modules.web.jspparser.JspParserImpl.callTomcatParser(JspParserI
 mpl.java:126)
 at

org.netbeans.modules.web.jspparser.JspParserImpl.analyzePage(JspParserImpl.j
 ava:93)
 at

org.netbeans.modules.web.core.jsploader.JspDataObject.createCompiler(JspData
 Object.java:297)
 at

org.netbeans.modules.web.core.jsploader.JspCompilerSupport.addToJob(JspCompi
 lerSupport.java:62)
 at

org.openide.actions.AbstractCompileAction.prepareJobFor(AbstractCompileActio
 n.java:361)
 at

org.openide.actions.AbstractCompileAction.createJob(AbstractCompileAction.ja
 va:198)
 at

org.openide.actions.AbstractCompileAction.compile(AbstractCompileAction.java
 :209)
 at

org.netbeans.modules.tomcat.tomcat40.autocompile.CompileServlet.processReque
 st(CompileServlet.java:76)
 at

org.netbeans.modules.tomcat.tomcat40.autocompile.CompileServlet.doGet(Compil
 eServlet.java:122)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at
 org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at

org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
 7)
 at
 org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at

org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
 onnectionHandler.java:210)
 at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:534)
 Caused by: java.lang.NullPointerException
 at

org.apache.struts.util.MessageResources.getMessageResources(MessageResources
 .java:577)
 at

org.apache.struts.taglib.html.BaseHandlerTag.clinit(BaseHandlerTag.java:10
 8)
 ... 38 more
 Errors

Re: struts-el example app not working?

2003-07-30 Thread struts
I am running Tomcat 4.0xx
(using netbeans 3.5 with Tomcat bundle)

Barry



- Original Message -
From: Steve Raeburn [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, July 30, 2003 4:03 PM
Subject: RE: struts-el example app not working?


 Works fine for me with the 1.1 release version on Tomcat 4.1.24.

 What container are you running on?

 Steve

  -Original Message-
  From: struts [mailto:[EMAIL PROTECTED]
  Sent: July 30, 2003 3:52 PM
  To: [EMAIL PROTECTED]
  Subject: struts-el example app not working?
 
 
  Hello,
 
  When testing the struts-el example I get the following error.
  The problem goes away
  if I remove:
 
  %@ taglib uri=/WEB-INF/struts-html-el.tld  prefix=html-el %
 
  Of course this is useless because the html-el tags do not function.
 
  I have even tried incorporating the struts-html-el in my own app and
  included all jars from the struts 1.1 release, defined the el tld's in
my
  web.xml and I get the same exact error.  Same partial solution if
  I remove the
 
  %@ taglib uri=/WEB-INF/struts-html-el.tld  prefix=html-el %
 
  the error goes away and the jsp page is displayed and of course without
  the properly generated html.
 
  Appreciate any suggestions
 
  Barry
 
 
  I get the following error:
 
  index.jsp [-1:-1] java.lang.ExceptionInInitializerError
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:141)
  at
  org.apache.strutsel.taglib.html.ELLinkTagBeanInfo.class$(ELLinkTag
  BeanInfo.java:88)
  at
  org.apache.strutsel.taglib.html.ELLinkTagBeanInfo.getPropertyDescr
  iptors(ELLinkTagBeanInfo.java:88)
  at
  java.beans.Introspector.getTargetPropertyInfo(Introspector.java:459)
  at java.beans.Introspector.getBeanInfo(Introspector.java:372)
  at java.beans.Introspector.getBeanInfo(Introspector.java:144)
  at
 
org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCache.java:116)
  at
  org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerato
  r.java:146)
  at
  org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.addG
  enerator(AnalyzerParseEventListener.java:154)
  at
  org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.hand
  leTagBegin(AnalyzerParseEventListener.java:962)
  at
  org.apache.jasper.compiler.DelegatingListener.handleTagBegin(Deleg
  atingListener.java:221)
  at
  org.apache.jasper.compiler.DelegatingListener.handleTagBegin(Deleg
  atingListener.java:216)
  at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:878)
  at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
  at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
  at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
  at
  org.apache.jasper.compiler.ParserController.parse(ParserController
  .java:214)
  at
  org.netbeans.modules.web.jspparser.JspParserImpl.callTomcatParser(
  JspParserImpl.java:126)
  at
  org.netbeans.modules.web.jspparser.JspParserImpl.analyzePage(JspPa
  rserImpl.java:93)
  at
  org.netbeans.modules.web.core.jsploader.JspDataObject.createCompil
  er(JspDataObject.java:297)
  at
  org.netbeans.modules.web.core.jsploader.JspCompilerSupport.addToJo
  b(JspCompilerSupport.java:62)
  at
  org.openide.actions.AbstractCompileAction.prepareJobFor(AbstractCo
  mpileAction.java:361)
  at
  org.openide.actions.AbstractCompileAction.createJob(AbstractCompil
  eAction.java:198)
  at
  org.openide.actions.AbstractCompileAction.compile(AbstractCompileA
  ction.java:209)
  at
  org.netbeans.modules.tomcat.tomcat40.autocompile.CompileServlet.pr
  ocessRequest(CompileServlet.java:76)
  at
  org.netbeans.modules.tomcat.tomcat40.autocompile.CompileServlet.do
  Get(CompileServlet.java:122)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
  org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
  at org.apache.tomcat.core.Handler.service(Handler.java:286)
  at
  org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
  at
  org.apache.tomcat.core.ContextManager.internalService(ContextManag
  er.java:797)
  at
  org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
  at
  org.apache.tomcat.service.http.HttpConnectionHandler.processConnec
  tion(HttpConnectionHandler.java:210)
  at
 
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
  at
 
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
  at java.lang.Thread.run(Thread.java:534)
  Caused by: java.lang.NullPointerException
  at
  org.apache.struts.util.MessageResources.getMessageResources(Messag

Re: struts-el example app not working?

2003-07-30 Thread struts
Yes I just verified,

Basically I unpacked the war and ran it. I did check the
web.xml and struts-config and they look okay out of the
box.

Barry


- Original Message -
From: Canning, Chuck [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, July 30, 2003 4:12 PM
Subject: RE: struts-el example app not working?


 Hey Barry,

 I didn't read enough of the stack trace, sorry.

 Caused by: java.lang.NullPointerException
 at

org.apache.struts.util.MessageResources.getMessageResources(MessageResources
 .java:577)
 at

org.apache.struts.taglib.html.BaseHandlerTag.clinit(BaseHandlerTag.java:10
 8)
 ... 38 more
 Errors compiling index.

 Do you have a resource bundle in your classpath matching the one defined
in
 your web.xml?

 chuck

 -Original Message-
 From: struts [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 30, 2003 5:52 PM
 To: [EMAIL PROTECTED]
 Subject: struts-el example app not working?


 Hello,

 When testing the struts-el example I get the following error.   The
problem
 goes away
 if I remove:

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

 Of course this is useless because the html-el tags do not function.

 I have even tried incorporating the struts-html-el in my own app and
 included all jars from the struts 1.1 release, defined the el tld's in my
 web.xml and I get the same exact error.  Same partial solution if
 I remove the

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

 the error goes away and the jsp page is displayed and of course without
 the properly generated html.

 Appreciate any suggestions

 Barry


 I get the following error:

 index.jsp [-1:-1] java.lang.ExceptionInInitializerError
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:141)
 at

org.apache.strutsel.taglib.html.ELLinkTagBeanInfo.class$(ELLinkTagBeanInfo.j
 ava:88)
 at

org.apache.strutsel.taglib.html.ELLinkTagBeanInfo.getPropertyDescriptors(ELL
 inkTagBeanInfo.java:88)
 at
 java.beans.Introspector.getTargetPropertyInfo(Introspector.java:459)
 at java.beans.Introspector.getBeanInfo(Introspector.java:372)
 at java.beans.Introspector.getBeanInfo(Introspector.java:144)
 at
 org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCache.java:116)
 at

org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:146
 )
 at

org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.addGenerator(A
 nalyzerParseEventListener.java:154)
 at

org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.handleTagBegin
 (AnalyzerParseEventListener.java:962)
 at

org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe
 ner.java:221)
 at

org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe
 ner.java:216)
 at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:878)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
 at

org.apache.jasper.compiler.ParserController.parse(ParserController.java:214)
 at

org.netbeans.modules.web.jspparser.JspParserImpl.callTomcatParser(JspParserI
 mpl.java:126)
 at

org.netbeans.modules.web.jspparser.JspParserImpl.analyzePage(JspParserImpl.j
 ava:93)
 at

org.netbeans.modules.web.core.jsploader.JspDataObject.createCompiler(JspData
 Object.java:297)
 at

org.netbeans.modules.web.core.jsploader.JspCompilerSupport.addToJob(JspCompi
 lerSupport.java:62)
 at

org.openide.actions.AbstractCompileAction.prepareJobFor(AbstractCompileActio
 n.java:361)
 at

org.openide.actions.AbstractCompileAction.createJob(AbstractCompileAction.ja
 va:198)
 at

org.openide.actions.AbstractCompileAction.compile(AbstractCompileAction.java
 :209)
 at

org.netbeans.modules.tomcat.tomcat40.autocompile.CompileServlet.processReque
 st(CompileServlet.java:76)
 at

org.netbeans.modules.tomcat.tomcat40.autocompile.CompileServlet.doGet(Compil
 eServlet.java:122)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at
 org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at

org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
 7)
 at
 org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at

org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
 onnectionHandler.java:210

Re: struts-el example app not working?

2003-07-30 Thread struts
May have to give that a try.

Thanks,
Barry
- Original Message -
From: Steve Raeburn [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, July 30, 2003 4:27 PM
Subject: RE: struts-el example app not working?


 4.0.6 works for me. I don't remember the details, but I *think* Netbeans
has
 cropped up as a problem before.
 If you can, try it with a standalone version of Tomcat and check the mail
 archives for Netbeans issues.

 Steve


  -Original Message-
  From: struts [mailto:[EMAIL PROTECTED]
  Sent: July 30, 2003 4:06 PM
  To: Struts Users Mailing List; [EMAIL PROTECTED]
  Subject: Re: struts-el example app not working?
 
 
  I am running Tomcat 4.0xx
  (using netbeans 3.5 with Tomcat bundle)
 
  Barry
 
 
 
  - Original Message -
  From: Steve Raeburn [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Wednesday, July 30, 2003 4:03 PM
  Subject: RE: struts-el example app not working?
 
 
   Works fine for me with the 1.1 release version on Tomcat 4.1.24.
  
   What container are you running on?
  
   Steve
  
-Original Message-
From: struts [mailto:[EMAIL PROTECTED]
Sent: July 30, 2003 3:52 PM
To: [EMAIL PROTECTED]
Subject: struts-el example app not working?
   
   
Hello,
   
When testing the struts-el example I get the following error.
The problem goes away
if I remove:
   
%@ taglib uri=/WEB-INF/struts-html-el.tld  prefix=html-el %
   
Of course this is useless because the html-el tags do not function.
   
I have even tried incorporating the struts-html-el in my own app and
included all jars from the struts 1.1 release, defined the el tld's
in
  my
web.xml and I get the same exact error.  Same partial solution if
I remove the
   
%@ taglib uri=/WEB-INF/struts-html-el.tld  prefix=html-el %
   
the error goes away and the jsp page is displayed and of
  course without
the properly generated html.
   
Appreciate any suggestions
   
Barry
   
   
I get the following error:
   
index.jsp [-1:-1] java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at
org.apache.strutsel.taglib.html.ELLinkTagBeanInfo.class$(ELLinkTag
BeanInfo.java:88)
at
org.apache.strutsel.taglib.html.ELLinkTagBeanInfo.getPropertyDescr
iptors(ELLinkTagBeanInfo.java:88)
at
java.beans.Introspector.getTargetPropertyInfo(Introspector.java:459)
at
java.beans.Introspector.getBeanInfo(Introspector.java:372)
at
java.beans.Introspector.getBeanInfo(Introspector.java:144)
at
   
 
org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCache.java:116)
at
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerato
r.java:146)
at
org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.addG
enerator(AnalyzerParseEventListener.java:154)
at
org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.hand
leTagBegin(AnalyzerParseEventListener.java:962)
at
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(Deleg
atingListener.java:221)
at
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(Deleg
atingListener.java:216)
at
  org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:878)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
at
org.apache.jasper.compiler.ParserController.parse(ParserController
.java:214)
at
org.netbeans.modules.web.jspparser.JspParserImpl.callTomcatParser(
JspParserImpl.java:126)
at
org.netbeans.modules.web.jspparser.JspParserImpl.analyzePage(JspPa
rserImpl.java:93)
at
org.netbeans.modules.web.core.jsploader.JspDataObject.createCompil
er(JspDataObject.java:297)
at
org.netbeans.modules.web.core.jsploader.JspCompilerSupport.addToJo
b(JspCompilerSupport.java:62)
at
org.openide.actions.AbstractCompileAction.prepareJobFor(AbstractCo
mpileAction.java:361)
at
org.openide.actions.AbstractCompileAction.createJob(AbstractCompil
eAction.java:198)
at
org.openide.actions.AbstractCompileAction.compile(AbstractCompileA
ction.java:209)
at
org.netbeans.modules.tomcat.tomcat40.autocompile.CompileServlet.pr
ocessRequest(CompileServlet.java:76)
at
org.netbeans.modules.tomcat.tomcat40.autocompile.CompileServlet.do
Get(CompileServlet.java:122)
at
  javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at
  javax.servlet.http.HttpServlet.service

Re: struts-el example app not working?

2003-07-30 Thread struts
Yep the stand alone (Tomcat 4.1) works fine.  Just install the
struts-el-exercise-taglib.war through
the tomcat manager and no problems.
Barry

- Original Message -
From: Steve Raeburn [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, July 30, 2003 4:27 PM
Subject: RE: struts-el example app not working?


 4.0.6 works for me. I don't remember the details, but I *think* Netbeans
has
 cropped up as a problem before.
 If you can, try it with a standalone version of Tomcat and check the mail
 archives for Netbeans issues.

 Steve


  -Original Message-
  From: struts [mailto:[EMAIL PROTECTED]
  Sent: July 30, 2003 4:06 PM
  To: Struts Users Mailing List; [EMAIL PROTECTED]
  Subject: Re: struts-el example app not working?
 
 
  I am running Tomcat 4.0xx
  (using netbeans 3.5 with Tomcat bundle)
 
  Barry
 
 
 
  - Original Message -
  From: Steve Raeburn [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Wednesday, July 30, 2003 4:03 PM
  Subject: RE: struts-el example app not working?
 
 
   Works fine for me with the 1.1 release version on Tomcat 4.1.24.
  
   What container are you running on?
  
   Steve
  
-Original Message-
From: struts [mailto:[EMAIL PROTECTED]
Sent: July 30, 2003 3:52 PM
To: [EMAIL PROTECTED]
Subject: struts-el example app not working?
   
   
Hello,
   
When testing the struts-el example I get the following error.
The problem goes away
if I remove:
   
%@ taglib uri=/WEB-INF/struts-html-el.tld  prefix=html-el %
   
Of course this is useless because the html-el tags do not function.
   
I have even tried incorporating the struts-html-el in my own app and
included all jars from the struts 1.1 release, defined the el tld's
in
  my
web.xml and I get the same exact error.  Same partial solution if
I remove the
   
%@ taglib uri=/WEB-INF/struts-html-el.tld  prefix=html-el %
   
the error goes away and the jsp page is displayed and of
  course without
the properly generated html.
   
Appreciate any suggestions
   
Barry
   
   
I get the following error:
   
index.jsp [-1:-1] java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at
org.apache.strutsel.taglib.html.ELLinkTagBeanInfo.class$(ELLinkTag
BeanInfo.java:88)
at
org.apache.strutsel.taglib.html.ELLinkTagBeanInfo.getPropertyDescr
iptors(ELLinkTagBeanInfo.java:88)
at
java.beans.Introspector.getTargetPropertyInfo(Introspector.java:459)
at
java.beans.Introspector.getBeanInfo(Introspector.java:372)
at
java.beans.Introspector.getBeanInfo(Introspector.java:144)
at
   
 
org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCache.java:116)
at
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerato
r.java:146)
at
org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.addG
enerator(AnalyzerParseEventListener.java:154)
at
org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.hand
leTagBegin(AnalyzerParseEventListener.java:962)
at
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(Deleg
atingListener.java:221)
at
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(Deleg
atingListener.java:216)
at
  org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:878)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
at
org.apache.jasper.compiler.ParserController.parse(ParserController
.java:214)
at
org.netbeans.modules.web.jspparser.JspParserImpl.callTomcatParser(
JspParserImpl.java:126)
at
org.netbeans.modules.web.jspparser.JspParserImpl.analyzePage(JspPa
rserImpl.java:93)
at
org.netbeans.modules.web.core.jsploader.JspDataObject.createCompil
er(JspDataObject.java:297)
at
org.netbeans.modules.web.core.jsploader.JspCompilerSupport.addToJo
b(JspCompilerSupport.java:62)
at
org.openide.actions.AbstractCompileAction.prepareJobFor(AbstractCo
mpileAction.java:361)
at
org.openide.actions.AbstractCompileAction.createJob(AbstractCompil
eAction.java:198)
at
org.openide.actions.AbstractCompileAction.compile(AbstractCompileA
ction.java:209)
at
org.netbeans.modules.tomcat.tomcat40.autocompile.CompileServlet.pr
ocessRequest(CompileServlet.java:76)
at
org.netbeans.modules.tomcat.tomcat40.autocompile.CompileServlet.do
Get(CompileServlet.java:122

[newbie] Problem with Action Mapping

2003-07-24 Thread struts user
Hi,
I am new to Struts, i am facing the following a problem with the action 
mappings.

Here are my code snippets related to mapping the action

In web.xml

servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
/servlet-mapping
In login.jsp
-
html:form action=/Login
name=LoginForm
type=com.xxx.yyy.LoginForm 
In struts-config.xml
-
FORM-BEANS

form-beans
form-bean name=LoginForm type=com.xxx.yyy.LoginForm/
/form-beans
GLOBAL FORWARDING
--
global-forwards
forward name=Login path=/login.jsp/
/global-forwards
ACTION MAPINGS

action-mappings
action path=/Login type=com.xxx.yyy.LoginAction scope=request 
input=/login.jsp name=LoginForm
forward name=Success path=/welcome.jsp/
forward name=Failure path=/login.jsp/
/action

With the above code, when the login.jsp is submitted the values have to be 
filled in LoginForm which is an ActionForm for the ActionClass LoginAction .

The associated action path is supposed to be /Login but when the jsp is 
submitted i get an error page saying

The requested resource (/MyApp/Login.do) is not available.

Can somebody point me where am i wrong ?

I am using Tomcat 4.1.24, Struts 1.1

TIA

Meka Toka

PS: And Yes, I have defined the ActionServlet in the web.xml

_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

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


Re: [newbie] Problem with Action Mapping

2003-07-24 Thread struts user
I tried both the ways in the login.jsp

1 html:form action=/Login 

AND

2. html:form action=/Login
  name=LoginForm
  type=com.xxx.yyy.LoginForm 
Both the ways i got same response.

Any ideas about the placement of the LoginForm and LoginAction classes, as 
to where they have to be placed.

I placed them in the WEB-INF/classes/com/xxx/yyy/action where the 
package for both LoginForm and LoginAction classes is com.xxx.yyy.action

Regards,

Meka Toka




From: Susan Bradeen [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: [newbie] Problem with Action Mapping
Date: Thu, 24 Jul 2003 08:55:12 -0400
On 07/24/2003 08:22:44 AM struts user wrote:

 Hi,
 I am new to Struts, i am facing the following a problem with the action
 mappings.

 Here are my code snippets related to mapping the action

 In web.xml
 
 servlet-mapping
 servlet-nameaction/servlet-name
 url-pattern*.do/url-pattern
 /servlet-mapping

 In login.jsp
 -
 html:form action=/Login
 name=LoginForm
 type=com.xxx.yyy.LoginForm 

Change the JSP above to be html:form action=/Login  . Not sure if that
will help, but the form name and type attributes are automatically picked
up from your struts-config file.
Susan


 In struts-config.xml
 -

 FORM-BEANS
 

 form-beans
 form-bean name=LoginForm type=com.xxx.yyy.LoginForm/
 /form-beans

 GLOBAL FORWARDING
 --

 global-forwards
 forward name=Login path=/login.jsp/
 /global-forwards

 ACTION MAPINGS
 

 action-mappings
 action path=/Login type=com.xxx.yyy.LoginAction scope=request
 input=/login.jsp name=LoginForm
 forward name=Success path=/welcome.jsp/
 forward name=Failure path=/login.jsp/
 /action


 With the above code, when the login.jsp is submitted the values have to
be
 filled in LoginForm which is an ActionForm for the ActionClass
LoginAction .

 The associated action path is supposed to be /Login but when the jsp is
 submitted i get an error page saying

 The requested resource (/MyApp/Login.do) is not available.

 Can somebody point me where am i wrong ?

 I am using Tomcat 4.1.24, Struts 1.1

 TIA

 Meka Toka

 PS: And Yes, I have defined the ActionServlet in the web.xml

 _
 Tired of spam? Get advanced junk mail protection with MSN 8.
 http://join.msn.com/?page=features/junkmail


 -
 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]
_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus

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


WebLogic 8.1 NoClassDefFoundError

2003-07-24 Thread struts
I am getting a NoClassDefFoundError evertime I deploy my war in WebLogic 8.1. 
It is failing on the destruction of the action servlet and can not find the
FastHashMap$KeySet class.  The commons-collection jar is in my lib directory.  

Has anyone else had this problem, and if so how did they fix it?

Carl

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



Re: WebLogic 8.1 NoClassDefFoundError

2003-07-24 Thread struts
To add further information to my previous post.  I have read the earlier thread
about the same problem with SlipStream but the problem was never resolved.  I
have tried all of the things they tried (except putting the jar in the
classpath, which is unacceptable since we share the server).

Carl

Quoting [EMAIL PROTECTED]:

 I am getting a NoClassDefFoundError evertime I deploy my war in WebLogic 8.1.
 It is failing on the destruction of the action servlet and can not find the
 FastHashMap$KeySet class.  The commons-collection jar is in my lib directory.
  
 
 Has anyone else had this problem, and if so how did they fix it?
 
 Carl
 
 -
 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]Persistance Layers

2003-07-24 Thread struts
I know that iBatis (ibatis.com) handles stored procedures well.  

Carl

Quoting Jason Meredith [EMAIL PROTECTED]:

 
 Does anyone use one of the available Persistance Layers mentioned at the
 jakarta site - http://jakarta.apache.org/struts/resources/models.html
 
 At the same time make extensive use of stored procedures with that
 Persistance Layer. We use SP's for everything from security, filtering,
 searching, updates, deletes, inserts... so on and so on.
 
 Could some one mention the best one available to use with SP's?
 
 What is the best Persistance Layer out at the moment?
 
 Regards
 
 Jason
 
 
 
 ***
 The e-mail and any attachments are confidential. They may contain
 privileged information and are intended for the named addressee(s)
 only. If you are not the intended recipient, please notify us
 immediately and do not disclose, distribute, or retain this e-mail
 or any part of it.
 
 Unless expressly stated, opinions in this e-mail are those of the
 individual sender and not of the FIMAT Group. We believe but do not
 warrant that this e-mail and any attachments are virus free. 
 You must therefore take full responsibility for virus checking. 
 The FIMAT Group reserve the right to monitor e-mail communications
 through its networks. 
 
 Where this communication constitutes a financial promotion it is issued
 and approved by Fimat International Banque S.A. (UK Branch) and is 
 only intended for persons of a kind described in article 19(5) of the
 Financial Services and Markets Act 2000 (Financial Promotion) Order
 2001.  This information is not intended to be distributed to UK Private
 Customers (as defined by the Financial Services Authority).
 
 Fimat International Banque S.A. (UK Branch) whose registered branch
 in England is at SG House, 41 Tower Hill, London EC3N 4SG is authorised
 by the Commission Bancaire in France and by the UK Financial Services
 Authority; regulated by the Financial Services Authority for the conduct of
 UK Business and is entered in the Financial Services Authority's register
 (Register Number 183415), access to which can be gained via the following
 link: www.fsa.gov.uk/register/
 
 Member and a SETS Participant of the London Stock Exchange (LSE).
 Where this communication is confirming an on exchange transaction
 (as defined by the LSE),the transaction is subject to the rules of the LSE.
 Any information, opinions, estimates and forecasts contained in this 
 document have been arrived at or obtained from public sources believed
 to be reliable and in good faith which has not been independently 
 verified and no warranty, express or implied, is made as to their accuracy,
 completeness or correctness.  
 
 This document is not an offer to sell or a solicitation to acquire or
 dispose
 of an interest in financial instruments. 
 
 If you have received this transmission in error, please telephone
 +44 020 7676 8999 immediately so that we can arrange for its return.
 ***
 
 
 -
 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: prefill form bean ahead of the jsp

2003-07-24 Thread Struts
Thanks
I am actually doing as per example, but in my action class the form is null
!!!
I mean it does not seem to create an instance of the associated form and
pass it into the execute().

Any ideas to what I am doing wrong?

Tex...

Cecile Mercado [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 Check out http://jakarta.apache.org/struts/faqs/newbie.html#prepopulate

 - Cecile

 -Original Message-
 From: Struts [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 23, 2003 9:34 AM
 To: [EMAIL PROTECTED]
 Subject: prefill form bean ahead of the jsp


 Hi all
 Can I prefill the values of my form bean ahead of displaying the jsp page
 that is associated with this form?
 If yes, how?

 I am trying not to override the values entered by the user on this result
 page.
 Because when an error occurs the page is redisplayed and since I am
getting
 the values from an object that I store in the session,
 the fields are reset back to their original values.

 Thanks
 Tex...





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



Deployment in Tomcat

2003-07-24 Thread Meka Struts
Hi,

When a struts application is deployed on Tomcat server, should there be any pop ups of 
the Action Mapping, Success and Failure files.

If the pop up doesnt come up in stack trace when starting Tomcat, does it mean that 
the form-beans(ActionForms) are not properly configured in deployment descriptors ?

Does extending the ActionMapping and writing your own ActionMapping cause any of these 
pop ups ?

I am asking this because, when i start Tomcat no popups comeup, where as when i place 
storefront sample application, there are pop ups of the Form beans, and some other 
stuff.

Thank You

Meka Toka


Re: prefill form bean ahead of the jsp

2003-07-24 Thread Struts
Can I create one that is not a DynaActionForm but a simple ActionForm?
I can not find the sequence of methods to call in the API doc. Could you
show an example?

also, I have specified my action to be as per example, but it seems to
receive a null instance of the form!
Any ideas to why?

Thanks
Tex...
[EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
om...
 Use code like this to create an instance of the DynaFormBean:

 Guy

  DynaActionForm accountAdjustmentForm = (DynaActionForm) form;
  ConfigHelper configHelper = new
 ConfigHelper(getServlet().getServletContext(), request, response);
  DynaActionFormClass formClass =


DynaActionFormClass.createDynaActionFormClass(configHelper.getFormBean(acco
 untAdjustmentForm));
   if (accountAdjustmentForm == null) {
  accountAdjustmentForm = (DynaActionForm) formClass.newInstance();
  accountAdjustmentForm.initialize(mapping);
   }

 -Original Message-
 From: Struts [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 24, 2003 8:11 AM
 To: [EMAIL PROTECTED]
 Subject: Re: prefill form bean ahead of the jsp


 Thanks
 I am actually doing as per example, but in my action class the form is
null
 !!!
 I mean it does not seem to create an instance of the associated form and
 pass it into the execute().

 Any ideas to what I am doing wrong?

 Tex...

 Cecile Mercado [EMAIL PROTECTED] schrieb im Newsbeitrag
 news:[EMAIL PROTECTED]
  Check out http://jakarta.apache.org/struts/faqs/newbie.html#prepopulate
 
  - Cecile
 
  -Original Message-
  From: Struts [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, July 23, 2003 9:34 AM
  To: [EMAIL PROTECTED]
  Subject: prefill form bean ahead of the jsp
 
 
  Hi all
  Can I prefill the values of my form bean ahead of displaying the jsp
page
  that is associated with this form?
  If yes, how?
 
  I am trying not to override the values entered by the user on this
result
  page.
  Because when an error occurs the page is redisplayed and since I am
 getting
  the values from an object that I store in the session,
  the fields are reset back to their original values.
 
  Thanks
  Tex...
 
 
 
 
 
  -
  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]




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



Re: prefill form bean ahead of the jsp

2003-07-24 Thread Struts
Found it.
The struts frame work was not finding all the classes required to create the
form bean so it was giving me a null value instead of throwing an exception.

Struts [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 Can I create one that is not a DynaActionForm but a simple ActionForm?
 I can not find the sequence of methods to call in the API doc. Could you
 show an example?

 also, I have specified my action to be as per example, but it seems to
 receive a null instance of the form!
 Any ideas to why?

 Thanks
 Tex...
 [EMAIL PROTECTED] schrieb im Newsbeitrag

news:[EMAIL PROTECTED]
 om...
  Use code like this to create an instance of the DynaFormBean:
 
  Guy
 
   DynaActionForm accountAdjustmentForm = (DynaActionForm) form;
   ConfigHelper configHelper = new
  ConfigHelper(getServlet().getServletContext(), request, response);
   DynaActionFormClass formClass =
 
 

DynaActionFormClass.createDynaActionFormClass(configHelper.getFormBean(acco
  untAdjustmentForm));
if (accountAdjustmentForm == null) {
   accountAdjustmentForm = (DynaActionForm)
formClass.newInstance();
   accountAdjustmentForm.initialize(mapping);
}
 
  -Original Message-
  From: Struts [mailto:[EMAIL PROTECTED]
  Sent: Thursday, July 24, 2003 8:11 AM
  To: [EMAIL PROTECTED]
  Subject: Re: prefill form bean ahead of the jsp
 
 
  Thanks
  I am actually doing as per example, but in my action class the form is
 null
  !!!
  I mean it does not seem to create an instance of the associated form and
  pass it into the execute().
 
  Any ideas to what I am doing wrong?
 
  Tex...
 
  Cecile Mercado [EMAIL PROTECTED] schrieb im Newsbeitrag
  news:[EMAIL PROTECTED]
   Check out
http://jakarta.apache.org/struts/faqs/newbie.html#prepopulate
  
   - Cecile
  
   -Original Message-
   From: Struts [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, July 23, 2003 9:34 AM
   To: [EMAIL PROTECTED]
   Subject: prefill form bean ahead of the jsp
  
  
   Hi all
   Can I prefill the values of my form bean ahead of displaying the jsp
 page
   that is associated with this form?
   If yes, how?
  
   I am trying not to override the values entered by the user on this
 result
   page.
   Because when an error occurs the page is redisplayed and since I am
  getting
   the values from an object that I store in the session,
   the fields are reset back to their original values.
  
   Thanks
   Tex...
  
  
  
  
  
   -
   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]




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



Re: prefill form bean ahead of the jsp

2003-07-24 Thread Struts
Found it.
The struts frame work was not finding all the classes required to create the
form bean so it was giving me a null value instead of throwing an exception.
Rick Reumann [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 On Wed, Jul 23,'03 (03:34 PM GMT+0200), Struts wrote:

  Hi all
  Can I prefill the values of my form bean ahead of displaying the jsp
  page that is associated with this form?
  If yes, how?

 Sure just do it in Action before you go the form or if you know they
 will always be the same values you can set them as default or intial
 values in your ActionForm/DynaActionForm.

  I am trying not to override the values entered by the user on this
  result page.
  Because when an error occurs the page is redisplayed and since I am
  getting the values from an object that I store in the session,
  the fields are reset back to their original values.

 You definitely should be populating your form on the JSP from values in
 Session (well, the exception would be select options lists). I like to
 set up certain intial form values in a setUp dispatch or regular
 SetUpAction since the setUp is often based on 'who' is logged in.

 There's a real basic example in lesson 1 here http://www.reumann.net/

 --
 Rick




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



can I iterate on Map property?

2003-07-24 Thread Struts
Hi all,

in my form, I have a property of type Map.
I would like to render a select/option field in my html using this property.
Is this possible or do I need to convert it into an array?

In either case, could some one be kind enough to show me an example?

Thanks
Tex...




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



Re: prefill form bean ahead of the jsp

2003-07-24 Thread Struts
Found it.
The struts frame work was not finding all the classes required to create the
form bean so it was giving me a null value instead of throwing an exception.
Struts [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 Thanks
 I am actually doing as per example, but in my action class the form is
null
 !!!
 I mean it does not seem to create an instance of the associated form and
 pass it into the execute().

 Any ideas to what I am doing wrong?

 Tex...

 Cecile Mercado [EMAIL PROTECTED] schrieb im Newsbeitrag
 news:[EMAIL PROTECTED]
  Check out http://jakarta.apache.org/struts/faqs/newbie.html#prepopulate
 
  - Cecile
 
  -Original Message-
  From: Struts [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, July 23, 2003 9:34 AM
  To: [EMAIL PROTECTED]
  Subject: prefill form bean ahead of the jsp
 
 
  Hi all
  Can I prefill the values of my form bean ahead of displaying the jsp
page
  that is associated with this form?
  If yes, how?
 
  I am trying not to override the values entered by the user on this
result
  page.
  Because when an error occurs the page is redisplayed and since I am
 getting
  the values from an object that I store in the session,
  the fields are reset back to their original values.
 
  Thanks
  Tex...
 
 
 
 
 
  -
  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: can I iterate on Map property?

2003-07-24 Thread Struts
Hi Suzette,
thanks for your reply,
am I correct to presume listofproducts in your example is of type Map?
Tex...

Suzette Daniel [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 You can use the option tag with a Map, it works just fine, but you must
use
 html:options. Here's an example:

 html:select property=product.productId
 html:option key=option.default value= /
 html:options collection=listofproducts property=value
 labelProperty=key/
 /html:select

 Suzette H. Daniel

 -Original Message-
 From: Alex Shneyderman [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 24, 2003 1:33 PM
 To: 'Struts Users Mailing List'
 Subject: RE: can I iterate on Map property?


 You might want to look at el tags.
 You can specify expressions in them to avoid iteration

  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]
  Sent: Thursday, July 24, 2003 1:23 PM
  To: [EMAIL PROTECTED]
  Subject: RE: can I iterate on Map property?
 
  No.  Just use the logic:iterate tag.  RTFM.
 
  -Original Message-
  From: Struts [mailto:[EMAIL PROTECTED]
  Sent: Thursday, July 24, 2003 10:21 AM
  To: [EMAIL PROTECTED]
  Subject: can I iterate on Map property?
 
 
  Hi all,
 
  in my form, I have a property of type Map.
  I would like to render a select/option field in my html using this
  property. Is this possible or do I need to convert it into an array?
 
  In either case, could some one be kind enough to show me an example?
 
  Thanks
  Tex...
 
 
 
 
  -
  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]



 -
 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: WebLogic 8.1 NoClassDefFoundError

2003-07-24 Thread struts
We have 8.1b running on Windows exhibiting this behavior.  We have 8.1 running
on Solaris exhibiting this behavior.  Copying the commons-collection.jar into
the classpath fixed the Solaris.  This does not appear to work in 8.1b on Windows.

Carl

Quoting Dudley Irish [EMAIL PROTECTED]:

 I am getting a NoClassDefFoundError evertime I deploy my war in WebLogic
 8.1. 
 It is failing on the destruction of the action servlet and can not find
 the
 FastHashMap$KeySet class.  The commons-collection jar is in my lib
 directory.  
 
 Has anyone else had this problem, and if so how did they fix it?
 
 Carl
 
 I too am getting this error, but only on the beta version of WebLogic
 8.1.  The release version is not getting the error.  This may be
 because the beta is on Linux (RedHat Advanced Server) and the release
 version is on Solaris, but I can't imagine why.
 
 I can tell you that adding commons-collections.jar to the class path
 fixes the problem.  I can also tell you that it is application
 specific.  I have two applications that are very similar, but one
 triggers the problem and the other doesn't.  That suggests to me that
 the problem is in the specific versions of the libraries but I have
 not been able to figure out the details.  From the stack dump it seems
 clear that it has something to do with the data sources which is where
 these two versions of the application differ.
 
 Any clues would be appreciated.
 
 Dudley Irish
 
 -
 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]



Question About Passing Values from Action Class

2003-07-24 Thread Meka Struts
Hi,

I have an Action Class which has 2 methods

* an execute method that forwards using ActionMapping
* a protected method getXXX(), which return an ArrayList of objects to execute method.

My question is, how would i pass the ArrayList to the view page (jsp) so that it can 
extract data from ArrayList and display it.

I am actually going though an example and it seems to have missed that part. I cant 
get to understand how will the ArrayList object be passed ?

Thank You

Meka Toka


Re: Question About Passing Values from Action Class

2003-07-24 Thread Meka Struts
Hi Mike,

Got your point. Thank You

In that case, how would the view classes be helpful. Because some people
will write View classes (plain java files with get/set - java beans )

Can i set the view class also in the session so that the View JSP can access
it and show the data ?

This situation will be arising when i have a data layer which returns me a
Bussiness Object. So i fill the data from bussiness object to view class and
then pass on to view jsp.

Please correct me if any part of above statement doesnt make sense.

Thank You

Meka Toka

PS: I have read and read 2 books, i am just clearing my doubts.


- Original Message -
From: Mike Jasnowski [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 4:10 PM
Subject: RE: Question About Passing Values from Action Class


 Generally you would stuff this ArrayList in a formbean accessible via a
 public getter, or you could I suppose put it in the session yourself as a
 scoped attribute. Then in the JSP you access it by that attribute name.

 -Original Message-
 From: Meka Struts [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 24, 2003 3:58 PM
 To: [EMAIL PROTECTED]
 Subject: Question About Passing Values from Action Class


 Hi,

 I have an Action Class which has 2 methods

 * an execute method that forwards using ActionMapping
 * a protected method getXXX(), which return an ArrayList of objects to
 execute method.

 My question is, how would i pass the ArrayList to the view page (jsp) so
 that it can extract data from ArrayList and display it.

 I am actually going though an example and it seems to have missed that
part.
 I cant get to understand how will the ArrayList object be passed ?

 Thank You

 Meka Toka


 -
 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: Question About Passing Values from Action Class

2003-07-24 Thread Meka Struts
Hey chuck,

thank you for reply, thats exactly what i was looking for.

However, in my earlier Q i was asking mike, what if i wanted to populate
data from ArrayList (which i recieved from data access object) into a view
class ( a java bean)  so that it can be later used by a view jsp on the
front end.

Hope i made it clear

Regards,

Meka Toka
- Original Message -
From: Canning, Chuck [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 4:34 PM
Subject: RE: Question About Passing Values from Action Class


 Hey Meka,

 I am not sure if I understand what you are saying, so let me surmise: You
 are trying to access an arraylist in a JSP page that has been set by your
 action class. If this is what you are trying to do, it you place the array
 list in the request scope or session scope as an attribute and then
 reference it from the JSP by the attribute name.

 in your action, use

 request.setAttribute(myList, yourListInstance);

 or session.setAttribute(myList, yourListInstance);

 Then in your JSP, you could access it by request.myList, session.myList or
 from a struts tag using the name myList. Hope this information helps you
 find your solution. (My example is not exact).

 Chuck

 -Original Message-
 From: Meka Struts [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 24, 2003 3:24 PM
 To: Struts Users Mailing List
 Subject: Re: Question About Passing Values from Action Class


 Hi Mike,

 Got your point. Thank You

 In that case, how would the view classes be helpful. Because some people
 will write View classes (plain java files with get/set - java beans )

 Can i set the view class also in the session so that the View JSP can
access
 it and show the data ?

 This situation will be arising when i have a data layer which returns me a
 Bussiness Object. So i fill the data from bussiness object to view class
and
 then pass on to view jsp.

 Please correct me if any part of above statement doesnt make sense.

 Thank You

 Meka Toka

 PS: I have read and read 2 books, i am just clearing my doubts.


 - Original Message -
 From: Mike Jasnowski [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Thursday, July 24, 2003 4:10 PM
 Subject: RE: Question About Passing Values from Action Class


  Generally you would stuff this ArrayList in a formbean accessible via a
  public getter, or you could I suppose put it in the session yourself as
a
  scoped attribute. Then in the JSP you access it by that attribute name.
 
  -Original Message-
  From: Meka Struts [mailto:[EMAIL PROTECTED]
  Sent: Thursday, July 24, 2003 3:58 PM
  To: [EMAIL PROTECTED]
  Subject: Question About Passing Values from Action Class
 
 
  Hi,
 
  I have an Action Class which has 2 methods
 
  * an execute method that forwards using ActionMapping
  * a protected method getXXX(), which return an ArrayList of objects to
  execute method.
 
  My question is, how would i pass the ArrayList to the view page (jsp) so
  that it can extract data from ArrayList and display it.
 
  I am actually going though an example and it seems to have missed that
 part.
  I cant get to understand how will the ArrayList object be passed ?
 
  Thank You
 
  Meka Toka
 
 
  -
  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]

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



Retrieving Values from session

2003-07-24 Thread Meka Struts
Hi,

I am going through an example. 

When it had to forward a bunch of objects it filled the objects in a ArrayList and 
added the arraylist object to session. Later, the arraylist object was iterated using 
the logic template directories iterate command.

I want to send a single object instance, and for that i have also attached the object 
instance to the session. 

How can i access the object in the jsp page which needs to display the data from the 
object present in the session ?

Thank You

Meka Toka


Re: Retrieving Values from session

2003-07-24 Thread Meka Struts
My bad,

I had to use a bean:write name=...  property=.../

Regards,

Meka Toka
- Original Message -
From: Meka Struts [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 7:06 PM
Subject: Retrieving Values from session


Hi,

I am going through an example.

When it had to forward a bunch of objects it filled the objects in a
ArrayList and added the arraylist object to session. Later, the arraylist
object was iterated using the logic template directories iterate command.

I want to send a single object instance, and for that i have also attached
the object instance to the session.

How can i access the object in the jsp page which needs to display the data
from the object present in the session ?

Thank You

Meka Toka


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



prefill form bean ahead of the jsp

2003-07-23 Thread Struts
Hi all
Can I prefill the values of my form bean ahead of displaying the jsp page
that is associated with this form?
If yes, how?

I am trying not to override the values entered by the user on this result
page.
Because when an error occurs the page is redisplayed and since I am getting
the values from an object that I store in the session,
the fields are reset back to their original values.

Thanks
Tex...





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



Multibox over a collection

2003-07-08 Thread Sussu Struts
Hello,
 
I have read thru the archives on this topic and want to know is there a way of using 
multibox over a collection . All that every one put as example is from Ted's tip , 
which uses a string buffer(which has item as string array etc etc)
My problem is that I have a table in which every row is a object of a formbean and has 
checkbox on the left which is a column of the table. So every row of the table has a 
checkbox. Iam populating the table using the iterate tag over a Arraylist. Now problem 
is getting the row which a user select back in action class for further processing.
 
pls. help and thanks in advance
 
Thanks 
Sushil 
 
PS:- Btw I read in one of the mail that Struts doesnot support multibox over 
collection and work only against a arrayis it true!!!



-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

NewBie: Wizard screens

2003-07-07 Thread Sussu Struts
Hello ,
I have to design a wizard screens in which the flow goes from one Jsp to other using 
naviagation. In each naviagtion there is some business processing which is required.
 
I have a table which I have populated in the Jsp2, which has one column as checkboxes. 
I have used multibox for the same. User can select any of the checkboxes and based on 
the selection i need to pick the record for further processing in the subsequent 
screens.
I have populated is using a iterate tag over a Arraylist which was populated in the 
Action and form bean associated with JSP1.
 
Now what i dont get is where will the check box be set ( as the getter and setter for 
the data in the table is in Formbean1) and how will I get the values of the checkboxes 
in the next screen. The Formbean and Action class for the JSP2(where the table is 
shown) is currently dummy.
 
Thanks in advance 
Sussu


-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Re: problem with output character encoding using resource bundles

2003-03-31 Thread kkourt-struts
On Mon, Mar 31, 2003 at 03:26:00PM +0200, Gemes Tibor wrote:
 [EMAIL PROTECTED] ?rta:
 I tried to convert the file to utf-8 using native2ascii as 
 described in http://www.anassina.com/struts/i18n/i18n.html
 but the problem remains. 
 native2ascii cannot convert to utf-8 afaik... it converts to ascii where 
 the not-ascii characters
 will be exchanged with their escaped ascii equivalent.  However 
 native2ascii is your tool.
 
 Did you reload your application after converting the properties file?
 
 Tib

Yes I reload it

Also I forgot to write that when I tried the utf-8 encoding for the page
I got some strange symbols (like questionmarks) 
in the browser. I thought that it might be the browser's fault and so 
I tried to view the page with a couple of browers but none workedd.


-- 
Kornilios Kourtis
The worst is yet to come

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



tab problem

2003-03-22 Thread struts struts
Hello ,
I have a problem . I have created a sample application 
in
struts and would like to include tabs in my struts page is 
there
any way I can do this. The problem Iam facing is I have to use 
struts 1.0 which
did not support this can any one help me in telling me what do I
need to include in my tag library (struts library) to have this
functionality .

thanx in advance.

regards
Struts explorer
___
Odomos - the only  mosquito protection outside 4 walls -
Click here to know more!
http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.htmodomoswn
---BeginMessage---
Hi. This is the qmail-send program at webmail35.rediffmail.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

[EMAIL PROTECTED]:
Sorry, I couldn't find any host named jakarta.apache.org!. (#5.1.2)

--- Enclosed is a copy of the message.
---BeginMessage---
Hello ,
I have a problem . I have created a sample application in 
struts and would like to include tabs in my struts page is there 
any way. The problem Iam facing is I have to use struts 1.0 which 
did not support this can any one help me in telling me what do I 
need to include in my tag library (struts library) to have this 
functionality .

thanx in advance.

regards
Struts explorer
___
Odomos - the only  mosquito protection outside 4 walls -
Click here to know more!
http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.htmodomoswn
---End Message---
---End Message---
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: tab problem

2003-03-22 Thread struts struts
Hi,
   Has any one used tabs .As they are client side Javascript . 
How does structs which is a server side framework deal with it . 
?

-thanx for ur inputs



On Sat, 22 Mar 2003 struts  struts wrote :
Hello ,
I have a problem . I have created a sample application 
in
struts and would like to include tabs in my struts page is 
there
any way I can do this. The problem Iam facing is I have to use 
struts 1.0 which
did not support this can any one help me in telling me what do 
I
need to include in my tag library (struts library) to have this
functionality .

thanx in advance.

regards
Struts explorer
___
Odomos - the only  mosquito protection outside 4 walls -
Click here to know more!
http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.htmodomoswn
Hi. This is the qmail-send program at webmail35.rediffmail.com.
I'm afraid I wasn't able to deliver your message to the following 
addresses.
This is a permanent error; I've given up. Sorry it didn't work 
out.

[EMAIL PROTECTED]:
Sorry, I couldn't find any host named jakarta.apache.org!. 
(#5.1.2)

--- Enclosed is a copy of the message.
Hello ,
I have a problem . I have created a sample application 
in struts and would like to include tabs in my struts page is 
there any way. The problem Iam facing is I have to use struts 1.0 
which did not support this can any one help me in telling me what 
do I need to include in my tag library (struts library) to have 
this functionality .

thanx in advance.

regards
Struts explorer
___
Odomos - the only  mosquito protection outside 4 walls -
Click here to know more!
http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.htmodomoswn
-
To unsubscribe, e-mail: 
[EMAIL PROTECTED]
For additional commands, e-mail: 
[EMAIL PROTECTED]
___
Odomos - the only  mosquito protection outside 4 walls -
Click here to know more!
http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.htmodomoswn
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] FWIW

2003-03-18 Thread struts list
Take your bickering to another list.  This list is for Struts 
discussions, not political discussions.

Rasputin wrote:

* P Dunham [EMAIL PROTECTED] [0353 15:53]:

 

The evidence is right in front of you but you choose to no believe it or
invalidate it with stupid, misguided conspiracy theories. 
   

What evidence? We haven't seen any. The inspectors have said there's
no evideence of a nuclear threat.
 

It's a good
thing president bush is not afraid to take responsibility and protect
this country, something democrats are obviously afraid of doing.
   

Iraq is no threat to the US, never has been, never will be.
Missiles with a 90 mile range can't even reach Israel, never mind the US.
 

Many mothers were crying September 11th. 
   

That was bin Laden, not Iraqis. Remember him?
He's still out there because Bush is wasting everyone's time on Iraq.
 

Many mothers were crying when
Saddam Hussein released chemical weapons on and killed many of his own
people.
   

That was Halabja, the anniversary was yesterday when Bush made
his speech. He didn't even bother to mention it.
Rumsfeld and Cheney ought to remember, they were the people who sold
him the gas.
You think these mothers will be happy when the bombs fall and kill
their grandkids?  Saddam won't give a shit cos he'll be in his bunker.
Because of this stupid war, the UN, NATO, the European Union and now the 
UK government are falling apart. Korea is about to kick off and how we
you turn round and tell them not to act unilaterally when the US
happily brand entire countries cowards because they wondered what the
rush to war was?

But none of that matters because Saddam is a nasty man?

Grow up. Just because your president has a mental age of six doesn't
mean the entire country has to stop thinking.
Get back in touch when you've elected a proper leader.

(Sorry to spam the list. Why does the reply-to get set, anyway?)

 

-Philip

-Original Message-
From: Slobodan Kasterovic [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 18, 2003 9:27 AM
To: 'Struts Users Mailing List'
Subject: AW: [OT] FWIW

   

Do I believe we must go to war to protect our country from another
attack like 9/11? Yes. 
 

To protect - YES.

But this is not protection !

This is again the World. This is punishment without evidence. This is
aggression. This makes more terrorists. This is (practical) without
allies.
This makes Bush  CO be lousy with cash. This makes more/many Mothers
and
Wifes crying. This is wrong way !!!
Kasterovic Slobodan

-- -Ursprungliche Nachricht-
-- Von: James Higginbotham [mailto:[EMAIL PROTECTED]
-- Gesendet: Dienstag, 18. Marz 2003 16:03
-- An: Struts Users Mailing List; Wankers
-- Betreff: RE: [OT] FWIW
-- 
-- 
-- Mark,
-- 
-- Some interesting information for digestion:
-- 
-- From a reputable source, BBC, regarding Iraq torturing children:
-- 
-- http://news.bbc.co.uk/2/hi/world/from_our_own_correspondent/
2058253.stm

Iraq training the terrorists (PBS Frontline):

http://www.pbs.org/wgbh/pages/frontline/shows/gunning/interviews/khodada
.html
http://www.nytimes.com/auth/login?URI=http://query.nytimes.com/search/ar
ticle-page.htmlOQ=resQ3D9B01EED81E39F93BA35752C1A9679C8B63 (requires
registration - NY Times)
Or, links to Iraq for 9/11, which is essentially a declaration of war as
the bombing on Pearl Harbor was:
http://www.observer.co.uk/focus/story/0,6903,591439,00.html

Not trying to start a flame war, just presenting some facts that are not
commonly presented in some media forums.. Do I want to go to war? No..
Do I believe we must go to war to protect our country from another
attack like 9/11? Yes. 

James

   

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 18, 2003 7:38 AM
To: struts; Wankers
Subject: [OT] FWIW

http://www.bretzelforbush.com



-
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]
-
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: Strutsaction on different WebApps

2003-03-18 Thread struts list
I had the same problem.  For this reason, I do not use the struts 
html:base tag.  Instead I created my own (seen below in scriptlet form):

base href=%
   String rurl = request.getRequestURL().toString();
   String context = request.getContextPath();
   int pathstart = 8;
   if (context != null  context.length()  1)
   {
   pathstart = rurl.indexOf(/, rurl.indexOf(context) + 1);
   }
   else
   {
   pathstart = rurl.indexOf(/, pathstart);
   }
   out.print(rurl.substring(0, pathstart + 1)); % 
This allows me to deploy my .war in various contexts within the same server.

-M Williamson

Kjellaug Johansen wrote:

Maybe I didn't explain my problem good enough...

The name of my application is WebApp. This name is similar for both the
production server and the test server. The servername (if you understand
what I mean by that term) on the testserver is www.mycomp.com/test, and the
servername on the productionserver is www.mycomp.com.
You suggested to deploy the test-application under a different name (i.e.
test-WebApp), but the problem is that I can't have the same servername for
the test- and production server. See? It's ok to have different
application-names, but the servername have to be different, because there
are in fact two different servers on two different machines.
It seems like Struts thinks the servername is www.mycomp.com even if I'm
working on the testserver with the servername www.mycomp.com/test. Why is
this a problem in Struts?
I hope this explanation was clear to you... I appreciate any response on
this problem :-)
Kjellaug

- Original Message -
From: James Mitchell [EMAIL PROTECTED]
To: Kjellaug Johansen [EMAIL PROTECTED]
Cc: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, March 14, 2003 4:14 PM
Subject: Re: Strutsaction on different WebApps
 

Sorry that no one helped you, but let's take this back to the list.

How are you planning to do this?
What is the name of your application?  test or WebApp
Are you familiar with Request Path Elements?
You should read the servlet spec (section 4.4).  That will give you a good
understanding of why the approach you've described is giving the results
   

you
 

didn't expect.

My only suggestion to you is to deploy your WebApp under a different name
rather that trying to nest it under some directory.
I wouldn't recommend running your test server as your production box, but
   

if
 

you have no choice, try naming your test application as test-WebApp and
deploy it right beside WebApp.
That would give you this:
www.mycomp.com/WebApp
www.mycomp.com/test-WebApp
...I think you'll start seeing the behavior you expect.

--
James Mitchell
Software Developer/Struts Evangelist
http://struts.sourceforge.net/struts-atlanta/


- Original Message -
From: Kjellaug Johansen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 14, 2003 5:39 AM
Subject: Strutsaction on different WebApps
I've posted this on struts-user mail archive, but there haven't been any
response, so I hope you could help me! I hope you have some time to look
   

at
 

my problem. Thanks! :-)

I have two servers running webapps, one for production:
www.mycomp.com/WebApp and one for testing: www.mycomp.com/test/WebApp
When I work on the production server there are no problems, but when I
   

work
 

on the test-server and try to call a Struts-action (i.e.
www.mycomp.com/test/WebApp/user/saveUser.do), I'm getting redirected to
   

the
 

production-server. The 'test' part in the URL for the test-server is
   

ignored
 

and I'm getting redirected to www.mycomp.com/WebApp/user/saveUser.do.

The struts-config on the testserver looks like this:
action path=/user/saveUser
   type=com.mycomp.web.user.SaveUserAction
   name=user
   scope=request
   input=/jsp/user/editUser.jsp
/action
The action call in the jsp file on the testserver looks like this:
... action = /user/saveUser.do
My questions are:
Doesn't Struts manage an extra level (test) between the serverroot
(www.mycomp.com) and the webapp name (WebApp)? Are there any
   

config-settings
 

I can do to solve this?

Kjellaug.



   



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


ArrayList Object[] funkiness

2003-03-12 Thread struts
One of our Form's has an ArrayList property.  The getter method for that 
property returns an Object[].  That functionality no longer works on my 
development machine (it does work on the production server).  If I change the 
return type to ArrayList it then works on my development machine but no longer 
works in production.  What I don't understand is, this is all packaged up in a 
war file being deployed to the same version of WebLogic, with the same 
settings, same JVM, same everthing.

My questions are:  

Which is the correct return type for use with logic:iterate ArrayList or 
Object[]?

Any guesses to what may be causing this to happen?

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



Re: ArrayList Object[] funkiness

2003-03-12 Thread struts
So, if the ArrayList is the right way to go...  Why does it explode in the 
majority of the environments (all developers except for me, and all servers) 
and Object[] works?  Using Struts 1.1B2.  Servers: Solaris, Dev boxes: Windows, 
AppServer: WebLogic.

Carl

Quoting Rick Reumann [EMAIL PROTECTED]:

 On Wed, 12 Mar 2003 16:25:08 -0500
 Mark Galbreath [EMAIL PROTECTED] wrote:
 
  ArrayList; if you return Object[] you will have to cast it into an
  ArrayList.
 
 I know you know this Mark, but just to be a bit more technically correct
 in case [EMAIL PROTECTED] isn't aware, any of the Collection classes
 including the base class Collection should work I believe with iterate
 (it doesn't have to be just type ArrayList... although I find myself
 using that one the most often).
 
 
 -- 
 Rick Reumann
 
 -
 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: ArrayList Object[] funkiness

2003-03-12 Thread struts
How about the important snippets :)

In the Form:
public Object[] getGroup()
{
   return group.toArray();
}

In the jsp:
nested:root
   nested:iterate property=group id=g // this is the line that dies
   nested:write property=name
   //  other writes and fun things
   /nested:iterate
/nested:root


Quoting Rick Reumann [EMAIL PROTECTED]:

 On Wed, 12 Mar 2003 15:48:58 -0600
 [EMAIL PROTECTED] wrote:
 
  So, if the ArrayList is the right way to go...  Why does it explode in
  the majority of the environments (all developers except for me, and
  all servers) and Object[] works?  
 
 Very odd.  Before switching to JSTL for tag, I used Collections all the
 time in iterate. 
 
 Maybe you could post the exact form bean definition and the iterate
 portion of you code in the jSP. 
 
 -- 
 Rick Reumann
 
 -
 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: ArrayList Object[] funkiness

2003-03-12 Thread struts
Answers below...
 
 What happens when you have:
 
 ArrayList group;
 
 public ArrayList getGroup() {
return group;
 }

The above causes the app to work on my machine, and break on everyone elses.
 
 Also in your code what is the Collection or array holding? In other
 words I take it group is the name of some Collection of objects where
 each of the objects in there has a property called name ?
 
 nested:root
   nested:iterate property=group id=g  
 nested:write property=name   
   /nested:iterate
 /nested:root
 

The form's that are in a group are just normal ActionForm's.  They have a name 
and an id and there is some linking done, but it is all independant of the 
ArrayList / Object[] issue.   
 
 
 -- 
 Rick Reumann
 
 -
 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: Correctly JSP Request Lifecycle?

2003-03-12 Thread struts
Nick,

Your hack is actually the correct way to go about it.  You should never 
directly access a JSP in Struts.  See the example app that is included with 
Struts for clarification.  Here is the correct order of events:

- MyAction grabs JSP (using a forward) and displays it to the user.
- User fills in form and Submits.
- Action looks at the url, determines which Form to use, and populates the data 
into that form and calls execute on the appropriate Action (MyAction).
- MyAction.execute() now has access to the data that is in the ActionForm that 
is passed in.

Carl

Quoting Nick Coleman [EMAIL PROTECTED]:

 I'm running into a strange issue with struts modules and I want to verify
 the correct way to implement struts...
 
 Let say I have an Action Form named MyForm, an Action named MyAction and an
 input page named MyPage.jsp.
 
 I believe the correct order of operations would be to make the initial
 request to MyPage.jsp built with struts taglibs to populate form elements
 from the MyForm object.
 
 The user would enter data into the HTML form which would then be posted to
 /MyAction.do and processed by the MyAction class.  After processing the
 MyAction class forwards either to the MyPage.jsp for rendering more html or
 some other forward...
 
 If my order of events, is flawed please let me know since this sequence
 only
 appears to work for the default struts-config.xml and not for any module
 configurations.  If I make a request directly to a jsp page that is
 associated with an action in a module, the html taglibs are unable to
 locate
 the form and action mappings required.  
 
 As a hack to work around this, all initial requests for modules are made
 directly to the action via a *.do request.  The associated action form
 contains a string that is connected to the submit button in order to
 determine if the action is being processed in response to an action form
 submission or an initial request.  Without this extra string I cannot
 determine whether the user is submitting data or simply navigated to the
 url.   I'm am unsure if this is a bug or user error.
 
 Thanks for the assistance,
 -Nick
 
 
 




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



Re: ArrayList Object[] funkiness

2003-03-12 Thread struts
Rick, Thanks for your help.  The difference between the two machines is the big 
question because if they are different, it will be in some obscure fractional 
way.  They are both hitting the same database, using the same version of 
WebLogic, different OS's (Windows 2k vs WindowsXP), same JVM, EVEN the same war 
file!  The exact same war file works on one machine but not the other.  I am 
living in the Twilight Zone and I have no idea how I got there...  Anyway, 
thanks for your help.  I will figure this out somehow...


Carl

Quoting Rick Reumann [EMAIL PROTECTED]:

 On Wed, 12 Mar 2003 16:59:31 -0600
 [EMAIL PROTECTED] wrote:
  
  The above causes the app to work on my machine, and break on everyone
  elses.
 
 So of course the obvious question- what is different about the two
 machines? Are they accessing the same exact information that is
 populating the collection/array? 
 
   
   Also in your code what is the Collection or array holding? In other
   words I take it group is the name of some Collection of objects
   where each of the objects in there has a property called name ?
   
   nested:root
 nested:iterate property=group id=g  
   nested:write property=name   
 /nested:iterate
   /nested:root
   
  
  The form's that are in a group are just normal ActionForm's.  They
  have a name and an id and there is some linking done, but it is all
  independant of the ArrayList / Object[] issue.   
 
 Sorry maybe I wasn't clear, I'm just trying to figure out what is being
 stored in the Collection called group. The way it's set up above
 group should be a collection of some beans where each bean in group at
 least has one field named name (with the appropriate getter
 obviously).
 
 I'm still more stumped on why it would be working on your machine and
 not the others... different jars in lib? Different tlds? Something is
 freaky there for sure. I'd stick with using a Collection though for your
 iterate and work on narrowing down what is enabling it work on one box
 and not another. 
 
 -- 
 Rick Reumann
 
 -
 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: Correctly JSP Request Lifecycle?

2003-03-12 Thread struts
All navigation should go through Actions.  Your Action can be set up to handle 
both types of requests.  If your Action is called without any data in your 
form, then you would do nothing but forward it along to the JSP.  If your 
Action is called and your form has data, then you would use that data and 
forward the user on to the next page, whether that is another Action or JSP is 
up to you.

I highly recommend reading this: http://www.reumann.net/do/struts/main

Carl


Quoting Nick Coleman [EMAIL PROTECTED]:

 Would it be cleaner to define a GlobalForward in the module to the jsp,
 have
 the initial request to sent the forward and then have the user post data
 from that point to the action?  I don't know if it would work, but I would
 image that actions should only be instantiated when work should be
 performed, not during simple navigation.  Is this an incorrect assumption?
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 12, 2003 6:16 PM
 To: Struts Users Mailing List
 Subject: Re: Correctly JSP Request Lifecycle?
 
 
 Nick,
 
 Your hack is actually the correct way to go about it.  You should never 
 directly access a JSP in Struts.  See the example app that is included with
 
 Struts for clarification.  Here is the correct order of events:
 
 - MyAction grabs JSP (using a forward) and displays it to the user.
 - User fills in form and Submits.
 - Action looks at the url, determines which Form to use, and populates the
 data 
 into that form and calls execute on the appropriate Action (MyAction).
 - MyAction.execute() now has access to the data that is in the ActionForm
 that 
 is passed in.
 
 Carl
 
 
 -
 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]



Modifying Form Data in Action

2003-02-14 Thread struts
I have defined an action mapping that accepts a session-level form.  When
this action is invoked, the form data is validated and I do some
business-logic pre-processing of the data.  I need to set a parameter in the
form that represents a transaction id value.  This action then forwards to
another action based on the rules of our business logic.  In one of those
cases, the action I forward to will need to re-read the session-level form
and pull this transaction id from the form and use it to submit a job.

The problem I am noticing is that when the second action is being invoked,
the form is being 'repopulated' with the initial form values that the form
had when it was passed to the first action.

Both actions have the form defined at the session-level in their mapping
definitions.  I have debugging information in action1 that shows the session
object is being populated and set appropriately.  I even retreive the object
after setting it in action1 to validate my value and it's there.  In
action2, I have added debugging information that checks both the input
ActionForm and the session object directly.  In both cases, Action2 reflects
this form-bean's property to be 0 and should be some 0 value.

First of all, is what I am doing possible based on the struts framework?  I
can set a single attribute in the session and reference that value
successfully from action to action; however it seems when using a form
object, this isn't working as I had expected it to ...

Thanks in advance!
Chris




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




  1   2   3   4   >