• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Dynamic page content in first jsp page

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am trying to create login page with a selection box. Content of the selection box is dynamic, ie. I need an action class to generate the content for the selection. Most examples I read use a static jsp page that contains hard coded selection and username/password field.
I have tried to create an action class return the content of selection box. This action class is configured to forward user to login page. I have setup struts-config.xml with appropriate form-bean and action. However, when I type in the path pattern for <action> tags configured in struts-config.xml, I get 404 error. If i create a dummy .jsp page with a html form button with post action url pointing to the path pattern configured in struts-config.xml, everything works just fine.
Can someone give me a hint here?

Thanks
 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post the struts-config, web.xml and the URL that you are using?
 
SoonAnn Lim
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
###########################################
#app_types is an array of DTO, which is
#a collection of Javabean class.
##############################################
<form-beans>
<form-bean name="beanForm"
dynamic="true"
type="org.apache.struts.action.DynaActionForm">
<form-property name="app_types"
type="java.util.Collection" />
</form-bean>
</form-beans>
###########################################
<action-mappings>
<action path="/test/pattern/input"
type="test.action.InputAction"
name="beanForm"
scope="request">
<forward name="logininput" path="/logininputpage.jsp" />
</action>
</action-mappings>
###########################################
I do not edit web.xml. It is the default comes with Tomcate 4.

Regards,
 
There is no "i" in denial. Tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic