2

I was getting the following error when I execute JSF page.

The deferred EL expression is not allowed since deferredSyntaxAllowedAsLiteral is false.

<h:inputText id="username" value="#{login.username}"/>

Thus I had changed file extension from login.jsp to login.xhtml

This file and many other files contains lots of Java code inside <% ..%>, so what is the best approach in keeping the Java code intact and I would like my legacy application get deployed to Weblogic 11g (10.1.3.6), Changing all JSP scriplets is quite a herculean task and wouldn't be doing this as this is a legacy application.

web.xml

 <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5">
    <display-name>prod</display-name>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>Login</servlet-name>
        <servlet-class>test.app.Login</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>DBervice</servlet-name>
        <servlet-class>test.app.common.DBService</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>LAPService</servlet-name>
        <servlet-class>test.app.LAPService</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>Login</servlet-name>
        <url-pattern>/login</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>DBervice</servlet-name>
        <url-pattern>/dbservice</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>LAPService</servlet-name>
Jacob
  • 14,463
  • 65
  • 207
  • 320
  • @BalusC I have included web.xml where FacesServlet is defined. – Jacob Feb 03 '15 at 12:21
  • @BalusC You mean faces-config.xml? – Jacob Feb 03 '15 at 12:46
  • @BalusC Sorry, URL is `http://localhost:7001/apps/login` – Jacob Feb 03 '15 at 12:51
  • @BalusC Login Servlet gets authentication details and forwards response to jsf page. `response.sendRedirect("faces/my_list.jsp");` As I mentioned earlier, this is a legacy application and wouldn't be spending time on modifying code. – Jacob Feb 03 '15 at 12:55
  • @BalusC My other option would be to use JSF1.1 or JSF 1.2 libraries in Weblogic server. Thus I wouldn't need to change any legacy code. – Jacob Feb 03 '15 at 12:59

1 Answers1

2

Sounds like you should simply set:

<%@ page deferredSyntaxAllowedAsLiteral="true" %> 

in all of your JSP pages. It should work with Weblogic 10.3. You can probably write some sort of sed call to do it in every JSP.

Display Name is missing
  • 6,197
  • 3
  • 34
  • 46