我的jsp页面中有如下代码:
show.jsp代码如下:
<jsp:include page="/admin/fckeditor.jsp">
   <jsp:param name="name" value="content" />
   <jsp:param name="height" value="290" />
   <jsp:param name="width" value="630" />
   <jsp:param name="neirong" value="<%=article.get("content").toString() %>" />
</jsp:include>
fckeditor.jsp 页面如下:
<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ page import="com.fredck.FCKeditor.*" %>
<%
String name = request.getParameter("name");
String height = request.getParameter("height");
String width = request.getParameter("width");
String value = request.getParameter("neirong");

FCKeditor editor = new FCKeditor(request, name);
editor.setBasePath(request.getContextPath() + "/FCKeditor/");
editor.setToolbarSet("MyEditor");
editor.setHeight(height != null ? height : "500" );
editor.setWidth(width != null ? width : "650");
editor.setValue(value != null ? value : "");
out.println(editor.create());
%>
为什么我访问show.jsp页面时fckeditor没有显示呢?查看html源代码发现<jsp:include>没有被转译,这是为什么呢?
我用的weblogic8.1服务器!
请求好心人帮忙解决一下。

解决方案 »

  1.   

    和weblogic8.1没关系,是你程序的问题<jsp:include page="<%=request.getContextPath() %>/admin/fckeditor.jsp"> 
      <jsp:param name="name" value="content" /> 
      <jsp:param name="height" value="290" /> 
      <jsp:param name="width" value="630" /> 
      <jsp:param name="neirong" value=" <%=article.get("content").toString() %>" /> 
    </jsp:include> 
      

  2.   

    <jsp:include page="./admin/fckeditor.jsp"> 
      <jsp:param name="name" value="content" /> 
      <jsp:param name="height" value="290" /> 
      <jsp:param name="width" value="630" /> 
      <jsp:param name="neirong" value=" <%=article.get("content").toString() %>" /> 
    </jsp:include> 
    这样看看,路径不对,楼上得到路径是个好方法
      

  3.   

    <jsp:include page=" <%=request.getContextPath() %>/admin/fckeditor.jsp"> 
      <jsp:param name="name" value="content" /> 
      <jsp:param name="height" value="290" /> 
      <jsp:param name="width" value="630" /> 
      <jsp:param name="neirong" value=" <%=article.get("content").toString() %>" /> 
    </jsp:include> 或者在前面使用 
    <%
    String path = request.getContextPath();
    %>
    。。
    <jsp:include page=" <%=path%>/admin/fckeditor.jsp"> 
      <jsp:param name="name" value="content" /> 
      <jsp:param name="height" value="290" /> 
      <jsp:param name="width" value="630" /> 
      <jsp:param name="neirong" value=" <%=article.get("content").toString() %>" /> 
    </jsp:include> 
      

  4.   

    路径问题。在页面中,最好是参照6楼的在前面使用
    <%
    String path = request.getContextPath();
    %> 
    页面中其他凡是要用到path的地方用这个代替。这样,不管你以后项目部署到啥WAS上或者改啥名或者加啥文件夹,都可以通过配置来搞定。
      

  5.   

    我也遇到过这样的问题。解决方案如下:<%
      String content = article.get("content").toString();
    %>
    <jsp:include page=" <%=request.getContextPath() %>/admin/fckeditor.jsp">
      <jsp:param name="name" value="content" />
      <jsp:param name="height" value="290" />
      <jsp:param name="width" value="630" />
      <jsp:param name="neirong" value=" <%=content %>" />
    </jsp:include> 
    因为jsp动作的参数中不应该包含双引号
    例如<jsp:param name="question" value=" <%="123456" %>" />
    这是不对的。
    试试看看能不能解决你的问题。