problem?

2006-05-22 Thread Yang Sun

Hi,

I am using struts 1.2.9 for my project now. And for validating the user
input, I use DynaValidationForm and validation.xml to rule the user input.
At the client side (web page), I use the following code to show the error
information to the user.
   
   
   
   
   
   
   
   
   

But the error I got related to  tag, the error log said:
javax.servlet.jsp.JspException: ServletException in
'/WEB-INF/view/layouts/centerlayout.jsp': ServletException in
'/WEB-INF/view/user/login/login.jsp': Cannot find bean: "error" in any scope


From the document, I see that html:messages will put the error variable into

the page scope. But why bean:write cannot find the error variable?

I also have a simple test that I change the  to a constant
string, say "aaa". Then the output will be some aaa strings (depends on how
many errors detected). So I guess may be html:messages have not put the
error into the scope.

Please help me to have a look at it. Thanks.

Regards,
Yang


Re: problem in tiles

2006-04-09 Thread Yang Sun
I think you should add an action in the action-mappings section for
loginPage action. You request have not been processed by tiles yet.

// Yang

On 4/9/06, Ahmed Hashim <[EMAIL PROTECTED]> wrote:
>
> what is wrong with this configuration?
> 
>  Configuration 1.2//EN" "
> http://struts.apache.org/dtds/struts-config_1_2.dtd
> ">
>
> 
>   
>
>   
>   
>   
>   
>
>   
>   
>
>   
>
>
>   
>/>
>
>/>
>
> 
>  
>   
>   
>   
>   
>
> 
>
>
> 
>  Tiles
> Configuration 1.1//EN" "
> http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd";>
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
>
> 
> http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"; version="2.4"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
>   
> action
> org.apache.struts.action.ActionServlet
> 
>   config
>   /WEB-INF/struts-config.xml
> 
> 
>   debug
>   3
> 
> 
>   detail
>   3
> 
> 2
>   
>   
> action
> *.do
>   
>
> 
>
> when i try to request http://localhost:8080/Evote/loginPage.do i got the
> message SEVERE: Invalid path /loginPage was requested
>
> what do you think the problem?
>
> --
> In Life, it doesn't matter who you are, but whether someone appreciates
> you
> for what you are, accepts you and loves you unconditionally. A Real Friend
> (
> Friendship ) is one who walks in when the rest of the world walks away.
>


Re: Filter mapping to URL

2006-04-09 Thread Yang Sun
Hi, Chuanjiang:

I am not very clear on your question. But in general, if you have something
difficult to use the built-in authentication method, you can overwrite the
processRoles() method in your customized RequestProcessor and register your
processor with the actionservlet in the configuration file.

In that way, you can get the most flexibility.

Regards,
Yang Sun

On 4/9/06, chuanjiang lo <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I have a module (/module) with three functions
> For e.g.
> Function a -> module/functiona.do
> Function b - > module/functionb.do
> Function c -> module/functionc.do, module/functionc1.do
>
> I have two roles, say Role A can access the whole module. Role B can onl
> access Function C
>
> For Role A, the URL pattern would be
> /module/*
>
> For Role B,
> module/functionc.do, module/functionc1.do
>
> However seems like Role B has already been block by the URL mapping
> specificied for Role A.
>
> Appreciate any inputs.
>
>


Re: Struts newbee

2006-04-09 Thread Yang Sun
Hi, Wang Zeng:

I think what Ted said is one way to transfer ActionFrom data to the business
object.

And you can get a detailed description on other ways to transfer ActionForm
data
to the business object and pros and cons of each ways by reading charpter 5
of the
book <>.

Regards,
Yang


On 4/9/06, 王曾wang_zeng <[EMAIL PROTECTED]> wrote:
>
> hi,Ted
>   Do you mean in your solution that one bean is not only action form
> bean,but also a business object? Because it extends ActinForm and
> implement
> business object interface.
>
>
> 2006/4/6, Ted Husted [EMAIL PROTECTED]:
> >
> >  If the beans you want to "nest" are being passed to the business
> > logic (often *not* recommended), one solution would be to define
> > interfaces for the business logic beans (if they don't have them
> > already) and then have your ActionForm implement one or more of those
> > interfaces. To pass the ActionForm along, pass it under the business
> > logic interface.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>