Another newbie question
Hello - This may be way out in left field but Is it possible for a jsp scriptlet to read a struts tag? For example - can you do this? (My goal here is to be able to have the value in the logic:equal tag to be dynamic instead of constant). logic:iterate id=userTeam name=IQSideMenuForm property=userTeams % String teamId = bean:write name=userTeam property=teamId filter=true/ ;% . . . logic:equal name=toDoIssue property=teamId value=%= teamId % . . /logic:equal /logic:iterate Or is there a better way to make the value in logic:equal to be dynamic? Your help is greatly appreciated. Chris McLennan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Another newbie question
It might look like this: logic:iterate id=userTeam name=IQSideMenuForm property=userTeams logic:equal name=toDoIssue property=teamId value=%= userTeam.getTeamId() % /logic:equal /logic:iterate Alternatively, if you used the Struts-EL library, it would look like this: logic-el:iterate id=userTeam name=IQSideMenuForm property=userTeams logic-el:equal name=toDoIssue property=teamId value=${userTeam.teamId} /logic-el:equal /logic-el:iterate -Original Message- From: Christine McLennan [mailto:[EMAIL PROTECTED]] Hello - This may be way out in left field but Is it possible for a jsp scriptlet to read a struts tag? For example - can you do this? (My goal here is to be able to have the value in the logic:equal tag to be dynamic instead of constant). logic:iterate id=userTeam name=IQSideMenuForm property=userTeams % String teamId = bean:write name=userTeam property=teamId filter=true/ ;% . . . logic:equal name=toDoIssue property=teamId value=%= teamId % . . /logic:equal /logic:iterate Or is there a better way to make the value in logic:equal to be dynamic? Your help is greatly appreciated. Chris McLennan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Struts/EJB (Yet another newbie question)
Hello, I am evaluating the usage of struts w/ JBOSS and have a design question: Firstly, I am keeping all my EJB interaction in my Action classes. One thing I am unsure of is what I should do on my ActionForward. That is, should I be placing my EJB directly into the session, or should I be re-populating some ActionForm w/ the values I received, or perhaps I should be creating regular Java Beans as value objects??? Take for instance a login example. My action interacts with an entity bean to authenticate the user. Shall I put the bean into the response? I've read this as a practice in some cases, but would really like some clarity? Or is it case driven? At any rate, when I try this approach in my JSP I always receive a ClassCastException. Any thoughts would be appreciated. Thanks, Rock - the newbie
RE: Struts/EJB (Yet another newbie question)
Excellent, thanks Jon. I've taken your advice and implemented a session façade in a stateless session bean, using a value object factory returning value objects as beans to my view layer. Works like a champ. Cheers. -Original Message- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: February 6, 2002 11:46 AM To: 'Struts Users Mailing List' Subject: RE: Struts/EJB (Yet another newbie question) Hi Rolan, Your app will scale best if you recreate the ref to the remote interface as required. You should not hold a handle to the actual ejb (unless you choose to use a statefull ejb). To do so would add to the session size. If you plan to deploy to a cluster, session size should not exceed approx 4k. If you don't plan to deploy to a cluster then this is not so important. Use stateless session ejbs in preference to statefull ejbs. Avoid interacting directly with entities, go via a stateless facade that returns a value object to the client (struts layer). Jon -Original Message- From: Roland Chan [mailto:[EMAIL PROTECTED]] Sent: 06 February 2002 15:08 To: [EMAIL PROTECTED] Subject: Struts/EJB (Yet another newbie question) Hello, I am evaluating the usage of struts w/ JBOSS and have a design question: Firstly, I am keeping all my EJB interaction in my Action classes. One thing I am unsure of is what I should do on my ActionForward. That is, should I be placing my EJB directly into the session, or should I be re-populating some ActionForm w/ the values I received, or perhaps I should be creating regular Java Beans as value objects??? Take for instance a login example. My action interacts with an entity bean to authenticate the user. Shall I put the bean into the response? I've read this as a practice in some cases, but would really like some clarity? Or is it case driven? At any rate, when I try this approach in my JSP I always receive a ClassCastException. Any thoughts would be appreciated. Thanks, Rock - the newbie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Another newbie question
Hi, I am having troubles running the hello-world app from the struts trail map at http://developer.bluestone.com. The basic directory setup is this hello-world \WEB-INF\ lib \ classes \ helloworld hello.jsp struts-bean.tld struts.jar HelloWorldResources.p. web.xml where HelloWorldResources.p = properties (just fitting on one line) I have one jsp, hello.jsp which just uses a bean:message to display a line from the properties file. Anyway, when ran in tomcat 3.2.1, I get the error 'cannot load servlet name: action'. This corresponds to my web.xml, which is just a normal descriptor. This error does not effect this simple example, but I think it is what is stuffing up my others. Any help on the cause/remedy of this? When running a sample logon app, I get errors such as could not find ActionBean and ActionForward etc All the example apps distributed with struts work fine. Any help appreciated. Thanks, Joel.
Re: Another newbie question
If all struts distributed examples work fine you do not need to worry. The Bluestone site can use old distribution. Take care about only struts examples. Understand how they work. JOEL VOGT wrote: Hi, I am having troubles running the hello-world app from the struts trail map at http://developer.bluestone.com. The basic directory setup is this hello-world \WEB-INF\ lib \ classes \ helloworld hello.jsp struts-bean.tld struts.jar HelloWorldResources.p. web.xml where HelloWorldResources.p = properties (just fitting on one line) I have one jsp, hello.jsp which just uses a bean:message to display a line from the properties file. Anyway, when ran in tomcat 3.2.1, I get the error 'cannot load servlet name: action'. This corresponds to my web.xml, which is just a normal descriptor. This error does not effect this simple example, but I think it is what is stuffing up my others. Any help on the cause/remedy of this? When running a sample logon app, I get errors such as could not find ActionBean and ActionForward etc All the example apps distributed with struts work fine. Any help appreciated. Thanks, Joel.
Re: Another newbie question
It's hard to tell from your message: is struts.jar in /WEB-INF/lib ? JOEL VOGT wrote: Hi, I am having troubles running the hello-world app from the struts trail map at http://developer.bluestone.com. The basic directory setup is this hello-world \WEB-INF\ lib \ classes \ helloworld hello.jsp struts-bean.tld struts.jar HelloWorldResources.p. web.xml where HelloWorldResources.p = properties (just fitting on one line) I have one jsp, hello.jsp which just uses a bean:message to display a line from the properties file. Anyway, when ran in tomcat 3.2.1, I get the error 'cannot load servlet name: action'. This corresponds to my web.xml, which is just a normal descriptor. This error does not effect this simple example, but I think it is what is stuffing up my others. Any help on the cause/remedy of this? When running a sample logon app, I get errors such as could not find ActionBean and ActionForward etc All the example apps distributed with struts work fine. Any help appreciated. Thanks, Joel.