Jsf 1.2 problem

When i use jsf1.2 and when starting Tomcat it can't start applications with jsf1.2, but 1.1 webapps are started.
when using jsf 1.2 it shows like this
INFO: Installing web application at context path /c2 from URL file:D:/jakarta-to
mcat-5.0.28/webapps/c2
May 2, 2007 4:19:28 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
May 2, 2007 4:19:28 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
May 2, 2007 4:19:28 PM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors

I see you are using the DTD for servlet 2.3, you may want to try 2.5 (which uses schema instead). See the example below from the 2.5 specification:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
       http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd�
       version="2.5">
       <display-name>A Simple Application</display-name>
       <context-param>
           <param-name>Webmaster</param-name>
           <param-value>[email protected]</param-value>
       </context-param>
       <servlet>
           <servlet-name>catalog</servlet-name>
           <servlet-class>com.mycorp.CatalogServlet
               </servlet-class>
           <init-param>
               <param-name>catalog</param-name>
               <param-value>Spring</param-value>
           </init-param>
       </servlet>
       <servlet-mapping>
           <servlet-name>catalog</servlet-name>
           <url-pattern>/catalog/*</url-pattern>
       </servlet-mapping>
       <session-config>
           <session-timeout>30</session-timeout>
       </session-config>
       <mime-mapping>
           <extension>pdf</extension>
           <mime-type>application/pdf</mime-type>
       </mime-mapping>
       <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
            <welcome-file>index.html</welcome-file>
            <welcome-file>index.htm</welcome-file>
       </welcome-file-list>
       <error-page>
           <error-code>404</error-code>
           <location>/404.html</location>
       </error-page>
</web-app>
{code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Problem identified jsf component and problem of checkboxs

    hello,
    i have 2 questions:
    - 1
    I have a js function that show/don't show a tab when we chose yes/no on a SelectOneRadio:
    function display(fieldRadio,tabtohide)
    div = document.getElementById(tabtohide);
    if(fieldradio.value=='false')
    div.className='hide';
    else div.className='';
    I call this function in the radio component, like this:
    onclick="display(this,'tabid');" and it works very well.
    The problem is that i would like to replace 'this' by the id of the component (to call this function at another place).
    I'v tried the document.getElementById(JsfTagId); but it doesn't work with jsf tag.
    - 2
    I use a selectmanycheckbox like this:
    <h:selectManyCheckbox value="#{BeanDemandeur.type}" required="false">
    <f:selectItem itemValue="Nouvelleinstallation" itemLabel="Nouvelle installation"/>
    <f:selectItem itemValue="Mise�jour" itemLabel="Mise � jour"/>
    <f:attribute name="fieldRef" value="Type de demande"/>
    </h:selectManyCheckbox>
    In the bean, i use the variable type like this:
    private String[] type = new String[2];
    public String[] getType(){return type;}
    public void setType(String[] rr){type[0]=rr[0];type[1]=rr[1];}
    And finally, in th faces-config.xml:
    <managed-property>
    <property-name>type</property-name>
    <property-class>java.lang.String[]</property-class>
    <value/>
    </managed-property>
    But an error occured: Can't set managed bean property:'type';
    thx u for your help

    r u getting any connversion error !
    what is the error ru getting when u run the code

  • Regarding JSF Default action problem in IE

    Hi,
    I am using Jsf:Default action inside my submit button.In my form I have row of two buttons submit and reset.When I use my tab focus on reset button and when I am clicking enter submit default action is getting fired rather reset action.More over if I am using spacebar after tab focus reset button is called as expected.The problem identified is only with IE browsers
    In case of Mozilla,default action is overridden by tab focus action and working properly.
    Please advise me how to solve this issue in IE
    Note:The j4j:defaultAction custom component included in the j4j tag libraries allows you to define the default action for a form by adding <j4j:defaultAction /> as a child tag to the commandButton tag.
    http://www.jsftutorials.net/defaultActionTag.html
    Edited by: Ravishankar_R on Mar 24, 2010 12:09 AM

    Amit,
    Thanks for your answer. I fixed it using javascript .First I got all the buttons in the DOM and did a check to find if there is any current focus using document.activeElement.type="button" else to go with default submit action.
    Thanks,
    Ravi

  • JSF Custom Validator Problem

    Please help,
    I have written a handful of custom validators and I'm having a small problem with them. For some reason the validator will not display there message in a <h:message> tag. They do however display in a <h:messages> tag as long as the globalOnly attribute is set to false. I'm guessing this is being caused by the fact that the validators are not being registered properly with their parent components. My question is how do I accomplish registering the validator correctly with its parent component.
    Below is an example of one of the valiators and its use in the page.
    <c:form validationType="Server">
        <label>Phone Number</label>
        <h:inputText id="PhoneNumber">
         <c:validatePhoneNumber errorSummary="Please enter a valid Phone number" errorDetail="Blah"></c:validatePhoneNumber>
        </h:inputText>
        <h:message style="color: red" for="PhoneNumber" />
        <h:commandButton value="Submit"></h:commandButton>
    </c:form>
    public class PhoneNumberValidatorTag extends ValidatorTag {
      private static final long serialVersionUID = -3061371618875302020L;
      private final String validatorId = "jsf.validators.PhoneNumber";
      private String validationType;
      private String validateAgainst = PhoneNumberValidator.US;
      private String errorSummary = "";
      protected String errorDetail = "";
      public PhoneNumberValidatorTag() {
        setValidatorId( validatorId );
      public Validator createValidator() throws JspException {
        PhoneNumberValidator validator = ( PhoneNumberValidator ) super
            .createValidator( );
        FacesContext context = FacesContext.getCurrentInstance( );
        Application app = context.getApplication( );
        Util.doAssert( null != validator );
        UIComponentTag tag = UIComponentTag.getParentUIComponentTag( pageContext );
        UIComponent component = tag.getComponentInstance( );
        UIComponent parentForm = component;
        while ( !( parentForm instanceof HtmlForm ) ) {
          parentForm = parentForm.getParent( );
        ValidationHtmlForm vhf = ( ValidationHtmlForm ) ( ( HtmlForm ) parentForm );
        if ( "client".equalsIgnoreCase( vhf.getValidationType( ) ) ) {
          validator.setServerValidate( false );
        } else {
          validator.setServerValidate( true );
          if ( errorSummary != null ) {
            if ( UIComponentTag.isValueReference( errorSummary ) ) {
              validator.setErrorSummary( ( String ) app.createValueBinding(
                  errorSummary ).getValue( context ) );
            } else {
              validator.setErrorSummary( errorSummary );
          if ( validateAgainst != null ) {
            if ( UIComponentTag.isValueReference( validateAgainst ) ) {
              validator.setErrorSummary( ( String ) app.createValueBinding(
                  validateAgainst ).getValue( context ) );
            } else {
              validator.setErrorSummary( validateAgainst );
        return validator;
      public void release()
        super.release();
      public int doEndTag() throws JspException {
        FacesContext context = FacesContext.getCurrentInstance( );
        ResponseWriter writer = context.getResponseWriter( );
        try {
          UIComponentTag tag = UIComponentTag.getParentUIComponentTag( pageContext );
          UIComponent component = tag.getComponentInstance( );
          UIComponent parentForm = component;
          while ( !( parentForm instanceof HtmlForm ) ) {
            parentForm = parentForm.getParent( );
          ValidationHtmlForm vhf = ( ValidationHtmlForm ) parentForm;
          if ( "client".equalsIgnoreCase( vhf.getValidationType( ) )
              || "both".equalsIgnoreCase( vhf.getValidationType( ) ) ) {
            writer
                .write( StringUtil
                    .format(
                        "<script language='JavaScript'>"
                            + " formValidator.addValidator('{0}',new PhoneNumberValidator('{1}', PhoneNumberValidator.{2} ,'{3}'));"
                            + "</script>", new Object[] {
                            parentForm.getClientId( context ),
                            component.getClientId( context ), validateAgainst,
                            errorSummary } ) );
        } catch ( IOException e ) {
          e.printStackTrace( );
        return 1;
      � Getters and Setters removed to shorten code
    public class PhoneNumberValidator extends BaseValidator {
      private static final long serialVersionUID = -1925668990356710828L;
      public static final String US = "US";
      public static final String INTERNATIONAL = "INTERNATIONAL";
      public static HashMap REG = new HashMap( );
      static{
        REG.put( "US", "^\\(?\\d{3}\\)?(\\s|-)\\d{3}-\\d{4}$" );
        REG.put( "INTERNATIONAL",
            "^((\\+\\d(\\d)?)?(\\(\\d\\{3}?)))? \\d{3}?-\\d{4}$" );
      public PhoneNumberValidator() {
        super( );
      public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
        if ( !serverValidate )
          return;
        if ( value == null )
          return;
        if ( context == null || component == null )
          throw new NullPointerException( );
        String regex;
        if ( REG.containsKey( validateAgainst ) )
          regex = ( String ) REG.get( validateAgainst );
        else
          regex = ( String ) REG.get( US );
        Pattern pattern = Pattern.compile( regex );
        if ( !"".equals( value.toString( ).trim( ) )
            && !pattern.matcher( value.toString( ).trim( ) ).matches( ) ) {
          Object[] params = new Object[] { value };
          Locale locale = context.getViewRoot( ).getLocale( );
          String summary;
          if ( errorSummary == null )
            summary = Messages.getString(
                "resource.ValidationMessages", "badPhoneNumber",
                params );
          else
            summary = new MessageFormat( errorSummary, locale ).format( params );
          String detail;
          if ( errorDetail == null )
            detail = Messages.getString(
                "resource.ValidationMessages",
                "badPhoneNumber_detail", params );
          else
            detail = new MessageFormat( errorDetail, locale ).format( params );
          FacesMessage message = new FacesMessage( FacesMessage.SEVERITY_ERROR,
              summary, detail );
          throw new ValidatorException( message );
      public String getJavaScript() {
         � Method body removed to shorten post
    }I probably should also mention I overrode the HtmlForm tag so I could add an attribute to the tag that allows the developer to specify client, server, or both when they are choosing the valiation type they want to use.
    Thank you in advance for any help you can provide.
    Grape Ape

    I do not think what you want to do is possible with the standard panelGrid. The panelGrid sees each child (of the panelGrid) as 1 component. The childrens children are considered a part of the child.
    Heh, did I confuse you with that? You have probably already guessed that though.
    At one time, I considered creating a custom component like yours. One that would just allow rendering of it's children or not. I decided that it was easier and better to add the rendered attribute to each of my other custom components (since the functionality is already supported by UIComponent). All you have to do is add the rendered attribute to your TLD doc for each custom component and your component can now use the "rendered" attribute. Oh, and you'll have to call super.setProperties() in the component tag.
    All JSF standard components can use the rendered attribute.
    Let me know if you'd like me to explain things better or post some code examples.
    Hope this helps,
    CowKing

  • JSF & Data source Problem

    Hi all
    I wrote my first jsf-adf project as discussed in cue cards in developer 10.1.3 using sql server 2005 , I configed my oc4j and app module as discussed in "Developing Oracle ADF Business Components for a SQL Server Database " paper in the same release of jdeveloper but I have 2 problems
    1. when I Config my environment without adding data-source into data-source.xml
    I get jbo-30003,jbo-29000 and jbo-26066 errors in the ie
    2. If i define my customized data-source in data-source.xml I get this error:"Unable to create com.evermind.sql.DriverManagerDataSource "
    my data-source code is
    "<data-source
      class="com.evermind.sql.DriverManagerDataSource"
      name="SQLServerDS"
      location="jdbc/SQLServerCoreDS"
      xa-location="jdbc/xa/SQLServerXADS"
      ejb-location="jdbc/SQLServerDS"
      connection-driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
      username="sa"
      url="jdbc:microsoft:sqlserver://127.0.0.1:143;SelectMethod=cursor;User=sa;"
      inactivity-timeout="30""
    what should I do?
    by thanks
    Javaneh

    Hi
    I tried both of data sources which you explianed but the problem already exists:
    when I set the data source which you called global I received this error in the log window :
    May 29, 2006 9:42:30 AM com.evermind.server.XMLDataSourcesConfig parseRootNode
    INFO: Legacy datasource detected...attempting to convert to new syntax.
    May 29, 2006 9:42:30 AM com.evermind.server.XMLDataSourcesConfig createConfigFromLegacy
    WARNING: Exception processing legacy data source. Exception: Unable to instantiate com.microsoft.sqlserver.jdbc.SQLServerDataSource. Exception is:
         Missing class: com.microsoft.sqlserver.jdbc.SQLServerDataSource
         Dependent class: com.evermind.server.XMLDataSourcesConfig
         Loader: oc4j:10.1.3
         Code-Source: /E:/Programs/JDeveloper/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in boot.xml in E:\Programs\JDeveloper\j2ee\home\oc4j.jar
    This load was initiated at oc4j:10.1.3 using the Class.forName() method.
    The missing class is not available from any code-source or loader in the server.
    06/05/29 09:42:30 Error initializing server: Error instantiating default application at Unable to get ApplicationConfig for default : Error parsing data-sources config at file:/E:/Programs/JDeveloper/jdev/system/oracle.j2ee.10.1.3.34.12/embedded-oc4j/config/data-sources.xml: DataSourceConfigException: Unable to instantiate com.microsoft.sqlserver.jdbc.SQLServerDataSource. Exception is:
         Missing class: com.microsoft.sqlserver.jdbc.SQLServerDataSource
         Dependent class: com.evermind.server.XMLDataSourcesConfig
         Loader: oc4j:10.1.3
         Code-Source: /E:/Programs/JDeveloper/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in boot.xml in E:\Programs\JDeveloper\j2ee\home\oc4j.jar
    This load was initiated at oc4j:10.1.3 using the Class.forName() method.
    06/05/29 09:42:30 Fatal error: server exiting
    The missing class is not available from any code-source or loader in the server.
    Process exited with exit code 1."
    and when I set the data source which you called local
    I see Jbo-30003;Jbo-29000 & Jbo-26066 errors in IE
    I can't understand what is wrong
    By thanks
    Javaneh

  • JSF 1.1 - problem with overriding default messages with UTF8 ones

    Hi there,
    I'm stuck with JSF 1.1 for now (creating application that is to run on JBoss 4.0.x) and I've encountered a problem... My web application uses UTF8 encoding - so that's also encoding I need in my message bundle. I've created one - and here goes a problem. I need to put Polish special characters into a properties file of a bundle - so I do it with UTF escape notation:
    javax.faces.component.UIInput.REQUIRED=Warto\u009C\u00E6 dla pola {0} jest wymagana
    some.custom.message.CLOSED=zamkni\u0119taThe thing is - while custom messages are working properly, overriden javax.faces.component.UIInput.REQUIRED message is rendered on a page as four "strange" characters, suggesting that it was first interpreted as UTF, then parsed as some kind of an ASCII (ISO) encoding and then back to an UTF8 page...
    How to fix this?
    TIA,
    Wojtek

    IDE fooled me - it was smarter then I expected and properties editor was showing already decoded values, not raw content of file. It's working properly now

  • JDev 11g JSF design view problem

    Hi everyone
    I have a problem with JDev 11g
    whenever I'm trying to edit a jsf page the design view only shows the tag names like the image below
    [http://www.imgplace.com/viewimg134/241/9511g.png]
    this is only happens when editing jsf pages and everything is ok while editing jsp
    so why is this happening and how to fix it?
    thanks
    Edited by: user13266332 on Jul 23, 2010 10:09 PM

    Thanks for the link Shay Shmeltzer.
    but unfortunately that didn't help much
    i tried running jdev.exe with the console open and also enabled "Show Design Time Messages in Log" but i didn't get any error message
    also tried adding different libraries to project but the design view still doesn't render the tags.
    any other solution?

  • Hibernate-JSF session.get problem

    Hello,
    I use Hibernate+JSF.
    I open Hibernate session for each request and close it when the request is finished.
    For each logged user I keep userId, companyId and several more Ids.
    I have a userSession instance containing this data as well as several methods to get Hibernate objects related with user. For example, in order to get company object:
      public Company getActiveCompany()
        CompanyDAO companyDAO = new CompanyDAO();
        Company activeCompany = companyDAO.getCompany(activeCompanyId);
        return activeCompany;
      }The problem is araised in screen in which I show companies data.
    It seems like Hibernate has a problem of loading the same object more than once.
    For example, in Companies screen, the active company of a User is shown as well as a dropdown filled with companies. The dropdown has a converter named: CompanyConverter which returns a Company object for a given company id.
    When switching Company on the dropdown a "valueChangeActiveCompany" event is triggered and the new selected Company should be set to the User. The problem is that the Company object was already loaded to show the active Company on the top of the screen, and the data that is extracted from the converter seems to be empty . . .
    The code of the valueChanged is:
      public void valueChangeActiveCompany(ValueChangeEvent event)
        activeCompany = (Company)event.getNewValue();  // Here the object is empty . . . 
        log.info("Setting new Active Company: " + activeCompany +
                                            " for user: " + userSession.getUser());   
        try
          userSession.setActiveCompany(activeCompany);
        catch (HibernateException ex)
          FacesUtil.addErrorMessage("setup.company.view.error.changeCompany");
      }  This problem causes the value of the new active company not to be set, therefore it is not possible to switch between active Companies . . .
    Why Hibernate behaves weird when loading an object for the second time on the same session ?
    Is there a good way of solving this problem ?
    Guy.

    hi
    i had similar problem.
    i solved it but i dont know whether its the correct solution.
    i placed the magaed bean in the session scope
    in the first page i add a new variable and stored that value in the avtionlistener method. when i click on back button in the 3rd page i get the value which i stored in the first page and display the data.
    i hope this is ur problem. if this is the problem let me know i can send u the code snippet
    thnaks
    sreedevi

  • Tomahawk for jsf 1.2 problem with customizing treetable component

    hi,
    i've tried many times bu i've got no clue how to set custom icons in the tree. what i want to achieve is to display the server's local file system. however this component doesn't allow to explicit specify what the node type is (a directory or a file). as a result when it finds an empty directory entry, no icon is displayed. i googled a bit and i guess the project's documentation is not sufficient. any help appreciated. ofc if someone knows a better method (or a framework) to do the job, please let me know. thanks
    cheers

    r035198x wrote:
    You could store the value in the session and remove it when you need to use it.Thanks, r035198x. I tried that before and users from other Java forums suggest that I shouldn't do it this way as I am adding more codes than necessary to pass technically a value from one bean to another. Hence, I decided to follow their advice and went and created a generic bean that can be referenced by other beans for pages calculation. Some users also suggest using Dependency Injection (available for JSF 1.2) to try to accomplish the result I want. I've also read about this method in JSF 1.2 spec - but without much example, I'm pretty much in the dark as to how this work. Unfortunately, I've only been on JSF for the last 4 weeks so I'm still a newbie - please excuse any "dumb" questions I have asked on this forum so far...
    What I currently has working for me is moving the method to calculate the pages from mybean1 to mybean2. This means all I have to do now for the other beans (11 remaining) is passed a few parameters to mybean2's method that calculate pages.
    Edited by: icepax on 12/11/2009 18:27

  • Again JSF upload file problem.

    I am using My Faces to upload files. There is a way to limit the size of uploaded files.
    <filter>
            <filter-name>ExtensionsFilter</filter-name>
            <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
            <init-param>
                <param-name>uploadMaxFileSize</param-name>
                <param-value>7m</param-value>
            </init-param>
            <init-param>
                <param-name>uploadThresholdSize</param-name>
                <param-value>100k</param-value>
            </init-param>
        </filter>When I try to upload bigger than 7 MB file, I receive the following log.
    2007-05-23 13:58:20,796 [http-8080-Processor24] INFO org.apache.myfaces.component.html.util.MultipartRequestWrapper - user tried to upload a file that exceeded file-size limitations.
    org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because it's size exceeds allowed range
         at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:317)
         at org.apache.myfaces.component.html.util.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:70)
         at org.apache.myfaces.component.html.util.MultipartRequestWrapper.getParameter(MultipartRequestWrapper.java:151)
         at org.apache.myfaces.context.servlet.RequestParameterMap.getAttribute(RequestParameterMap.java:39)
         at org.apache.myfaces.context.servlet.AbstractAttributeMap.get(AbstractAttributeMap.java:87)
         at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getTreeStructureToRestore(HtmlResponseStateManager.java:181)
         at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreTreeStructure(JspStateManagerImpl.java:142)
         at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:181)
         at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:255)
         at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:113)
         at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
         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.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    By now, OK. Here comes the problem: The behavior of application is correct after this, which I can see from the rest of my log, BUT my browser continue to say that the request is being processed and that the page continues to load, which is not true, and I can not find where is the reason.
    Do you have any idea?

    Check this code if it is useful
    REPORT  ZSRK_046                                .
    DATA : FIR_FILE(512) VALUE '
    iltlvp01.t.st.corp\DE_Development\EP 6\Port\dept\Program Office\TEST.json'.
    TYPES: BEGIN OF TP_DATA_TAB,
           TEXT(512),
           END OF TP_DATA_TAB.
    DATA : DATA_TAB TYPE STANDARD TABLE OF TP_DATA_TAB,
           WA_DATA_TAB LIKE LINE OF DATA_TAB .
    DATA : WA(512).
    OPEN DATASET FIR_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF SY-SUBRC EQ 0.
      DO.
        READ DATASET FIR_FILE INTO WA.
        IF SY-SUBRC NE 0.
          EXIT.
        ENDIF.
        WA_DATA_TAB-TEXT = WA.
        APPEND WA_DATA_TAB TO DATA_TAB.
        CLEAR : WA_DATA_TAB, WA.
      ENDDO.
    ENDIF.
    LOOP AT DATA_TAB INTO WA_DATA_TAB.
      WRITE : / WA_DATA_TAB-TEXT.
    ENDLOOP.

  • JSF 1.2 - problem in IE - selectOneMenu loses tabIndex and focus

    I have a problem with selectOneMenuItem - only seems to occur in IE. Essentially when I'm tabbing through a screen in IE, once I get to the selectOneMenuItem, the tab order is lost and I'm no longer focused on any UI item. There are no a4j tags on the field.
    Does anyone have a workaround for this?
    Thanks

    I have a problem with selectOneMenuItem - only seems to occur in IE. Essentially when I'm tabbing through a screen in IE, once I get to the selectOneMenuItem, the tab order is lost and I'm no longer focused on any UI item. There are no a4j tags on the field.
    Does anyone have a workaround for this?
    Thanks

  • JSF 1.2 - Problem with passing page count to bean to create list

    I have this select option:
    <f:verbatim>Pages: </f:verbatim>
    <h:selectOneMenu id="selectPage" value="#{pageList.selectedPage}">
             <f:selectItems value="#{pageList.selectPages}" />
    </h:selectOneMenu>And the backing bean (called mybean2) for this is:
    private int pages;
    public void getPages(int Pages)
         this.pages = Pages;
    // getter methods
    public List<SelectItem> getSelectPages()
         selectPages = new ArrayList<SelectItem>();
            pages++;
            for (int i = 1; i > pages; i++) {
                 selectPages.add(new SelectItem(Integer.toString(i), Integer.toString(i)));
             return selectPages;
    public String getSelectedPage()
             return selectedPage;
    // setter methods
    public void setSelectPages(List<SelectItem> selectPages) {
            this.selectPages = selectPages;
    public void setSelectedPage(String selectedPage) {
             this.selectedPage = selectedPage;
    }The getPages method above gets the page count from mybean1.submit method. Thus, for example, when the submit method returns 30, how am I able to pass this value into the getSelectPages so I can dynamically created the number of pages

    r035198x wrote:
    You could store the value in the session and remove it when you need to use it.Thanks, r035198x. I tried that before and users from other Java forums suggest that I shouldn't do it this way as I am adding more codes than necessary to pass technically a value from one bean to another. Hence, I decided to follow their advice and went and created a generic bean that can be referenced by other beans for pages calculation. Some users also suggest using Dependency Injection (available for JSF 1.2) to try to accomplish the result I want. I've also read about this method in JSF 1.2 spec - but without much example, I'm pretty much in the dark as to how this work. Unfortunately, I've only been on JSF for the last 4 weeks so I'm still a newbie - please excuse any "dumb" questions I have asked on this forum so far...
    What I currently has working for me is moving the method to calculate the pages from mybean1 to mybean2. This means all I have to do now for the other beans (11 remaining) is passed a few parameters to mybean2's method that calculate pages.
    Edited by: icepax on 12/11/2009 18:27

  • [JSF 1.2] problem with c:forEach inside h:panelGrid

    I have a list of beans that I want to display in table of 3 columns, and let the rows increase according to the size of my list.
    The following code works as expected:
    <h:panelGrid columns="3">
         <c:forEach items="#{mylist}" var="row">
              <h:outputText value="#{row.name}" />
         </c:forEach>
    </h:panelGrid>This also works:
    <h:panelGrid columns="3">
         <c:forEach items="#{mylist}" var="row">
              <h:panelGroup>
         Name: <h:outputText value="#{row.name}" />
              </h:panelGroup>
         </c:forEach>
    </h:panelGrid>But when I put two outputText components inside the panelGroup I get duplicate ID in view error.
    Any suggestions?

    I have also seen something similar. Oddly enough, you seem to be able to explicitly specify an id, so something like this usually works:
    <h:panelGrid columns="3">
        <c:forEach items="#{mylist}" var="row" varStatus="rs">
            <h:panelGroup>
                <h:outputText id="alabel_${rs.index}" value="Name:" />
                <h:outputText id="avalue_${rs.index}" value="#{row.name}" />
            </h:panelGroup>
        </c:forEach>
    </h:panelGrid>However, I agree that this should not be needed if everything was working properly.
    Another case I have found that seems to be a bug is a JSF fragment like this:
    <h:form id="testForm">
      <h:panelGrid columns="3" columnClasses="rightColumnHeader, leftColumnHeader">
          <f:facet name="header">
         <h:outputFormat value="#{Bundle.listTest_title}" />
          </f:facet>
          <h:outputText value="Index$" />
          <h:outputText value="Index#" />
          <h:outputText value="Value" />
          <c:forEach items="#{testlist}" var="it" varStatus="is">
         <c:out value="${is.index}." />
         <h:outputText value="#{is.index}." />
         <h:outputText value="#{it}" />
          </c:forEach>
      </h:panelGrid>
    </h:form>Now the c:out tag manages to output is.index, but the h:outputText tag doesn't. Further testing shows that the varStatus variable is not available at all in #{} expressions, but only in ${} expressions, whereas the var variable is available in both. Seems like a bug, but maybe there is some reason for this behaviour??

  • JSF fragment reusability  - problem or normal behaviour ?

    Hi all,
    I have one bounded TF (let say TF_A) , consisting of one jsf fragment (let say, fragment A).
    From that TF, I am trying to run another TF (in the af:popup, as as static region) , which uses the same fragment A.
    But, when popup rises up, I am getting:
    oracle.jbo.InvalidOperException: JBO-35110: Nested BindingContainer of this type taskflows.fragment_APageDef is already included in this parent BindingContainer:....So, it is possible to use the same jsf fragment at the same time, in both TF ?
    If yes, then how ?
    Jdev 11.1.1.6

    No, this cannot be done, because my wrong design of jsf fragment.
    I added second TF as a region in the af:popup, which is part of fragment
    So, in the fragment's pageDef, there is TF binding which references second TF, which, in turn, contains the same fragment as a View activity.
    So, the question is - How to design both TF to use same fragment, but to have ability to call second TF in the af:popup ?
    The popup cannot be part of jsf fragment, because of TF binding in the pageDef...or can ?!?

  • A blank jsf encountered some problems

    hi
    All.
    I deployed a blank jsf application,but encountered some exceptions.
    The application 's download url is
    http://www.coreservlets.com/JSF-Tutorial/code/jsf-blank-myfaces-app.zip.
    Thanks for your help.
    Best regards.
    ===================================================
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet threw exception
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
         java.lang.Thread.run(Unknown Source)
    root cause
    java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
    If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
    A typical config looks like this;
    <listener>
    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>
         javax.faces.FactoryFinder.getFactory(FactoryFinder.java:93)
         javax.faces.webapp.FacesServlet.init(FacesServlet.java:91)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
         java.lang.Thread.run(Unknown Source)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.10 logs.
    Message was edited by:
    SpaceOfFrank

    hi
    All.
    I deployed a blank jsf application,but encountered some exceptions.
    The application 's download url is
    http://www.coreservlets.com/JSF-Tutorial/code/jsf-blank-myfaces-app.zip.
    Thanks for your help.
    Best regards.
    ===================================================
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet threw exception
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
         java.lang.Thread.run(Unknown Source)
    root cause
    java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
    If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
    A typical config looks like this;
    <listener>
    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>
         javax.faces.FactoryFinder.getFactory(FactoryFinder.java:93)
         javax.faces.webapp.FacesServlet.init(FacesServlet.java:91)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
         java.lang.Thread.run(Unknown Source)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.10 logs.
    Message was edited by:
    SpaceOfFrank

Maybe you are looking for

  • ITunes and Compilation issues

    Well, I think it's a problem many people have, but I have not been able to find a good answer. (Plus I am lazy, to be fair). I have a fairly big collection of Ministry of Sound albums (all of which are compilations of several artists). I have labelle

  • Creating data server for JMS Queues in ODI

    hi, I am trying to create data server for JMS Queues in ODI. I am getting following error: java.sql.SQLException: Cannot load connection class because of underlying exception: 'javax.jms.JMSException: Cannot find the Connection Factory (jms/QueueConn

  • PooledConnection

    Hi Guys I am using the oracle pooled connection datasource to create a pooled connection. My understanding was that the following statement: pooledconn = connectionPoolDS.getPooledConnection( ); actually establishes a physical connection and returns

  • [AIR] UI View Handeling

    Hello everyone, I am a new Flex and Air developer who loves to work with all the featers given by adobe to build small and large desktop application. I always used the viewStack component to show all my custom compontents in the application. For exam

  • IPhoto 08' Preferences Will Not Open

    Can not open iPhoto Preferences when selected from the iPhoto menu. Anyone experience this? Thanks, mark