• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jsp useBean and a bean id with a dot in the name?

 
Jimi Svedenholm
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I would like to save an ArrayList object in the request scope, and then use this list in a jsp page. However I want these two things to work to:

1. I want the name of the list to contain dots, like "com.mycompany.whatever.specialarray".

2. If the arraylist does not exist in the request, then the page should *not* fail (as is the case with the struts tag <bean:define>), instead it should create an empty ArrayList.

The second issue made me try <jsp:useBean>, however that one complains when I use the id="com.mycompany.whatever.specialarray". How can I solve this? What I would like is a combination of the struts <bean:define> tag and the <jsp:useBean> tag. For example:

<someTag id="nameToUseHere" name="com.mycompany.whatever.specialarray" class=java.util.ArrayList"/>

Does such a tag exist in struts (version 1) or regular J2EE?

Regards
/Jimi
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jimi Svedenholm:
...
Does such a tag exist in struts (version 1) or regular J2EE?


I'm thinking this thread will do better in our Struts forum.
Moving.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!