Pre-populate html:select box within a Login page.
1 posts in topic
Flat View  Flat View

Posted By:   Chris_Lyles
Posted On:   Thursday, June 26, 2003 11:05 AM

I’m new to struts and I’m still piecing some parts together.

I would like to pre-populate an html:select box within a login page. Because this is the very first page being displayed, I’m not sure if any actions can be called by the framework. I’ve created an Action and Form objects with simple validation and forwarding actions. But, I need to have the select box populated before anyone can login. This information will need to come from the database, but for now, I would like to retrieve it from within the Struts framework…Action/Form/CustomTag.

Can someone help?


Re: Pre-populate html:select box within a Login page.

Posted By:   Steve_Raeburn  
Posted On:   Thursday, June 26, 2003 11:25 PM

You can call an action directly if you need to e.g. /login.do

If you need to access the login page via the servlet container's welcome page you can set up a JSP that redirects(or forwards) to your login action

If your configured welcome page is index.jsp, then in that JSP you can add:

<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>

You could even use http-equiv="refresh" in a static html file


About | Sitemap | Contact