struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <ahardy.str...@cyberspaceroad.com>
Subject Re: FAQ (Passing Variables Between Actions); But, Stuck and Need Help
Date Fri, 07 Nov 2003 12:07:30 GMT
On 11/06/2003 09:02 PM Caroline Jen wrote:
> I think I am going for the first method that you
> suggested - create a user bean and store it in a 
> session object at login.  My concern is that I use
> container managed authentication at login.  After the
> container does its job, is there any way other than
> using an Action that delegates the business tier to
> search the database and obtain the value of
> field_of_specialization?  If an action has to be
> involved at this point to form a session object, does
> it suffer the the disadvantage of being overwritten if
> the user has more than one browser window opened?

If you include a method call in all your actions to check whether the 
user is logged in, and then whether the session bean exists already, you 
can determine whether to create the bean or not each time. This won't be 
affected by the number of browser windows open, since you will only 
create the user bean once.

> at the problem -  I provide a buttion in editor's
> page, which is a JSP tile:
> 
> <req:isUserInRole role="editor">
> <html:form action="/do/editor/Category">
> <html:submit>View Articles</html:submit>
> </html:form>
> </req:isUserInRole>
> 
> If the button is clicked, I attempt to use an Action
> (via the path /editor/Category) to search the database
> for the field_of_specialization.  However, I got this
> message in the browser:
> 
> [ServletException in:/article/content/menu.jsp] Cannot
> retrieve mapping for action /do/editor/Category'
> 
> and in my struts-config.xml
> 
> <action 
>     path="/editor/Category"
> type="org.apache.artimus.article.EditorViewAction">
>     <forward
>         name="success"
>         path="/menu/Find"/>
> </action>

Sorry but I can't see why that problem should occur from the info you 
give. Maybe if you start a new thread with a relevant subject title for 
this then somebody may be able to help. If you could specify exactly 
when or which page causes the error, it might help too.

Adam

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


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message