ant - Precompiling JSPs in Jenkins CI -


has called ant script in jenkins ci pre-compiles jsps using jspc? i'm trying migrate project use jenkins , when call ant script keep getting following exception:

org.apache.jasper.jasperexception: file:/demo /workspace/trunk/src/main/webapp/pages/test.jsp (line: 9, column: 0) value usebean class attribute org.demo.model.useraccount invalid.

the ant script has worked fine outside of jenkins not run without error inside of it. thoughts?

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> <%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>  <jsp:usebean id="user" class="com.demo.model.useraccount"/> <c:url var="saveuserurl" value="/account/save.html" />  <form:form modelattribute="account" method="post" action="${saveuserurl}">   <form:errors path="*" cssclass="statuserror" element="p" htmlescape="false" /> <form:hidden path="id"/>      <div style="width:60%">          <fieldset>                       <p class="field">                 <label for="">first name</label>                 <form:input path="firstname" title="first name"/>             </p>                         <p class="field">                 <label for="">last name</label>                 <form:input path="lastname" title="last name">             </p>                     <p class="field">                 <label for="">e-mail address</label>                 ${account.email}             </p>         </fieldset>         <p class="field">             <input type="submit" class="button" value="save" name="submit"/>         </p>     </div>    </form:form> 

have checked lib path , includes? according jsp docs, jsp:usebean task try find bean in path first. if find class, don't know if pay attention type below point. declaration of bean takes precedence? inline or finds in path?

http://profesores.elo.utfsm.cl/~agv/elo330/2s03/projects/tomcat/doc/1.2/syntaxref1217.html

also, looks ant task (jspc) deprecated of tomcat5. https://ant.apache.org/manual/tasks/jspc.html

the ant documentation recommends using tomcat task instead of ant task. there many limitations task partially stem many versions of jasper, others implementation 'issues' in task (i.e. nobody's willingness radically change large bits of work around jasper). because of , fact jsp pages not have portable across implementations -or versions of implementations- task better used validating jsp pages before deployment, rather precompiling them. that, deploy , run httpunit junit tests after deployment compile , test pages, in 1 go.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -