URGENT: sp6 and JSP compiling/classpath problem?

Hi,
          We installed sp6 on our production site a little over a week and started
          seeing this problem on our logs with regards to any JSP with an include tag,
          such as:
          <%@ include file="/inc/insideHeadTag.jsp" %>
          INTERMITTENTLY, we will get the following error in the page on the client
          side at runtime:
          < ! -- cannot include file '/inc/insideHeadTag.jsp', resource not
          found -- >
          I grepped this newsgroup and noticed a previous unanswered post of the same
          nature, "Static compiles do not seem to include JSP's". Except in our case,
          this problem also manifest for dynamic JSP compiles, happens sporatically,
          and only started with sp6.
          Bug???
          Gene Chuang
          Join Kiko.com!
          

          Just to clarify - I'm not from BEA, I'm from EA - short a letter.
          As far as I know, there is no synchronization between WL instances in a cluster regarding the
          the compiling of JSPs. So when you start up two WL instances that share the same workingDir,
          and each WL instances gets a hit on your shiny new index.jsp, they both need to compile it. So the first
          one compiles it and writes index.class, the second does the same, overwriting the first _index.class,
          possibly at the same time that the first instance is trying to load _index.class into memory. And you
          get a mysterious 'class not found' error. Not likely, but possible.
          "Gene Chuang" <[email protected]> wrote:
          >Hmm, interesting... I thought Weblogic strongly recommends clustered
          >servers sharing the same file system?
          >
          >So you're saying the system-wide, cluster and node specific directories can
          >reside on the shared drive, but workingDirs should reside on local drives?
          >
          >--
          >Gene Chuang
          >Join Kiko.com!
          >
          >"Mike Reiche" <[email protected]> wrote in message
          >news:[email protected]...
          >>
          >> Make sure that your WLS instances are NOT sharing the workingDir. If two
          >instances
          >> try to compile the same JSP at the same time, bad things can happen.
          >>
          >> Mike
          >>
          >> "Gene Chuang" <[email protected]> wrote:
          >> >Hi Jong,
          >> >
          >> >Thanks for the reply; but I wish the solution is as simple as that.
          >Yes,
          >> >my .jsps are in the proper directory. They have been working properly
          >for
          >> >the past 6 months, since we were running WL 4.5.1. Only when I switched
          >to
          >> >WL 5.1 sp6 did this bug start showing up. Plus, like I said in my
          >original
          >> >post, this bug is sporatic. SOMETIMES the included jsp is found by
          >Weblogic
          >> >and the includer jsp compiles correctly; other times it isn't found and
          >the
          >> >includer jsp leaves a gap! What's going on?
          >> >
          >> >We are running clustered web servers in Solaris 2.7 with a shared file
          >> >system. This sporatic behavior may be because some nodes aren't working
          >> >properly???
          >> >
          >> >--
          >> >Gene Chuang
          >> >Join Kiko.com!
          >> >
          >> >"Jong Lee" <[email protected]> wrote in message
          >> >news:[email protected]...
          >> >>
          >> >> "Gene Chuang" <[email protected]> wrote:
          >> >> >Hi,
          >> >> >
          >> >> >We installed sp6 on our production site a little over a week and
          >started
          >> >> >seeing this problem on our logs with regards to any JSP with an
          >include
          >> >tag,
          >> >> >such as:
          >> >> I assumed insideHeadTag.jsp is in
          >> >> YOUR_DOCUMENT_ROOT/inc/insideHeadTag.jsp
          >> >>
          >> >> if you haven't read the spec of relative URI please do so:
          >> >> jsp spec 1.1 - section 2.5.2
          >> >>
          >> >> Jong
          >> >>
          >> >> >
          >> >> > <%@ include file="/inc/insideHeadTag.jsp" %>
          >> >> >
          >> >> >INTERMITTENTLY, we will get the following error in the page on the
          >client
          >> >> >side at runtime:
          >> >> >
          >> >> > < ! -- cannot include file '/inc/insideHeadTag.jsp', resource not
          >> >> >found -- >
          >> >> >
          >> >> >I grepped this newsgroup and noticed a previous unanswered post of the
          >> >same
          >> >> >nature, "Static compiles do not seem to include JSP's". Except in our
          >> >case,
          >> >> >this problem also manifest for dynamic JSP compiles, happens
          >> >sporatically,
          >> >> >and only started with sp6.
          >> >> >
          >> >> >Bug???
          >> >> >
          >> >> >Gene Chuang
          >> >> >Join Kiko.com!
          >> >> >
          >> >> >
          >> >> >
          >> >>
          >> >
          >> >
          >>
          >
          >
          

Similar Messages

  • Cluster and JSP compile

              On a cluster, how come if I make a change to a JSP it doesn't recompile
              without restarting the servers? Is it supposed to be that way? In the same
              vein how do I get the servers to recognize that their is a newer version of
              the code (JSP or EJB class files)? On a single managed server I have no
              problems.
              I am putting the updated code on both of the severs
              Please, help me understand.
              Thanks,
              Dan
              

    "Daniel Cartee" <[email protected]> wrote in message
              news:3c9a5068$[email protected]..
              >
              > On a cluster, how come if I make a change to a JSP it doesn't recompile
              > without restarting the servers? Is it supposed to be that way? In the
              same
              > vein how do I get the servers to recognize that their is a newer version
              of
              > the code (JSP or EJB class files)? On a single managed server I have no
              > problems.
              >
              > I am putting the updated code on both of the severs
              >
              JSPServlet automatically detects the modified jsp and re-compiles the same.
              The page will only be re-compiled when the request comes to that server.
              what version of WLS & SP you are using?
              Kumar
              > Please, help me understand.
              >
              > Thanks,
              >
              > Dan
              >
              >
              

  • Weblogic 9 and JSP compiler errors

    Hello everyone,
              I am having problems with my Jsps in my EAR file deployed on WL 9.0.
              I have a Jsp called upms.jsp that contains the following code snippets:
              After my import statements, I have some code that creates a resource bundle that accesses a properties file:
               <%!
                   ResourceBundle bundle = null;
                   public void jspInit() {
                   bundle = ResourceBundle.getBundle("conf.properties");
              %>
              I get an error from the above code:
              upms.jsp:3:11: 'try' statement has neither 'catch' nor 'finally' clause
                        import="java.util.ResourceBundle"
              ^----------------------^
              I am totally clueless as to what that error means.
              Next I declare a bean I use in the jsp:          
                   <jsp:useBean
                        id="userPrefsManagerBean"
              class="controllers.beans.UserPreferencesManagerBean"
                   scope="session">
                   </jsp:useBean>
                   <jsp:setProperty name="userPrefsManagerBean" property="*" />
              I get these errors from the above portion:
              upms.jsp:27:3: The qualifier of this name is a package, which cannot contain fields.
                   <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: The qualifier of this name is a package, which cannot contain fields.
                   <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Expression expected (found '.' instead)
                   <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Syntax error: expected ) (found 'class' instead)
                   <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Syntax error: expected <identifier> (found ')' instead)
                   <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              Has anyone encountered these before?
              This jsp worked perfectly well when I deployed my EAR file on JBoss...no such luck using Weblogic.
              Is there something I am missing here? I appreciate any help.
              Cheers, :-)
              M.

    Mildred,
              Two suggestions:
              1) use option weblogic.jspc's "-keepgenerated", you can keep the generated
              servlet's source code.
              Please paste it here.
              2) Can you create a simple reproducer(e.g. a war), and put it here, so that
              we can debug it and give more clues.
              To reproduce your issue, I write a simple a simple
              UserPreferencesManagerBean classs below :
              package controllers.beans;
              public class UserPreferencesManagerBean {
              private int p1;
              public void setP1(int p)
              p1 = p;
              public int getP1()
              return p1;
              But it works(oh, I run it under 910MP1).
              We cannot tell too much without your further information
              Thanks
              Leon
              <Mildred A> wrote in message news:[email protected]...
              I am still fighting with this issue.. Dang!
              I don't know what to change in my JSP because the WL JSP compiler errors are
              so out there..
              Here is the first portion of the JSP file:
              <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
              session="true"
              pageEncoding="ISO-8859-1"
              import="java.util.ArrayList"
              import="java.util.HashSet"
              import="java.util.Date"
              import="java.util.Collections"
              import="java.util.ResourceBundle"
              %>
              <%!
              ResourceBundle bundle = null;
              public void jspInit() {
              bundle = ResourceBundle.getBundle("conf.properties");
              %>
              <jsp:useBean
              id="userPrefsManagerBean"
              class="controllers.beans.UserPreferencesManagerBean"
              scope="session">
              </jsp:useBean>
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              Below is the error I get from this section alone (after precompiling):
              upms.jsp:3:11: 'try' statement has neither 'catch' nor 'finally' clause
              import="java.util.ArrayList"
              ^-----------------^
              upms.jsp:27:3: The qualifier of this name is a package, which cannot contain
              fields.
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: The qualifier of this name is a package, which cannot contain
              fields.
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Expression expected (found '.' instead)
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Syntax error: expected ) (found 'class' instead)
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Syntax error: expected <identifier> (found ')' instead)
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Expression expected (found 'catch' instead)
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Illegal use of an expression as a statement.
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: No variable or field with this name could be found at this
              location.
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: No variable or field with this name could be found at this
              location.
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Syntax error: expected ) (found '__ee' instead)
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Illegal use of an expression as a statement.
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Syntax error: expected ; (found ')' instead)
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: No variable or field with this name could be found at this
              location.
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: No variable or field with this name could be found at this
              location.
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Syntax error: expected } (found 'EOF' instead)
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              Can anyone see what I am doing wrong here? ?:| ?:|
              Cheers,
              M

  • JSP/beans classpath problems

    I'm runnning Tomcat 3.3 on Solaris 8. I'm writing a JSP application which uses a JavaBean that I wrote. The beans class name is testbeans.CalendarBean. I'm getting ClassNotFoundExceptions when I try to import the bean. My JSP is located at TOMCAT_HOME/webapps/test/jsp/
    My bean is located at TOMCAT_HOME/webapps/test/WEB-INF/classes/testbeans/
    I made sure to put the proper include statement in my jsp file as well. Finally, I put my bean in TOMCAT_HOME/lib/ and modified the CLASSPATH variable in tomcat.sh. This worked, but what do I have to do so I can leave the bean in its original location? Thanks.
    John

    Add the following to your JSP file:
    <%@ page
    import = "testbeans.*"
    %>
    Then you can do this:
    <% testbeans.CalendarBean myCB = new CalendarBean();%>
    also, CalendarBean needs a package statement like:
    package testbeans;

  • Welcome file and Jsp compiled

    Hi,
    I have very problems with compiled JSP. I work with tomcat 4.0.1.
    1) When I compile JSP with jspc and -webapp option and -webinc,
    he creates a file xml as :
         <servlet>
    <servlet-name>.hdi_0005faideResolveur</servlet-name>
    <servlet-class>.hdi_0005faideResolveur</servlet-class>
         </servlet>
         <servlet-mapping>
    <servlet-name>.hdi_0005faideResolveur</servlet-name>
    <url-pattern>/jsp/Pastel/doc/hdi_aideResolveur.jsp</url-pattern>
         </servlet-mapping>
    It don't work. I need to modify "-class>." in "-class>".
    Is it normal ?????????
    2) In web.xml, I have define a welcome-file as :
    <welcome-file-list>
    <welcome-file>/jsp/Pastel/hdi_index.jsp</welcome-file>
    </welcome-file-list>
    When I work in un-compile Jsp, It's work well.
    But, with compile-jsp, it don't' work. I have tried :
    <welcome-file-list>
    <welcome-file>servlet/.hdi_0005findex</welcome-file>
    </welcome-file-list>
    I don't work to.
    Have you a solution ?????????
    Thanks,
    Elisabeth
    France

    I have dowloaded the jakarta-tomcat-4.0.2-b2 (21 Jan).
    The comportement is the same as 4.0.1 !!!!!!

  • RequestDispatcher and .jsp "first run" problem

    Hello all,
    I'm testing our app on a development server (rh 8.0, tomcat 4.1.18-LE-jdk14, apache 2.0.44, mod_jk-2.0.43 ). Everything seems to work fine except...
    I have several instances of servlets that call a .jsp, which calls a servlet, which calls another .jsp, etc. My problem is that the servlets have a problem referencing the .jsps the first time each one is called after a tomcat/apache restart. BTW, jsp to jsp calls work perfectly.
    For example, the log-in page calls a servlet which retrieves session and user info from a db and forwards the user to their "home page" that is built in .jsp. The first time I try to log in, I get the following error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    java.lang.NullPointerException
         at com.act.cit.ui.CitGeneralServlet.gotoJSPErrorPage(CitGeneralServlet.java:119)
         at com.act.cit.ui.CitGeneralServlet.cleanUpForException(CitGeneralServlet.java:136)
         at com.act.cit.ui.CitLoginServlet.doPost(CitLoginServlet.java:201)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.servlets.InvokerServlet.serveRequest
    So not only am I not accessing the .jsp, but I'm not finding my desginated error .jsp either...looks like the 'null' that is being referenced is the .jsp I'm trying to hit. I've confirmed that the database is being accessed correctly (non-null results) and that I'm getting to the point in my servlet that forwards me to my .jsp:
    req.getRequestDispatcher("../jsp/citMain.jsp").forward(req, res);
    I've also tried:
    getServletContext().getRequestDispatcher("../jsp/citMain.jsp").forward(req, res);
    "req" and "res" both have non-null addresses. The next time I try to log in, everything works perfectly, just as it does on our old production server.
    All I can think of is that there's some sort of problem in the apache/tomcat config, but why would the server be able to process the .jsp successfully on subsequent tries?
    Thanks a lot! This one's really been eating at me!

    What version of tomcat and jdk are you using?rh 8.0, tomcat 4.1.18-LE-jdk14, apache 2.0.44, mod_jk-2.0.43
    I left my first getRequestDispatcher attempt as relative addressing and changed to absolute address on the second just to test:
    rd = req.getRequestDispatcher("../jsp/citMain.jsp");
    if (rd==null){  
         LogFileWriter.logThis(this, "rd was null");  //this is just a static logger I wrote  
         rd = req.getRequestDispatcher("/jsp/citMain.jsp");  
         if (rd==null)     
              LogFileWriter.logThis(this, "rd is still null");  
         else     
              LogFileWriter.logThis(this, "now rd is okay");
    else{  
         LogFileWriter.logThis(this, "rd was okay");
    } Here's my new logfile output after two login attempts:
    CitGeneralServlet--
    rd was null
    CitGeneralServlet--
    now rd is okay
    end of the first attempt, now here's the results of the 2nd attempt:
    CitGeneralServlet--
    rd was okay
    I still think it's odd that I can use relative addresses after the first execution, but I'm sure it's something to do with when the .jsp is compiled. Anyway, I don't have time to dig for the root cause right now. Absolute address seems to fix the problem, I'll stick with that. Thanks for all the suggestions. Hopefully this thread will help someone else who comes across the same problem.

  • Urgent:JMS AND JSP

    I am working with an architecture which has JSP pages talking to JMS message bean and in turn message bean talks to EJB, which persists the user data.
    I am quite new to JMS. My understanding is that JMS is used for Asynchronous operations. The requirement is a user can enter some data using form and the jsp page is supposed invoke a message bean which goes through other layers to store the info in the DB and should display a user An ID from the DB. How do I implement a mechanism to get message back from the Message Bean? I am using WebLogic Appserver 6.1. Please help

    First of all, you need to realize that your client and users are not the same thing. All your web requests come thru the webserver and into a certain application space, and your message queue is associated with that application, not each web user. So you only have one client to the message queue.
    Clearly you need to identify each web user in a unique way.
    Generate a sequential and unique ID for each web user and keep this is a hashtable. Remove it from the hashtable once the web user has no longer used it after a certain timeout period. If you are using Servlets then use the Session ID which is sent and received in cookies and used to link the broken session of web browsing.
    Send this unique ID with your message. And then link it back up to the original web user, once you have received a response from the queue.
    It does'nt sound like you need message queues though, since you want to return an immediate response to your client. However, look into Session.CLIENT_ACKNOWLEDGE which provides a synchronous receiver. I doubt if it will solve your problem as this works on the session level and not the message level. But check it out.
    I dunno, your question is vague, you need to provide more info.

  • Tomcat 4.0.x and JSP / JSTL performance problems.

    Hello everyone,
    I've got a web application where some of my JSP pages are rendering quite slowly. As an example I'll use a JSP page that I wrote for browsing through a user database. It uses two beans...
    1. jobBean - Ensures that all of the required (and correct) beans that will be used for processing the request have been loaded.
    2. browserBean - A basic JavaBean that holds a set of UserBean(s) and other information pertinent to database queries (start, limit, order).
    I'm using Apache Struts to map requests to the appropriate processing modules. Now the problem I'm having is that each request is taking between 1 and 2 seconds to execute. As you can imagine that's not going to allow for very many simaltaneous users. I've tracked the problem down to something JSP related. All of my code executes fairly quickly (I think). It takes about 20-30ms for my code to identify the request, load the requested data from the database, and convert it into a usable format (the browserBean). Here's my code...
    <%@ page contentType="text/html"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <META http-equiv="Cache-Control" content="no-cache">
    <title>
    Browse Users
    </title>
    </head>
    <body>
    <!-- Set up the OrganizationBeans for use -->
    <jsp:useBean id="jobBean" class="com.vacode.jobs.generic.JobBean" scope="session" />
    <jsp:useBean id="browserBean" class="com.vacode.mqdb.beansets.user.UserBrowserBean" scope="session" />
    <!---------------------------->
    <!-- Start Time Logged Here -->
    <!---------------------------->
    <c:if test="${jobBean.currentJob.name != 'BrowseUserJob'}">
         <!-- This page was accessed before everything was properly initialized -->
         <c:url var="browseUser" value="manageUsers.do">
              <c:param name="action" value="browse" />
         </c:url>
         <c:redirect url="${browseUser}" />
    </c:if>
    <form action="manageUsers.do" method="get">
         <input type="hidden" name="action" value="browse">
         <input type="hidden" name="start" value="<c:out value="${browserBean.dummyStart}" />">
         <input type="hidden" name="order" value="<c:out value="${browserBean.order}" />">
         I would like to view
         <select name="limit">
              <c:forEach begin="1" end="5" var="current">
                   <option value="<c:out value="${current*5}" />"
                        <c:if test="${browserBean.dummyLimit == current*5}">
                        selected
                        </c:if>
                   >
                    <c:out value="${current*5}" />
                   </option>
              </c:forEach>
         </select>
         results per page.
         <input type="submit" action="submit">
    </form>
    <c:url var="id" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_ID" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="name" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="firstName" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_FIRST_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="lastName" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_LAST_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="email" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_EMAIL_ADDRESS" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="organization" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_ORGANIZATION_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="status" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_STATUS_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="role" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="ROLE_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <table>
         <tr>
              <td><a href="<c:out value="${id}" />">Id</a></td>
              <td><a href="<c:out value="${name}" />">User Name</a></td>
              <td><a href="<c:out value="${firstName}" />">First Name</a></td>
              <td><a href="<c:out value="${lastName}" />">Last Name</a></td>
              <td><a href="<c:out value="${email}" />">E-Mail</a></td>
              <td><a href="<c:out value="${organization}" />">Organization</a></td>
              <td><a href="<c:out value="${status}" />">Status</a></td>
              <td><a href="<c:out value="${role}" />">User Type</a></td>
         </tr>
    <c:forEach items="${browserBean.beans}" var="bean">
         <tr>
              <c:url var="manage" value="manageUsers.do">
                   <c:param name="action" value="modify" />
                   <c:param name="beanId" value="${bean.userId}" />
              </c:url>
              <td><a href="<c:out value="${manage}" />"><c:out value="${bean.userId}" /></a></td>
              <td><c:out value="${bean.userName}" /></td>
              <td><c:out value="${bean.firstName}" /></td>
              <td><c:out value="${bean.firstName}" /></td>
              <td><c:out value="${bean.email}" /></td>
              <td><c:out value="${bean.organizationName}" /></td>
              <td><c:out value="${bean.statusName}" /></td>
              <td><c:out value="${bean.roleName}" /></td>
         </tr>
    </c:forEach>
    <!-------------------------->
    <!-- End Time Logged Here -->
    <!-------------------------->
    </table>
    <c:url var="next" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="${browserBean.nextPageStart}" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
         <c:param name="order" value="${browserBean.order}" />
    </c:url>
    <c:url var="previous" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="${browserBean.previousPageStart}" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
         <c:param name="order" value="${browserBean.order}" />
    </c:url>
    <c:if test="${browserBean.previousPageStart>-1}">
         <a href="<c:out value="${previous}" escapeXml="false" />">previous</a>
    </c:if>
    <c:if test="${browserBean.nextPageStart>-1}">
         <a href="<c:out value="${next}" escapeXml="false" />">next</a>
    </c:if>
    <br>
    <br>
    Quick Jump To Page:
    <c:forEach varStatus="loopTag" items="${browserBean.pageStartValues}" var="current">
    <c:choose>
         <c:when test="${loopTag.index+1==browserBean.currentPageNumber}">
              <c:out value="${loopTag.index+1}" />
         </c:when>
         <c:otherwise>
         <c:url var="thisPage" value="manageUsers.do">
              <c:param name="action" value="browse" />
              <c:param name="start" value="${current}" />
              <c:param name="limit" value="${browserBean.dummyLimit}" />
              <c:param name="order" value="${browserBean.order}" />
         </c:url>
         <a href="<c:out value="${thisPage}" />"><c:out value="${loopTag.index+1}" /></a>
         </c:otherwise>
    </c:choose>
    </c:forEach>
    <br>
    <br>
    Max Possible Pages: <c:out value="${browserBean.maxNumberOfPages}" />
    <br>
    Current Page: <c:out value="${browserBean.currentPageNumber}" />
    </body>
    </html>I've added comments where I timed my code from (by writing new Date().getTime() to the console). It usually takes between 1 and 2 seconds for that block of JSP to execute. I wrote a test class that should be very similar to the process (iterating over the forEach loop mainly) and it usually executed in 10ms to 20ms.
    I had a look at the servlets that were generated by Tomcat and I noticed that for each <c:url> I used there's about 300 lines of code (with several syncronized() methods). Could this have anything to do with it? If so, what could I do to improve the performance?
    Worth mentioning... The machine I am using is an AMD Athlon 1GHZ with 768MB RAM, 7200 RPM UDMA100 IDE HDD.
    I'm also using Tomcat integrated with a development environment (IntelliJ IDEA).
    Any help that anyone could offer is much appreciated.
    Thanks,
    Ryan

    Can you get acceptable performance if you hack out everything except the browserBean forEach loop? Maybe you are trying to do too much runtime EL evaluation on the page.
    If performance improves, you may want to push the URL construction and startValue computations to a Struts Action and put a bunch of objects on the requestScope (like "id_url", "name_url", "pageStartValue").
    Putting these computations in the Action would avoid having JSTL parse each of the ${} arguments, evaluating the expressions, and using costly reflection to turn ${browserBean.order} into browserBean.getOrder().

  • Servicegen classpath problem

    I'm trying to find out the status of the servicegen classloading problem
    (specifying a classpath in a servicegen task causes class cast exceptions).
    We are currently using the workaround described in this group which is
    putting the weblogic jars in the system classpath. This workaround is very
    unwieldy in our build environment. Is there any estimate on when the
    problem will be fixed?

    And was it? I am using 7.0sp4 and am getting classpath problems in servicegen.
    The problem I am having is that the type generation fails to find any of the weblogic
    utility classes, sug as weblogic.xml.schema.binding.util.runtime.PropertyInfo
    (and many many others)
    "Neal Yin" <[email protected]> wrote:
    This will be fixed in 7.0sp3 and 8.1sp1.
    Thanks,
    -Neal
    "John Horner" <[email protected]> wrote in message
    news:[email protected]..
    I'm trying to find out the status of the servicegen classloading problem
    (specifying a classpath in a servicegen task causes class castexceptions).
    We are currently using the workaround described in this group whichis
    putting the weblogic jars in the system classpath. This workaroundis
    very
    unwieldy in our build environment. Is there any estimate on when the
    problem will be fixed?

  • EAR and long CLASSPATH at JSP compilation time

              Hi all,
              we have an EAR-packaged application with over 260 jars (mainly
              EJB) that is deployed to a managed server WL6.1SP3(AIX). Then
              we hit a JSP page of this app. and Weblogic generates the
              adecuate .java file that is passed as an argument to a forked
              process for the javac compiler with a CLASSPATH that is more
              than 22KB!! of length because of the EAR classloader schema
              (it must include all the jars of the EJB level).
              The problem is that the EAR deployment in WL6.1 generates a fixed and very long
              path for every jar that it is composed of:
              $WL_HOME/./config/DOMAIN/applications/.wl_notdelete_EARNAME
              /wlap#####/ejbjarname.jar
              and the invoke of the compiler fails with argument too long.
              We can control the EJB jar name, EARNAME, WL_HOME
              and DOMAIN to shorten the CLASSPATH, but that is not enough
              giving that the fixed part of the PATH is very long, for example:
              with DOMAIN=DOM1, WL_HOME=W, ejbjar name=EJB1, EARNAME=EAR1
              you get:
              /w/./config/DOM1/applications/.wl_notdelete_EAR1/wlap#####/EJB1.jar: that is
              68 chars * 260 jars = more than 17KB only with the
              EJB part of the CLASSPATH (plus the standard SYSTEM CLASSPATH
              and WARS CLASSPATH.)
              As workarounds we can:
              1.- Use an "pseudo exploded" EAR with EJBREMOTE and EJBHOME in clientclasses path
              with every jar and war by their own. Not very
              clean and we've lost the benefits of EAR deployment.
              2.- Consolidate a bunch of EJB in every jar. More administrative
              tasks (common xml descriptors:ejb-jar.xml,...) and less isolation
              between developer teams.
              3.- Consolidate at functionality level (source) a bunch of EJB
              in a few one. :(
              4.- Precompile every JSP outside of WEBLOGIC and generate
              the corresponding class and entries at web.xml and weblogic.xml
              5.- ...?
              or maybe:
              6.- configure this very long directory of deployment
              to a shorter deployer choosen and use relative paths.
              Is this possible? :)
              PacoG.
              

    You may try to use JSP compiler class. Please specify 'compilerclass'
              option in weblogic.xml. This option specifies name of a Java compiler
              that is executed in WebLogic Servers's virtual machine. (Used in place of
              an executable compiler such as javac or sj.)
              Please see
              http://e-docs.bea.com/wls/docs61/webapp/weblogic_xml.html#jsp-descriptor.
              Paco Garcia wrote:
              > oops!
              >
              > >$WL_HOME/./config/DOMAIN/applications/.wl_notdelete_EARNAME
              > >/wlap#####/ejbjarname.jar
              >
              > >with DOMAIN=DOM1, WL_HOME=W, ejbjar name=EJB1, EARNAME=EAR1
              > >you get:
              > >/w/./config/DOM1/applications/.wl_notdelete_EAR1/wlap#####/EJB1.jar:
              >
              > please read SERVERNAME instead of EARNAME
              >
              > PacoG.
              Regards,
              Ann
              Developer Relations Engineer
              BEA Support
              

  • JSP Compiler and ClassCastException

     

    Have been using JDK1.2.2 from sun since day one and I've been seeing
              ClassCastException since day 1 too.
              Don't think it had anything to do with the compiler.
              "Jun Ying" <[email protected]> wrote in message
              news:[email protected]...
              > I noticed something that might be causing the ClassCastException and has
              not
              > been mentioned: the compiler that is used for jspc. I remember seeing a
              few
              > people mentioning extra classes in the workDir (ie, the bean class that is
              > being used). This is caused by using a smart compiler such as jikes or
              sj.
              > While those compilers will get you more speed for newly modified jsp's,
              they
              > resolve dependencies and recompile all the referenced classes. The result
              > is that the bean class gets recompiled and put into workDir. So no matter
              > where you put the workDir, you end up getting a new copy of the bean class
              > file, which is reloaded by the classloader that loads the newly compiled
              > JSP. That copy of the class file is considered "different" from the one
              > from the normal system classpath or the weblogic.class.path. Thus the
              > ClassCastException. So if you see java classes other than the jsp's in
              the
              > workDir, make sure you are using javac from the sun jdk. So to answer
              > Anish's question, WebLogic is not sticking a copy of the bean class.
              > Rather, it's the java compiler that you are using.
              >
              > Jun Ying
              > Meritsoft, Inc
              >
              >
              > "Michael Boudreau" <[email protected]> wrote in message
              > news:[email protected]...
              > > Hello,
              > >
              > > Well we ran into the same problem here at my company, and we have been
              > > pulling our hair out. I was reading through the jsp 1.1 spec, and
              > > thought I might try using the <jsp:useBean ...> tag instead of the <%@
              > > page import ...> tag. After careful inspection of the resulting .java
              > > file, I found that the <jsp:useBean ...> tag does not put insert any
              > > import statements, but simply declares the bean with the fully
              > > qualified package name. I am sure that this is not new news to anyone;
              > > however, the class cast exception went away (knock on wood, cross
              > > fingers, whatever).
              > >
              > > Basically, my statement looked like this:
              > > <jsp:useBean id="beanname" type="com.company.Class" scope="session" />
              > >
              > > My question is: is there something that I am missing or have not
              > > thought of? Because so far, this "seems" to be working, but I have
              > > been reading posts that say this does not work.
              > >
              > > Oh, one last quick note to BEA. While I was looking at the
              > > generated .java file from the jsp file, I found that weblogic's jspc is
              > > still generating getValue and setValue methods for HttpSession....
              > > which has been deprecated as of the servlet 2.2 spec.
              > >
              > > Michael
              > >
              > >
              > >
              > >
              > > Anish Parvataneni wrote:
              > >
              > > > Hi,
              > > >
              > > > I have a JSP which uses two different classes. Whenever, I change the
              > > > JSP and save it to recompile, there is a ClassCastException. ( I store
              > > > them in the session and load them) . Thats common ! The solution to
              this
              > > > as per documentation is to get rid of the classes in the workingDir of
              > > > JSP. However, I can find ONLY ONE of the classes in the workingDir. I
              > > > delete that class and the JSP works. I change the JSP , problem
              recurrs.
              > > >
              > > > 1. Why does weblogic stick a copy of the class in the workingDir,
              > > > everytime the JSP compiles, although it is available in the weblogic
              > > > classpath ?
              > > > 2. Why is it happening to only one of the classes I use in the JSP ?
              > > > 3. How can I make sure that this class is not available in the
              > > > workingDir, other than deleting it EVERYTIME.
              > > >
              > > > Thanks
              > > > Anish
              > >
              >
              >
              

  • Urgent help needed in compiling JSP on websphere 6

    we are migrating our app from websphere 5 to 6 version. our app has 2 JSP files. Jsp A and Jsp B...
    Jsp A code
    if(cond met) { <%@ include file = JspB %> }
    Now JSP B code
    <bean:define id='X' />
    when i run the JSP A, it throws compilation error as below..
    Jsp A failed to compile, variable X not resolved
    An error occured in the statically included jsp B
    The same code is running on websphere 5. its giving error on 6. ..Pls help..This is urgent,

    Could you post more details perhaps? Eg. the complete files.
    Also, I would recommend that you consider using the runtime include, <jsp:include ...>, and put your variables in the request scope.

  • Re: [iPlanet-JATO] sp3 jsp compiler problem

    Weiguo,
    First, Matt is correct, the regular expression tool is perfect for general text
    substitution situations, and as a completely independent tool its use is not
    restricted to migration situations (or file types for that matter).
    Second, I sympathize with the unfortunate trouble you are experiencing due to
    Jasper's (perhaps more strict) compilation, but in what way did the iMT
    automated translation contribute to these inconsistencies that you cited?
    1. Changed the case of the tag attribute to be the same as what's
    defined in tld.
    example: changed OnClick to onClick
    The iMT does not generate any OnClick or onClick clauses per se. In a
    translation situation, the only way "OnClick" would have been introduced was if
    it had been part of the pre-existing project's "extraHTML" (which was written
    by the original customer and just passed through unchanged by the iMT) or if it
    was added manually by the post-migration developer.
    2. Removed attributes which are not defined in tld.
    example: escape attribute only defined in three tags
    but in some pages, it's used although it's not defined as an
    attribute
    of certain tags. The jasper compiler doesn't like it.Can you give soem examples? Is there a definite pattern? Again, this might be
    similar to the OnClick situation described above?
    3. In an end tag, there can't be any space.
    example: </content > doesn't work. </content> works.
    Again, the content tag would never have been generated by the iMT. There was no
    equivalent in the NetDynamics world, so any content tags in your code must have
    been introduced by your developers manually. Its a shame that jasper is so
    particular, but the iMT could not help you out here even if we wanted to. The
    constants that are used by the iMT are defined in
    com.iplanet.moko.jsp.convert.JspConversionConstants. From what I can see, the
    only situation of a closing tag with any space in it is
    public static final String CLOSE_EMPTY_ELEMENT = " />";
    But that should not cause the type of problem you are referring to.
    Mike
    ----- Original Message -----
    From: Matthew Stevens
    Sent: Thursday, September 06, 2001 10:16 AM
    Subject: RE: [iPlanet-JATO] sp3 jsp compiler problem
    Weiguo,
    Others will chime in for sure...I would highly recommend the Regex Tool from
    the iMT 1.1.1 for tackling this type of problem. Mike, Todd and myself have
    posted to the group (even recently) on directions and advantages of creating
    your own RULES (rules file) in XML for arbitary batch processing of source.
    matt
    -----Original Message-----
    From: weiguo.wang@b...
    [mailto:<a href="/group/SunONE-JATO/post?protectID=125056020108194190033029175101192165174144234026000079108238073194105057099246073154180137239239223019162">weiguo.wang@b...</a>]
    Sent: Thursday, September 06, 2001 12:25 PM
    Subject: [iPlanet-JATO] sp3 jsp compiler problem
    Matt/Mike/Todd,
    We are trying to migrate to sp3 right now, but have had a lot of
    issues with the new jasper compiler.
    The following workaround has been employed to solve the issues:
    1. Changed the case of the tag attribute to be the same as what's
    defined in tld.
    example: changed OnClick to onClick
    2. Removed attributes which are not defined in tld.
    example: escape attribute only defined in three tags
    but in some pages, it's used although it's not defined as an
    attribute
    of certain tags. The jasper compiler doesn't like it.
    3. In an end tag, there can't be any space.
    example: </content > doesn't work. </content> works.
    As I see it, we have two options to go about solving this problem:
    1. Write a script which will iterate through all the jsp files and
    call jspc on them. Fix the errors manually when jspc fails. Jspc will
    flag the line number where an error occurs.
    2. Write a utility which scans the jsp files and fix the errors when
    they are encountered. We should define what's an error and how to
    correct it. It's best if we combine this with solution 1 since we
    might miss an error condition.
    Actually, there might be another option, which is seeking help from
    you guys since you have better understanding of JATO and iAS. Can you
    do anything to help us?
    We would be happy to hear your thoughts.
    At last, I would like to suggest modifying the moko tool so that
    these rules are enforced and the generated JSPs work with the new
    compiler. This is for the benefit of any new migration projects.
    Thanks a lot.
    Weiguo
    [email protected]
    Choose from 1000s of job listings!
    [email protected]
    [Non-text portions of this message have been removed]

    Thanks a lot Matt and Mike for your prompt replies.
    I agree completely that iMT doesn't introduce the inconsistencies.
    About the three cases I mentioned, the third one happens only in
    manually created JSPs. So it has nothing to do with iMT. The first
    two are mainly due to the existing HTML code, as you rightly pointed
    out.
    The reason I made the suggestion is since we know that case 1 and 2
    won't pass the japser compiler in sp3, we have to do something about
    it. The best place to do this, in my mind, is iMT. Of course, there
    might be some twists that make it impossible or difficult to do this
    kind of case manipulation or attribute discard.
    Weiguo
    --- In iPlanet-JATO@y..., "Mike Frisino" <Michael.Frisino@S...> wrote:
    Weiguo,
    First, Matt is correct, the regular expression tool is perfect for general text substitution situations, and as a completely independent
    tool its use is not restricted to migration situations (or file types
    for that matter).
    >
    Second, I sympathize with the unfortunate trouble you are experiencing due to Jasper's (perhaps more strict) compilation, but
    in what way did the iMT automated translation contribute to these
    inconsistencies that you cited?
    >
    1. Changed the case of the tag attribute to be the same as what's
    defined in tld.
    example: changed OnClick to onClick
    The iMT does not generate any OnClick or onClick clauses per se. In a translation situation, the only way "OnClick" would have been
    introduced was if it had been part of the pre-existing
    project's "extraHTML" (which was written by the original customer and
    just passed through unchanged by the iMT) or if it was added manually
    by the post-migration developer.
    >
    2. Removed attributes which are not defined in tld.
    example: escape attribute only defined in three tags
    but in some pages, it's used although it's not defined as an
    attribute
    of certain tags. The jasper compiler doesn't like it.Can you give soem examples? Is there a definite pattern? Again, this might be similar to the OnClick situation described above?
    >
    >
    3. In an end tag, there can't be any space.
    example: </content > doesn't work. </content> works.
    Again, the content tag would never have been generated by the iMT. There was no equivalent in the NetDynamics world, so any content tags
    in your code must have been introduced by your developers manually.
    Its a shame that jasper is so particular, but the iMT could not help
    you out here even if we wanted to. The constants that are used by the
    iMT are defined in
    com.iplanet.moko.jsp.convert.JspConversionConstants. From what I can
    see, the only situation of a closing tag with any space in it is
    public static final String CLOSE_EMPTY_ELEMENT = " />";
    But that should not cause the type of problem you are referring to.
    Mike
    ----- Original Message -----
    From: Matthew Stevens
    Sent: Thursday, September 06, 2001 10:16 AM
    Subject: RE: [iPlanet-JATO] sp3 jsp compiler problem
    Weiguo,
    Others will chime in for sure...I would highly recommend the Regex Tool from
    the iMT 1.1.1 for tackling this type of problem. Mike, Todd and myself have
    posted to the group (even recently) on directions and advantages of creating
    your own RULES (rules file) in XML for arbitary batch processing of source.
    >
    matt
    -----Original Message-----
    From: weiguo.wang@b...
    [mailto:<a href="/group/SunONE-JATO/post?protectID=125056020108194190033029175101192165174048139046">weiguo.wang@b...</a>]
    Sent: Thursday, September 06, 2001 12:25 PM
    Subject: [iPlanet-JATO] sp3 jsp compiler problem
    Matt/Mike/Todd,
    We are trying to migrate to sp3 right now, but have had a lot of
    issues with the new jasper compiler.
    The following workaround has been employed to solve the issues:
    1. Changed the case of the tag attribute to be the same as
    what's
    defined in tld.
    example: changed OnClick to onClick
    2. Removed attributes which are not defined in tld.
    example: escape attribute only defined in three tags
    but in some pages, it's used although it's not defined as an
    attribute
    of certain tags. The jasper compiler doesn't like it.
    3. In an end tag, there can't be any space.
    example: </content > doesn't work. </content> works.
    As I see it, we have two options to go about solving this problem:
    >>
    1. Write a script which will iterate through all the jsp files and
    call jspc on them. Fix the errors manually when jspc fails. Jspc will
    flag the line number where an error occurs.
    2. Write a utility which scans the jsp files and fix the errors when
    they are encountered. We should define what's an error and how to
    correct it. It's best if we combine this with solution 1 since we
    might miss an error condition.
    Actually, there might be another option, which is seeking help from
    you guys since you have better understanding of JATO and iAS. Can you
    do anything to help us?
    We would be happy to hear your thoughts.
    At last, I would like to suggest modifying the moko tool so that
    these rules are enforced and the generated JSPs work with the new
    compiler. This is for the benefit of any new migration projects.
    Thanks a lot.
    Weiguo
    [email protected]
    Choose from 1000s of job listings!
    [email protected]
    Service.
    >
    >
    >
    [Non-text portions of this message have been removed]

  • JSP Compile problem with WLS 5.1 sp9

    Hi All,
              The attached, simple JSP file uses a custom tag, and some JavaScript. When
              this is compiled into Java, the Java that is created is Bad. It seems as if
              WLS is having problems properly escaping single-quotes and double-quotes.
              Also attached, is the generated Java file. Note around line 82, and compare
              that to around line 15 of the JSP.
              Does anyone have an idea what can be done to fix this? This JSP compiles
              fine under Tomcat 3.2.
              Thanx!
              Will Hartung
              ([email protected])
              [test.jsp]
              [_test.java]
              

    Hi All,
              The attached, simple JSP file uses a custom tag, and some JavaScript. When
              this is compiled into Java, the Java that is created is Bad. It seems as if
              WLS is having problems properly escaping single-quotes and double-quotes.
              Also attached, is the generated Java file. Note around line 82, and compare
              that to around line 15 of the JSP.
              Does anyone have an idea what can be done to fix this? This JSP compiles
              fine under Tomcat 3.2.
              Thanx!
              Will Hartung
              ([email protected])
              [test.jsp]
              [_test.java]
              

  • JSP compile problems

    Hello,
    I have my jsp pages deployed in a war in an ear. The manifest in the war lists my dependent jars. In my orion-web.xml, I have the include-war-manifest-class-path parameter set to "true". This seems to work at runtime in that the jsp pages can locate the dependent jars. However my problem is at compile time. The compiler doesn't seem to find the jars and the compile fails. If I move the jars to web-inf/lib the compile will work, however that kind of defeats the purpose of having them in the Manifest.mf file.
    Anyone have any suggestions?
    Thanks,
    Mike Sander

    <p>Sebastian,</p>
    <p>Its unclean to include your java files in a jar. I can't remember reading anything about not including java files in the jar file spec though. In your jar file are the java files in the correct package structure?</p>
    <p>
    Hussein Badakhchani</br>
    </p>

Maybe you are looking for

  • Need help in formatting the report created using SSRS

    I have created an image and used it as the body background. But I want that image to come at right Set bodyRepeat as RepeatY.  Currently its showing as below              I need this blue image at the right most side of the report as below Also I nee

  • Delete HELP

    Can't delete web page in iweb, what am I doing wrong,I read numerous helps but no luck. must be doing something dumb please help.

  • Im having trouble connecting to my old HP 5MP on small network

    Im having trouble connecting to my old (but still a great printer) HP 5MP which is connected (be causes it has no ethernet built in) via an Ansante eternet/localtalk bridge to the ethernet network and ti my old G4 Power PC Quicksilver (using 10.4.11)

  • Required JMS jar files

    Hi All, We are implementing JMS in one of our projects. What are the .jar files that need to be deployed in XI and where can i find these .jar files? Thank you, Regards, Balaji.M

  • My toddler slid a paper clip into my iMac optical drive slot. Drive would not take a disc.

    I figured out a way to get the paper clip out and wanted to post for others that may have the same problem. I cut a thin piece of cardboard from a cereal box and added some 2 sided tape to it. I slid the cardboard and tape into the slot and pulled it