Unusual using jsf with own servlet

Hi, it will be useful for me within my javax.servlet.Servlet class implementation I use JSF for printing output to my ServletResponse.
What I must to do for it?
thanks for suggestions.

The simplest thing would be to forward to or include the appropriate URL that is handled by JSF. If for some reason this is not acceptable you might want to take a look at the implementation of the FacesServlet. But I would encourage you to pursue the forwarding/including solution first as it will be less fragile.

Similar Messages

  • Using jsf with struts

    hi;
    i am trying to understand the proper architecture when using jsf and struts together.
    i think i understand the differences between the technologies . it seems to me that instead of justifying jsf there should be a focus on how the two technologies actually collaborate.
    specifically, i would like to know or see examples of things like replacing the view portion of struts and plugging in the jsf framework instead or how to i replace the struts actions with jsf commands or maybe they are totally different things.
    where can i get information like this?
    thanks.

    At present, i think the best thing to do is to look at the example provided with the struts-faces integration taglib. I don't know any documentation about it.
    http://cvs.apache.org/builds/jakarta-struts/nightly/struts-faces/

  • Extending EP6 with own Servlet and URL /irj/MyServlet

    Hello,
    I am working on a migration of a Servlet from IBM WebSphere Portal 5.0 to SAP EP6.0. The Servlet is an extension to the Portal and is manually deployd and not with an ear or war file.
    Is it possible to extend the portal with my own servlet accessible with "/irj/MyServlet"?
    I tried to copy the jars to one of the directories
    server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\lib
    server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\lib
    server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\system\lib
    and added my Servlet to the web deployment descripter
    server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\web.xml
         <servlet>
              <servlet-name>MyServlet</servlet-name>
              <display-name>MyServlet</display-name>
              <servlet-class>com.mycompany.MyServlet</servlet-class>
              <init-param>
                   <param-name>ServletMode</param-name>
                   <param-value>normal</param-value>
              </init-param>
            <load-on-startup>1</load-on-startup>
         </servlet>
          <servlet-mapping>
             <servlet-name>MyServlet</servlet-name>
             <url-pattern>/MyServlet/*</url-pattern>
          </servlet-mapping>
    I also tried to modify the jar file in the same manner
    server0\apps\sap.com\irj\servlet_jsp\irj\epbc.war
    All this does not work.
    Does somebody has experience with extending the SAP EP6 portal?
    Greetings, Bernd.

    Maybe its  possible, but it is not recommended to do so.
    However it does not make to much sense.
    Just run your servlet as a portal compoent with an entry as native-Servlet in the pc descriptor.
    Thats a 5 minute trip.

  • How to use ODBC with XSQL servlet??

    I want to use VB6.0 to get result from XSQL Servlet. What can I do with it?
    Any help will be grateful.
    Regards,
    Kelly Chen

    Hi,
    Perhaps you can create your own trust manager. I've found this example in another newsgroup: (please note that this example trusts everyone, but you can modify the trust manager as you wish)
    if (putUrl.startsWith("https"))
      //set up to handle SSL if necessary
      System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
      System.setProperty("javax.net.debug", "ssl,handshake,data,trustmanager");
      Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
      //use our own trust manager so we can always trust
      //the URL entered in the configuration.
      X509TrustManager tm = new MyX509TrustManager();
      KeyManager []km = null;
      TrustManager []tma = {tm};
      SSLContext sc = SSLContext.getInstance("ssl");
      sc.init(km,tma,new java.security.SecureRandom());
      SSLSocketFactory sf1 = sc.getSocketFactory();
      HttpsURLConnection.setDefaultSSLSocketFactory (sf1);
    m_url = new URL (putUrl);
    class MyX509TrustManager implements X509TrustManager {
    public boolean isClientTrusted(X509Certificate[] chain) {
      return true;
    public boolean isServerTrusted(X509Certificate[] chain) {
      return true;
    public X509Certificate[] getAcceptedIssuers() {
      return null;
    }Hope this helps,
    Kurt.

  • Using iPlanet with XSQL Servlet

    Anyone have any information on how to configure the XSQL Servlet to work with iPlanet?
    TIA

    It won't work because iPlanet 4.1 has a broken implementation of the Servlet API's getRealPath() method, the method that XSQL Servlet uses to resolve virtual paths into absolute paths.
    I just debugged a complaint that it didn't work with iPlanet this week and this was the result I found.
    Their path resolution works for their own JSP implementation, but not for any other servlet.

  • Best Practices for Using JSF with AJAX - BluePrints OR Ajax4Jsf ?

    I am a newbie to AJAX4JSF . I think it provides Rapid Application Development (RAD) just by using tags like a4j: without the need to develop complex JSF Custom Components as shown in BluePrints Catalog
    https://bpcatalog.dev.java.net/ajax/jsf-ajax/
    I understand the purpose of developing JSF Custom components as Reusable for using with AJAX. But its complex and requires lot of coding i.e. PhaseListeners and Managed Beans. There should be easy way to do this especially our project needs RAD tool like AJAX4JSF.
    Any suggestions will be highly appreciated
    Regards
    Bansi

    Bansi, you are trying to compare orange-to-apple. Blue print catalog is a historical retrospection about what people thought about AJAXifying JSF in the past. Currently, the playground has been moved to the jsf-extension project. Look for DynaFaces there.

  • Use JSF with Portlet JSR 168 Specification

    Hi
    I need to know.... is possible run JSF application with Portlet Specification JSR 168, using Pluto Portal and Apache Tomcat ???
    Best Regards
    Mauricio

    Hi,
    the Apache Jetspeed2 - Project has a bridge,
    that is designed to work with MyFaces.
    http://cvs.apache.org/viewcvs.cgi/jakarta-jetspeed-2/portals-bridges/myfaces/
    Hope it helps you.
    Regards,
    Matthias

  • Install and use fobs4jmf with own program

    Hey, I've installed fobs4jmf on my machine using the instructions at http://fobs.sourceforge.net/f4jmf_first.html - adding $FOBS_HOME/fobs4jmf.jar to classpath, fobs4jmf.dll to windows/system32, and adding the stuff in jmf registry.
    Both the fobs play and jmplayer seem to work fine with it, oppening a load of files it wouldn't touch before. but my own media player code and the custom gui player from http://java.sun.com/products/java-media/jmf/2.1.1/solutions/CustomGUI.html still won't open a load of files, including some of the ones the fobs player and jmplayer will.
    I've tried replacing jmf.properties in $JMF_HOME/lib/ with the jmf.properties in $FOBS_HOME/ but it doesn't seem to change anything.
    Can someone tell me where I'm going wrong? Thanks,
    Christopher

    ohhkayyy... mysteriously working now. gotta love the windows "reboot fixes everything".

  • Saving a file in JSF with a servlet

    Okay, here is essentially what I'm doing right now:
    1. The user selects some data that they want to export (save) to a file and enters a filename into a text box.
    2. The user then clicks an 'Export' button and a controller action is invoked that puts the filename and the data (as a String) into the http session.
    3. On success, the controller returns a successForServlet string which a navigation rule defined in faces-config looks at and sends the page to an ExportToFile.jsp page.
    4. All this jsp page does is to forward the request to my servlet.
    5. The servlet picks up the filename and data from the http session and sets up the appropriate response. This causes a 'Save' dialog to be prompted to the user so that they can choose a location and such.
    6. The user clicks save and the file is saved to disk.
    This all works wonderfully. BUT, here is the problem...I am now out of JSF's scope since the nav rule sent the request (ultimately) to a servlet. The page that the user was on is now stale and they have to click a menu item or something to get back into JSF scope. So, what now? I've tried a few things that I won't mention here until I see what kind of suggestions I get from you guys. Thanks to anyone that can help me out. Lance.

    I may not be understanding you correctly (this is very new to me), but I tried your suggestion to no avail. As I understood it, you were suggesting that I put this into my servlet. I did so in a finally block in my doPost() method. Here's the code:
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    String methodName = "doPost";
    log_.entry(methodName);
    try {
    // Get a session-scoped value
    HttpSession session = request.getSession();
    String exportFileName = (String) session.getAttribute( "ExportEntityFileName" );
    String exportString = (String) session.getAttribute( "ExportEntityText" );
    response.setHeader("Pragma", "No-cache");
    response.setDateHeader("Expires", 0);
    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Content-Disposition", "attachment; filename=" + exportFileName + ".txt");
    response.setHeader("Context-Type", "text/html");
    response.getOutputStream().write(exportString.getBytes());
    } catch (Exception e) {
    log_.error(e.toString());
    } finally {
    HttpSession session = request.getSession();
    session.setAttribute("ExportEntityFileName", null);
    session.setAttribute("ExportEntityText", null);
    response.getOutputStream().close();
    session.getServletContext().getRequestDispatcher("/appPanels/utilities/BcfExport.jsp");
    log_.exit(methodName);
    Something about this line:
    session.getServletContext().getRequestDispatcher("/appPanels/utilities/BcfExport.jsp");
    ...didn't look right, so I tried this also:
    session.getServletContext().getRequestDispatcher("/appPanels/utilities/BcfExport.jsp").forward(request, response);
    ...but that was no help either. Any more suggestions out there? I can't believe that this isn't being done by others. I mean, saving a file to disk!?!?!?!? It sounds rather elementary.
    Thanks for any suggestions.

  • Using jFreeCharts with JSP-Servlet Web App

    Can someone please help me to get started on using the jFreeCharts in mt JSP Servlet we app? So far I have this in my servlet but I do not know what to do from here.
    protected void doPost(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException {
    //          create a dataset...
              double[][] data = new double[][] {
              { 1.0, 4.0, 3.0, 5.0, 5.0, 7.0, 7.0, 8.0 },
              { 5.0, 7.0, 6.0, 8.0, 4.0, 4.0, 2.0, 1.0 },
              { 4.0, 3.0, 2.0, 3.0, 6.0, 3.0, 4.0, 3.0 }
              //DefaultCategoryDataset dataset = new DefaultCategoryDataset(data);
              //return DatasetUtilities.createCategoryDataset("Series ", "Factor ", data);
              CategoryDataset dataset = DatasetUtilities.createCategoryDataset("Series ", "Factor ", data);
              JFreeChart chart = ChartFactory.createBarChart(
         "Bar Chart Demo 2", // chart title
         "Category", // domain axis label
         "Score (%)", // range axis label
         dataset, // data
         PlotOrientation.HORIZONTAL, // orientation
         true, // include legend
         true,
         false
         }

    the JFreeChart documentation has examples doing just that.
    And if you don't know how to get a browser to call some resource from some html you should get a beginner's tutorial to html.

  • How to use JNI with Servlets

    Hi
    i was trying to do some example with JNI. I can use JNI with standalone Java application but I just cannot figure out how I can use JNI with Servlet.
    Can some one show me a sample code using JNI with Servlets.
    thanks very much

    hi,
    I am also facing the same problem,
    when I am using JNI with stand alone application it works fine but when i tried to use it with a servlet It gives unsatisfied linker error
    stack: java.lang.UnsatisfiedLinkError: createSocket
         at RelayConnector.createSocket(Native Method)
         at RelayServlet.doGet(RelayServlet.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:891)
         at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:458)
    It seems i have to do some path settings in my iplenet web server.
    If some one have faced the problem i would be glad to know the solution for this, i am literally bugged up,....

  • Navigation issue using jsf, tiles, tomahawk  :loosing faces context

    Hi all,
    I enhanced my webapp using tomahawks jscookmenu.
    Triggering 1 menuItem the wanted pages displays correctly but the next click anywhere in the application shows this error:
    org.apache.jasper.JasperException: javax.faces.FacesException: Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml configuration fileand if you are accessing your jsf-pages through the correct mapping. E.g.: if your FacesServlet is mapped to  *.jsf (with the <servlet-mapping>-element), you need to access your pages as 'sample.jsf'. If you tried to access 'sample.jsp', you'd get this error-message.The web config is like that:
    <?xml version="1.0"?>
    <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_4.xsd"
         version="2.4">
         <context-param>
              <description>Tiles MyFaces Config</description>
              <param-name>tiles-definitions</param-name>
              <param-value>/WEB-INF/tiles.xml</param-value>
         </context-param>
         <context-param> 
              <param-name>javax.faces.DEFAULT_SUFFIX</param-name> 
              <param-value>.jsp</param-value>
         </context-param>
         <context-param>
              <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
              <param-value>server</param-value>
         </context-param>
         <context-param>
              <param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name>
              <param-value>off</param-value>
         </context-param>
         <!-- context-params mafaces -->
         <context-param>
              <param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.RENDER_VIEWSTATE_ID</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.STRICT_XHTML_LINKS</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.CONFIG_REFRESH_PERIOD</param-name>
              <param-value>this is a bug in myfaces</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
              <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name>
              <param-value>/faces/myFacesExtensionResource</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
              <param-value>false</param-value>
         </context-param>
         <!-- StartupServletContextListener -->
         <listener>
              <listener-class>
                   org.apache.myfaces.webapp.StartupServletContextListener
              </listener-class>
         </listener>
         <!-- Faces MyFacesExtensionsFilter -->
         <filter>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <filter-class>
                   org.apache.myfaces.webapp.filter.ExtensionsFilter
              </filter-class>
              <init-param>
                   <param-name>uploadMaxFileSize</param-name>
                   <param-value>1m</param-value>
              </init-param>
         </filter>
         <filter-mapping>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <url-pattern>/faces/*</url-pattern>
         </filter-mapping>
         <filter-mapping>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <url-pattern>*.jsf</url-pattern>
         </filter-mapping>
         <!-- Faces Servlet -->
         <servlet>
              <servlet-name>Faces Servlet</servlet-name>
              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
              <load-on-startup>1</load-on-startup>
         </servlet>
         <!-- Faces Servlet Mapping -->
         <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>*.jsf</url-pattern>
         </servlet-mapping>
         <welcome-file-list>
              <welcome-file>index.jsp</welcome-file>
         </welcome-file-list>
         <servlet>
              <servlet-name>imageServlet</servlet-name>
              <servlet-class>my.com.xplorer.gui.v.ImageServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>imageServlet</servlet-name>
              <url-pattern>/image/*</url-pattern>
         </servlet-mapping>
    </web-app>So I lost the faces context using the jscookmenu, I believe.
    My webapp uses tiles, and there is 2 navigation possibilities: tomahawaks jscookmenu and tomahawaks commandNavigation.
    Latter one runs ok, I do use
    <t:panelNavigation id="nav" styleClass="navigation"
         itemClass="navitem" separatorClass="navseparator" 
         activeItemClass="navitem_active" openItemClass="navitem_open">
         <t:commandNavigation action="#{newsHandler.userRequest}" value="#{newsHandler.rss_source_name[0]}">
              <f:param name="navigator"  value="/jsf/news.jsp" />
         </t:commandNavigation>
    </t:panelNavigation>for this kind of navigation I do not use any navigation rules in faces config. To dynamically include the desired faces page I do that:
    <%
         String s = (String)request.getParameter("navigator");
         if (s == null || s.length() == 0 ) {
              s =  "/jsf/explorer.jsp";
    %>
    <jsp:include page="<%=s %>" />That does work.
    Now like I said I did enhance the app by adding tomahawks jscookmenu.
    Therefore I use the following in another tile:
    <t:jscookMenu layout="hbr" theme="ThemeOffice" styleLocation="resources/css">
              <%/* Availaible jscookMenu themes: ThemeIE, ThemeMiniBlack, ThemeOffice, ThemePanel
                 Availaible jscookMenu layout: hbr, hbl, hur, hul, vbr, vbl, vur, vul
                 respect to Heng Yuan http://www.cs.ucla.edu/~heng/JSCookMenu
            */%>
      <t:navigationMenuItem id="nav_0" itemLabel="#{localz.Xplorer}" action="Xplorer" />
    </t:jscookMenu>For this kind of navigation I tried to use navigation rules and the following show the config:
         <navigation-rule>
           <from-view-id>/jsf/*</from-view-id>
            <navigation-case>
                <from-outcome>Xplorer</from-outcome>
                <to-view-id>/jsf/tileMain.jsp?navigator=/jsf/explorer.jsp</to-view-id>
            </navigation-case>
            <navigation-case>
                <from-outcome>Tabs</from-outcome>
                <to-view-id>/jsf/tileMain.jsp?navigator=/jsf/tab.jsp</to-view-id>
            </navigation-case>
         </navigation-rule>That works for the first click. The desired page is shown. The nect click anywhere in the app then show the mentioned error.
    Using tiles I use this view-handler
    <view-handler>org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl</view-handler>One question is: can I use another view-handler on top of the above one? So I could extend com.sun.facelets.FaceletViewHandler and try my luck with this? Or is the solution pointed out just a millisecond from being ok, I just don�t see it?
    Maybe you need to know a bit more on how I use tiles:
    That is the page I start with. It inserts the tile shown underneath.
    <f:view locale="#{userLocale}">
         <f:loadBundle var="localz" basename="my.com.xplorer.gui.v.Lokalization" />
         <f:loadBundle var="bundle" basename="my.com.xplorer.gui.v.messages" />
         <f:subview id="tileMain">
              <h:form id="myJsfForm" styleClass="standard">
                        <tiles:insert definition="template" flush="false" />
              </h:form>
         </f:subview>
         <h:messages />
    </f:view>
    </html>The foolowing is the tile structure.
    The bodi tile is the dynamic part. Above you see that I dynamically load the pages into it.
    <t:htmlTag value="div" styleClass="pageLayout">
         <h:panelGrid columns="2" align="center" styleClass="pageContent">
              <f:facet name="header">
                   <f:subview id="header">
                        <tiles:insert attribute="header" flush="false" />
                   </f:subview>
              </f:facet>
              <t:htmlTag value="div" styleClass="pageMenu">
                   <f:subview id="menu">
                        <tiles:insert attribute="menu" flush="false" />
                   </f:subview>
              </t:htmlTag>
              <t:htmlTag value="div" styleClass="pageContentWoMenu">
                   <f:subview id="bodi">
                        <tiles:insert attribute="bodi" flush="false" />
                   </f:subview>
              </t:htmlTag>
              <f:facet name="footer">
                   <f:subview id="footer">
                        <tiles:insert attribute="footer" flush="false" />
                   </f:subview>
              </f:facet>
         </h:panelGrid>
    </t:htmlTag>Maybe you also need to know the tiles config?
    <tiles-definitions>
       <definition name="template" path="/jsf/tileTemplate.jsp">
              <put name="header"  value="/jsf/header.jsp"/>
          <put name="menu"    value="/jsf/menu.jsp"/>
          <put name="bodi"    value="/jsf/bodi.jsp"/>
          <put name="footer"    value="/jsf/footer.jsp"/>
       </definition>
       <definition name="/jsf/news.tiles" extends="template">
              <put name="bodi"  value="/jsf/news.jsp"/>
       </definition>
       <definition name="/jsf/explorer.tiles" extends="template">
              <put name="bodi"  value="/jsf/explorer.jsp"/>
       </definition>
       <definition name="/jsf/tab.tiles" extends="template">
              <put name="bodi"  value="/jsf/tab.jsp"/>
       </definition>If you have read until here: thanks very much.
    There seems to be a sort of gap regarding jsf navigation documentation.
    I mean the ordinary way is covered everywhere (the book I have covers that too), but jscookmenu seems not to fit in too good. I also tried it with an actionslistener in the jscookmenu but that failed, too. So a link to documents telling the truth on jsf navigation I would appreciate very much.
    Kind regards
    Belle Ile En Mer

    This is the error i am getting into now..
    exception
    org.apache.jasper.JasperException: An exception occurred processing JSP page /welcomeJSF.jsp at line 19
    16: This file is an entry point for JavaServer Faces application.
    17: --%>
    18: <body>
    19: <f:view>
    20: <h3><h:outputText value="CHOULTRY'S IN BANGALORE" /></h3>
    21: <h:form>
    22: <table border="0">
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    root cause
    java.lang.RuntimeException: Cannot find FacesContext
         javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1811)
         javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1628)
         org.apache.jsp.welcomeJSF_jsp._jspx_meth_f_005fview_005f0(welcomeJSF_jsp.java:112)
         org.apache.jsp.welcomeJSF_jsp._jspService(welcomeJSF_jsp.java:86)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

  • Jsf with weblogic server 6.1

    Hi, Any help would be appreciated. I am trying to use jsf with weblogic server 6.1 and wlintegration 2.1 I tried to deploy the samples provided with jwsdp-1.2 When I start the guess number sample I get the following error message:
    Duke's number: 3
    <25-Jun-03 16:03:40 BST> <Error> <HTTP> <[WebAppServletConte
    xt(57758238,examplesWebApp,/examplesWebApp)] Root cause of S
    ervletException
    javax.servlet.jsp.JspException: Cannot find FacesContext
    at javax.faces.webapp.UIComponentTag.doStartTag(UICo
    mponentTag.java:269)
    at jsp_servlet._jsf_45_guessnumber._faces.__greeting
    ._jspService(__greeting.java:123)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java
    :27), etc.
    I updated the web.xml file, created the faces directory under my examplesWebApp active domain with the jsp files, it finds the UserNumberBean class but it still crashes with the above.
    One problem I was having while deploying it that Weblogic Server did not allow me to copy jsf-api.jar, jstl.jar,etc under web-inf/lib.
    So I added all required jar files under bea root/config/samples/lib and updated startWeblogic.cmd
    Please help with how to deploy correctly the samples:
    Botond

    Thanks bill.
    I checked my weblogic server 6.1,it limited to j2ee1.2 features only.So I changed it supporting j2ee1.3 features.Now my JSF example is working normally.
    But I found a new question soon.
    I writed some letter in Chinese in jsp page .And I got some errors in weblogic.
    <2003-10-14 01:47:57> <Error> <HTTP> <101019> <[ServletContext(id=6480502,name=jaction,conte
    xt-path=/jaction)] Servlet failed with IOException
    java.io.IOException: javax.servlet.jsp.JspException: The taglib validator rejected the page: "org.xm
    l.sax.SAXParseException: An invalid XML character (Unicode: 0xb8) was found in the CDATA section., "
    at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:124)
    at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
    at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:356)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:214)
    at weblogic.servlet.jsp.JspStub.checkForReload(JspStub.java:149)
    at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:538)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:364)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:312)
    at com.sun.faces.context.ExternalContextImpl.dispatchMessage(ExternalContextImpl.java:298)
    at com.sun.faces.lifecycle.ViewHandlerImpl.renderView(ViewHandlerImpl.java:53)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:89)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:169)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletC
    ontext.java:5517)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:31
    56)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
    I donnot know what is the matter.And how to correct?
    thanks again.
    Yanger

  • Tiles / JSF with single tiles-defs.xml file, no templating JSPs?

    All the examples I've seen for using JSF with Tiles use many JSP files for the templating information, resulting in twice as many JSP files as you would have in, say, a typical Struts project.
    When coding in Struts you can forward to a tiles definition, meaning that if all your page layouts are defined in tiles-defs.xml, then you only need to provide the JSPs for the non-standard parts of each page.
    With JSF it seems that you need to provide a JSP for the template for each file (which might end up being a single <tiles:insert... />, and the JSP for the non-standard bits for that page.
    Is there a way to either a) combine those two JSP files into one (by maby using a <tiles:put ... type="string"/> - tried this, couldn't get it to work), or b) get something similar to the way Struts + Tiles works?

    It does not work by default. It is a fact.
    Source for Struts, Tiles and even JSF are open now. I.e. everybody who has interest can research this question.
    I got this reply from another forum for this question and I am currently working on it. Lets see if we get somewhere.

  • Using CAPTCHA with jsf

    Has anyone used CAPTCHA with jsf? Is there a free jar file for doing this?

    I am using JSF 1.2 with RichFaces.
    I want to implement SimpleCaptcha in the application.
    On my loginpage I am able to add a captcha image.
    Here is the exception that I get. This I get after when my jsp page(on which this image is) loads.
    StandardWrapperValve[StickyCaptcha]: PWC1406: Servlet.service() for servlet StickyCaptcha threw exception
    java.lang.IllegalStateException: PWC3999: Cannot create a session after the response has been committed
    at org.apache.coyote.tomcat5.CoyoteRequest.doGetSession(CoyoteRequest.java:2709)
    at org.apache.coyote.tomcat5.CoyoteRequest.getSession(CoyoteRequest.java:2482)
    at org.apache.coyote.tomcat5.CoyoteRequestFacade.getSession(CoyoteRequestFacade.java:871)
    at org.apache.coyote.tomcat5.CoyoteRequestFacade.getSession(CoyoteRequestFacade.java:882)
    at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:248)
    at nl.captcha.servlet.SimpleCaptchaServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    What could be the reason?

Maybe you are looking for

  • When I open Adobe Premier I get an Error 400

    It opens a box stating: ERROR Photoshop.com services are currently unavailable. Please try again later or check your network connections. Error 400. How do I fix it so that doesn't Pop-up? Thanks for any help! 

  • Problem with FM  'REUSE_ALV_GRID_DISPLAY'

    Hi, I have a program which uses this FM 'REUSE_ALV_GRID_DISPLAY' and has a no of columns in the output display. One of my fields is message which is for diplaying message related to the record row. In the internal table for ALV the length of this fie

  • ABAP Runtime error MESSAGE_TYPE_X in process chain

    in our daily load process chain  we have a level where datas are getting loaded in to a cube from 4 dso thru dtp. in this level the DTP fails approximately twice in a week. the DTP is shown in red in the log view. when  we check the message its showi

  • Installation of  10.1.3 version of oracle application server

    Hi I have to install this version of apps server. I went to this link http://www.oracle.com/technology/software/products/ias/index.html I need to know the files are .bin files Can i just unzip them using unzip utility or how to extract the files

  • Annoying Safari problem after Mountain Lion update...

    I've updated my Macbook Pro to Mountain Lion OS X a while ago and now use Safari 6.0 as my main browser. The zoom button (green button with the plus sign) on the top left corner doesn't seem to be working properly, though. Everytime I click on it, th