Loading Collections in to DropDownList box using Struts with bean

Hi folks,
I am very new to struts.
I am developing one small web application using struts. I has developed Bussiness Logic, i need to use properly in struts.
ManufacturerList.java is a Bussiness Logic class using to load all manufacturer from the database. It using by the collection LinkedHashMap.
I need to use this BL in my struts application.
GOAL: In sturts application i need to add the car details, one of the property for car is manufacturer.
When creating the car, it should display all the manufacturer in the new student form.
Please explain how to create with struts.
Some of the Code i developed
{color:#ff0000}<html:form action="/Car?op=saveCar">
<html:errors/>
<html:hidden property="op" value="saveCar"/>
<html:hidden property="carCode"/>
Car Name <html:text property="model"></html:text> <br>
Manufacturer
<!-- Defining the bean for manufacturer list getting from the request-->
<bean:define id="mfrList" name="ManufacturerList" property="manufacturers"
scope="request"
type="java.util.Collection">
</bean:define>
<br>
Manufacturer Year <html:text property="yearOfManufacture"></html:text><br>
Date of Purchase <html:text property="dateOfPurchase"></html:text> <br>
<html:submit value="Ok" />
</html:form>{color}
This is code is not working properly.... Please explain

Hi i did like this
{color:#0000ff}<bean:define id="mfrList" name="ManufacturerList" {color}
{color:#0000ff}scope="request" {color}
{color:#0000ff}type="com.icalib.trafficSimulator.ManufacturerList">{color}
{color:#0000ff}</bean:define>{color}
{color:#0000ff}<html:select property="make">{color}
{color:#0000ff}<html:optionsCollection name="mfrList" label="mfrName" value="mfrCode"/>{color}
{color:#0000ff}</html:select>{color}
But the error is comming like thisjavax.servlet.ServletException: Cannot create iterator for 1:Honda
2:Maruti
3:Hyundai
4:Toyota
5:Accord
6:Test_mfr
7:test_mfr2
8:456
9:again
10:123
11:again1
What to give in the label and value in the optionsCollection                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Using Struts with JDeveloper, BC4J and OC4J 9.0.2

    Is it feasible to use Struts with JDeveloper 9.0.2, BC4J 9.0.2 and OC4J 9.0.2? We have an application that uses the BC4J JBO tags in version 9.0.2. We wish to use Struts and we want to retain the use of the JBO tags. Is there a way to do this without upgrading to 9.0.3?

    Here are two related questions:
    Can we upgrade to oracle9iAS 9.0.3 yet still use JDeveloper 9.0.2 and BC4J/JBO 9.0.2?
    Can we upgrade to JDeveloper 9.0.3 and BC4J/JBO 9.0.3 yet still deploy to oracle9iAS 9.0.2?

  • How I can use struts with uix jsp

    Hi,
    I want to use struts with uix jsp but I don't know how to set value of uix tag attribut by struts tag
    example :
    I want to change:
    <uix:globalHeader text="title" >
    by
    <uix:globalHeader>
    <bean:message key="title" arg0="Browse"/>
    </uix:globalHeader>
    N.B: I tried to use the tag <boundAttribute> but doesn't works
    Thanks in advance.

    Hi Ghazouani,
    From your sample code it looks like you are trying to use the Struts <bean:message> to provide internationalized text for the links in your globalHeader component. Couple of comments on this particular issue:
    - You'll need to add a <link> element to your globalHeader for each item that you want to display. So, instead of:
    <uix:globalHeader>
    <bean:message key="title" arg0="Browse"/>
    </uix:globalHeader>
    You'll want something which looks like this:
    <uix:globalHeader>
    <uix:link text="Browse"/>
    </uix:globalHeader>
    - If you want to bind the text for each link to some internationalized value which is pulled from a ResourceBundle, you should use the UIX JSP <bundle> data provider:
    <uix:bundle name="l10n" class="your.Bundle"/>
    <uix:globalHeader>
    <uix:link textBinding="title@l10n"/>
    </uix:globalHeader>
    In general when mixing JSP tags from different tag libraries, you need to be careful that you honor the semantics of each tag library. For example, in this particular case, the <uix:globalHeader> expects to have <uix:link> children - using any arbitrary tag (like <bean:message>) is not necessarily going to produce the desired results.
    As far as general UIX/Struts integration goes, we recommend using uiXML as a view for your Struts application. Check out the "Using uiXML with Struts" section of the UIX Developer's Guide for more info.
    Andy

  • Re: Announce: J2EE MVC training using Struts with Standard Tags (JSTL)   8/2 in NYC

    Standard J2EE MVC training using Struts with Standard Tags (JSTL)
    -We have done more Struts training than anyone. This class adds Standard Tag Libs (JSTL) with MVC and a portal discussion.
    Full Syllabus is at :
    http://www.basebeans.com/syllabus.jsp
    NYC on 8/2.
    This is the last week to sign up :
    http://www.basebeans.com/classReservation.jsp
    More dates(tentative):
    8/9 - Chicago downtown Marriott
    8/16 - Atlanta downtown Marriott
    8/23 - Austin downtown Marriott
    To keep up on upcoming MVC training sign up at:
    http://www.basebeans.com:8081/mailman/listinfo/mvc-programmers
    Hope to see you,
    Thanks,
    Vic
    Ps. 1: Set your newsreader such as Outlook Express or Netscape to news.basebeans.com for Open Standard news groups like JDO, Apache, SOAP, etc.
    Ps 2: The sample app will be available end of next week at:
    http://www.basebeans.com/downloads.jsp

    i have same problem with
    CLI130 Could not create domain, domain1
    then i try these things with PATH stuff but it haven't worked for me...
    then i tried to search windows registry for string domain1 and nothing found...
    then i searched my profile directory (on windowsxp c:\Documents and Settings\user on linux /home/user) for files that containd string domain1 and i found some .adadmin* files (as i remember there were 3 files) then i deleted them, try to install sun app server and it works for me... there are still some warnings but at least installation finishes and files were not deleted...
    i hope this help...
    for me it does

  • Can I use Struts with Oracle9i AS?

    I am not using Tomcat, so I am wondering can I use Struts with Oracle9i AS instead of Tomcat?
    Thanks for your help!

    Struts can be used with any J2EE compliant app server. It's not Tomcat specific in any way. You just have to deploy it properly.

  • Using Struts with Oracle Portal

    Hello,
    I am trying to run my applications developed using Struts Framework in Oracle Portal.Though Oracle Portal uses jpdk api's is there any way I can try to integrate Struts with Oracle Portal so that I can work test my application on any server and then develop portlet and run them on Oracle Portal as well?

    Check out these other discussions:
    Portletizing a struts JSP application
    Urgent: Portletizing an struts JSP application
    Similar but different detail:
    struts

  • Need Info about using Strut with WL 7.0

    I want to find out how to use it with WL 7.0. Would anyone give me any info about it? :) Thanks
              

    You could download and deploy "struts-example.war" from apache website.
              [That Struts 1.0.2 I think.]
              ---Nam
              Jordy wrote:
              > I want to find out how to use it with WL 7.0. Would anyone give me any info about it? :) Thanks
              And God said
              Let there be numbers
              And there were numbers.
              Odd and even created he them,
              He said to them be fruitful and multiply,
              And he commanded them to keep the laws of induction.
              [Bill Taylor [email protected]]
              [nam_nguyen.vcf]
              

  • Exception while using struts with jsf

    Hi
    Iam trying to integrate struts with jsf. when iam trying to load jsf page ...getting the following error
    Unable to initialize jsf interceptors probably due missing JSF implementation libraries
    Please help me to fix this .

    this is my web.xml
    <?xml version="1.0"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <display-name>appstruts2</display-name>
    <filter>
    <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    </web-app>

  • How do you use Struts with Jboss Portal

    I am trying to use strust with jboss portal but I am getting the following error:
    An error occured while rendering window 'default.MyPortlet2.myportlet2Window'
    org.apache.jasper.JasperException: Exception in JSP: /WEB-INF/jsp/SearchResultPage.jsp:71 68: List searchresult = (List) request.getAttribute("searchresult"); 69: %> 70: Stacktrace:
    I am getting this is in the log file
    Caused by: org.apache.jasper.JasperException: Exception in JSP: /WEB-INF/jsp/SearchResultPage.jsp:71
    68: List searchresult = (List) request.getAttribute("searchresult");
    69: %>
    70: <%
    71: for (Iterator itr=searchresult.iterator(); itr.hasNext(); )
    72: {
    73: testPackage.net.dao.hibernate.WorkList workList = (testPackage.net.dao.hibernate.WorkList)itr.next();
    74: %>
    Stacktrace:
    at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.jboss.portal.portlet.impl.jsr168.PortletRequestDispatcherImpl.execute(PortletRequestDispatcherImpl.ja
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.portal.server.servlet.CommandFilter.doFilter(CommandFilter.java:65)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
    at org.jboss.portal.portlet.impl.jsr168.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.ja
    ... 238 more
    Caused by: java.lang.NullPointerException
    at org.apache.jsp.WEB_002dINF.jsp.SearchResultPage_jsp._jspService(SearchResultPage_jsp.java:152)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
    ... 255 more

    I am trying to use strust with jboss portal but I am getting the following error:
    An error occured while rendering window 'default.MyPortlet2.myportlet2Window'
    org.apache.jasper.JasperException: Exception in JSP: /WEB-INF/jsp/SearchResultPage.jsp:71 68: List searchresult = (List) request.getAttribute("searchresult"); 69: %> 70: Stacktrace:
    I am getting this is in the log file
    Caused by: org.apache.jasper.JasperException: Exception in JSP: /WEB-INF/jsp/SearchResultPage.jsp:71
    68: List searchresult = (List) request.getAttribute("searchresult");
    69: %>
    70: <%
    71: for (Iterator itr=searchresult.iterator(); itr.hasNext(); )
    72: {
    73: testPackage.net.dao.hibernate.WorkList workList = (testPackage.net.dao.hibernate.WorkList)itr.next();
    74: %>
    Stacktrace:
    at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.jboss.portal.portlet.impl.jsr168.PortletRequestDispatcherImpl.execute(PortletRequestDispatcherImpl.ja
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.portal.server.servlet.CommandFilter.doFilter(CommandFilter.java:65)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
    at org.jboss.portal.portlet.impl.jsr168.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.ja
    ... 238 more
    Caused by: java.lang.NullPointerException
    at org.apache.jsp.WEB_002dINF.jsp.SearchResultPage_jsp._jspService(SearchResultPage_jsp.java:152)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
    ... 255 more

  • Using Struts with Oracle

    Hi
    I need to use the struts framework with oracle (10g express edition), I am using eclipse IDE. anyone please help me. I dont know how to set these up for use..

    Struts doesn't define anything for the data access layer.
    It helps you write MVC applications, and provides a translator between your view (jsp pages) and your model (action forms/actions), but once you get to that point its all standard java code.
    You have a few alternatives
    1 - write java classes to handle the data access layer: Data Access Objects (or DAOs) using standard java/jdbc.
    2 - Use a tool like hibernate to do your data layer handling.
    Struts itself though won't help at all with this.

  • HT1338 Hi I have a dell colour laser printer ref 3115 cn. I have tried to load driver etc so I can use it with my new Macbook Pro. Its won't let me do it. How do I do it?

    Hi I have a Dell colour laser printer ref 3115 cn. I have tried laoding the driver buy my MacBook Pro wont allow it?
    Any idea's?

    The Dell specifications indicate that this is a multifunction device.  The printing portion is supposed to be able to use either PostScript or PCL 6.  You should be able to use a generic color PostScript PPD or use the generic pxlcolor driver from OpenPrinting.org.  There is not much chance of getting scanning to work with OS X.
    The Gutenprint drivers will not provide what you need.  They only support balck and white printing for laser printers.
    Message was edited by: Matt Broughton

  • I get "An error occurred loading this content" when trying to use AirPlay with some iPhone videos

    When trying to stream video via Home Sharing AirPlay from the Horse Racing Now iPhone app or TwinSpires mobile site to my new third generation Apple TV, I get the error message
    An error occurred loading this content
    Try again later.
    The Apple TV seems to be playing everything else fine though. And I verified that the video is working on both sites. Any idea what's happening?

    When trying to stream video via Home Sharing AirPlay from the Horse Racing Now iPhone app or TwinSpires mobile site to my new third generation Apple TV, I get the error message
    An error occurred loading this content
    Try again later.
    The Apple TV seems to be playing everything else fine though. And I verified that the video is working on both sites. Any idea what's happening?

  • Using STRUTS with JDeveloper 9I

    Anybody having practical experience please provide the info that you think would be usefull for starting such project. STRUTS web pages have instructions for bunch of J2EE containers but nothing for Oracle Application Server.

    just found this thread
    BC4J MultipartRequestHandler is null

  • Write code for authentication of username and password using struts

    write code for authentication of username and password using session using struts with jdbc connection..

    write code for authentication of username and
    password using session using struts with jdbc
    connection..and please, allow me to spoon feed you!

  • Using Struts or Spring dilemma?

    HI all,
    just a query , if we want to create a huge application having around 100's of Enterprise Beans and JSP pages around 1000, which Framework one should choose or go for between Struts and Spring. I have worked on Struts it seems to be popular choice and stable. But don't even have a vague notion about Spring Framework.
    Wherein the application demands stability and performance enhancement.
    Avadhoot.

    Struts and Spring are two seperate frameworks , one can be used to implement View lyer using MVC and the other can contain all aspect of your application from the view to business and back end connection.
    you can use Struts with spring , int this scenario struts will be the View layer and spring framework will handle other stuff like DA , Mailing , Transaction , Secrity ,....
    I can say that :
    go with EJB for Business layer , Use struts for View
    and use netbeans 5 as IDE , it made developing ejb stuff too easy.

Maybe you are looking for

  • Flash Problem With Safari After Downloading Mountain Lion

    I'm getting a persistent "Shockwave Player Error" when launching or resetting Safari . . . posting here because I upgraded from Snow Leopard directly to Mountain Lion and that's when the problem began.  I have a circa 2010 Macbook Pro with 2.2 GHz In

  • Search Bug in iTunes 5.0

    Hi there, I've run into a very simple bug regarding the search function of the iTunes 5.0 Library, where the new filters don't work as expected. Here's an example: While viewing Library, type into the search box a couple of letters e.g. "kr". For me,

  • Monitor Integration process log in BPM

    Hi I am practising the following BPM /people/krishna.moorthyp/blog/2005/06/09/walkthrough-with-bpm and I wanted to know how to monitor integration process log in BPM. To monitor Integration process I logged, into transaction SXMB_MONI_BPE ->Process S

  • Bullets and list numbers do not render correctly in FF3

    althought bullets and list numbers in my project look fine in IE6 & 7, in FF2 & 3 they show at the left margin - any ideas about what's happening here or is it another "no work with FireFox" item ?

  • Family Sharing problem: Ask Permission Notifications

    Ask Permission Notifications are only showing up when I log onto my Macbook and not my iPhone. Is there something in my iPhone settings that is I have activated preventing me from getting these notifications?