You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Joey Watson <jo...@gmail.com> on 2006/02/20 18:14:08 UTC

Problem about first page.

Hi everybody.

I want to write a login module.
login.jsp    -----display userId , userName, password, company
infomation (a drop down box)
 LoginAction.java ----check login information
 LoginForm.java  --
some command class.  ----one of them will load company information from db.

When user open web site. the login page will be displayed. user need
to fill name, id, password and select a company from a drop down box.
So I need to load company list from before login page displayed. I
want to do this in Action class (it will call a command class). but my
problem is login.jsp is defined as   <welcome-file-list>  in web.xml .
So before it is been created . onliy ActionForm would be create, the
Action Class doesn't be created. and I don't want to do the load
comany actions in ActionForm. So my question is how could I can make
Action class to be create and do load actions before the login.jsp be
displayed.

Thanks..
Joey

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


Re: Problem about first page.

Posted by Joey Watson <jo...@gmail.com>.
Thanks  Bryan and Michael. I have solved this problem.
Thanks you very much.

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


Re: Problem about first page.

Posted by Michael Jouravlev <jm...@gmail.com>.
On 2/20/06, Joey Watson <jo...@gmail.com> wrote:
> Or I think maybe many project would meet this kind of quesition. Just
> want to know how to deal with it when you need to display some
> information loaded from db in you first page.

Define a startup  JSP page in web.xml. Redirect from it to an action
that actually does something.

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


Re: Problem about first page.

Posted by Joey Watson <jo...@gmail.com>.
Or I think maybe many project would meet this kind of quesition. Just
want to know how to deal with it when you need to display some
information loaded from db in you first page.


On 2/21/06, Joey Watson <jo...@gmail.com> wrote:
> yes. I think it is a good idea. but I don't know to do it. I can make
> a jsp page as welcome page, but how could I make it can forward to
> Login.jsp automatically. user don't need to click a link or a button.
>
> On 2/21/06, Bryan LaPlante <br...@xoscript.org> wrote:
> > Could you make you welcome page different than login.jsp and have it forward
> > to login.jsp? If login is your front door, maybe all of your welcome pages
> > could forward to it.
> >
> > ----- Original Message -----
> > From: "Joey Watson" <jo...@gmail.com>
> > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > Sent: Monday, February 20, 2006 12:14 PM
> > Subject: Problem about first page.
> >
> >
> > > Hi everybody.
> > >
> > > I want to write a login module.
> > > login.jsp    -----display userId , userName, password, company
> > > infomation (a drop down box)
> > >  LoginAction.java ----check login information
> > >  LoginForm.java  --
> > > some command class.  ----one of them will load company information from
> > db.
> > >
> > > When user open web site. the login page will be displayed. user need
> > > to fill name, id, password and select a company from a drop down box.
> > > So I need to load company list from before login page displayed. I
> > > want to do this in Action class (it will call a command class). but my
> > > problem is login.jsp is defined as   <welcome-file-list>  in web.xml .
> > > So before it is been created . onliy ActionForm would be create, the
> > > Action Class doesn't be created. and I don't want to do the load
> > > comany actions in ActionForm. So my question is how could I can make
> > > Action class to be create and do load actions before the login.jsp be
> > > displayed.
> > >
> > > Thanks..
> > > Joey
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>

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


Re: Problem about first page.

Posted by Bryan LaPlante <br...@xoscript.org>.
here you go.
http://java.sun.com/products/jsp/tags/11/syntaxref11.fm9.html

----- Original Message -----
From: "Joey Watson" <jo...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, February 20, 2006 12:38 PM
Subject: Re: Problem about first page.


> yes. I think it is a good idea. but I don't know to do it. I can make
> a jsp page as welcome page, but how could I make it can forward to
> Login.jsp automatically. user don't need to click a link or a button.
>
> On 2/21/06, Bryan LaPlante <br...@xoscript.org> wrote:
> > Could you make you welcome page different than login.jsp and have it
forward
> > to login.jsp? If login is your front door, maybe all of your welcome
pages
> > could forward to it.
> >
> > ----- Original Message -----
> > From: "Joey Watson" <jo...@gmail.com>
> > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > Sent: Monday, February 20, 2006 12:14 PM
> > Subject: Problem about first page.
> >
> >
> > > Hi everybody.
> > >
> > > I want to write a login module.
> > > login.jsp    -----display userId , userName, password, company
> > > infomation (a drop down box)
> > >  LoginAction.java ----check login information
> > >  LoginForm.java  --
> > > some command class.  ----one of them will load company information
from
> > db.
> > >
> > > When user open web site. the login page will be displayed. user need
> > > to fill name, id, password and select a company from a drop down box.
> > > So I need to load company list from before login page displayed. I
> > > want to do this in Action class (it will call a command class). but my
> > > problem is login.jsp is defined as   <welcome-file-list>  in web.xml .
> > > So before it is been created . onliy ActionForm would be create, the
> > > Action Class doesn't be created. and I don't want to do the load
> > > comany actions in ActionForm. So my question is how could I can make
> > > Action class to be create and do load actions before the login.jsp be
> > > displayed.
> > >
> > > Thanks..
> > > Joey
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>



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


Re: Problem about first page.

Posted by Joey Watson <jo...@gmail.com>.
yes. I think it is a good idea. but I don't know to do it. I can make
a jsp page as welcome page, but how could I make it can forward to
Login.jsp automatically. user don't need to click a link or a button.

On 2/21/06, Bryan LaPlante <br...@xoscript.org> wrote:
> Could you make you welcome page different than login.jsp and have it forward
> to login.jsp? If login is your front door, maybe all of your welcome pages
> could forward to it.
>
> ----- Original Message -----
> From: "Joey Watson" <jo...@gmail.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Monday, February 20, 2006 12:14 PM
> Subject: Problem about first page.
>
>
> > Hi everybody.
> >
> > I want to write a login module.
> > login.jsp    -----display userId , userName, password, company
> > infomation (a drop down box)
> >  LoginAction.java ----check login information
> >  LoginForm.java  --
> > some command class.  ----one of them will load company information from
> db.
> >
> > When user open web site. the login page will be displayed. user need
> > to fill name, id, password and select a company from a drop down box.
> > So I need to load company list from before login page displayed. I
> > want to do this in Action class (it will call a command class). but my
> > problem is login.jsp is defined as   <welcome-file-list>  in web.xml .
> > So before it is been created . onliy ActionForm would be create, the
> > Action Class doesn't be created. and I don't want to do the load
> > comany actions in ActionForm. So my question is how could I can make
> > Action class to be create and do load actions before the login.jsp be
> > displayed.
> >
> > Thanks..
> > Joey
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Re: Problem about first page.

Posted by Bryan LaPlante <br...@xoscript.org>.
Could you make you welcome page different than login.jsp and have it forward
to login.jsp? If login is your front door, maybe all of your welcome pages
could forward to it.

----- Original Message -----
From: "Joey Watson" <jo...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, February 20, 2006 12:14 PM
Subject: Problem about first page.


> Hi everybody.
>
> I want to write a login module.
> login.jsp    -----display userId , userName, password, company
> infomation (a drop down box)
>  LoginAction.java ----check login information
>  LoginForm.java  --
> some command class.  ----one of them will load company information from
db.
>
> When user open web site. the login page will be displayed. user need
> to fill name, id, password and select a company from a drop down box.
> So I need to load company list from before login page displayed. I
> want to do this in Action class (it will call a command class). but my
> problem is login.jsp is defined as   <welcome-file-list>  in web.xml .
> So before it is been created . onliy ActionForm would be create, the
> Action Class doesn't be created. and I don't want to do the load
> comany actions in ActionForm. So my question is how could I can make
> Action class to be create and do load actions before the login.jsp be
> displayed.
>
> Thanks..
> Joey
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>



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