>>>>> "Billy" == Billy Ng <[EMAIL PROTECTED]> writes:

    Billy> Hi folks,
    Billy> In my Struts app, I am using the Action to call the jsp file.  In the 
struts-config.xml, the action tag looks like this, 

    Billy>   <action path="/accounts" 
    Billy>    type="com.mydomain.AccountsAction"
    Billy>    name="accountsForm"       
    Billy>    validate="false"
    Billy>    input="/WEB-INF/jsp/AccountsHTML.jsp">
    Billy>    <forward name="accounts" path="/WEB-INF/jsp/AccountsHTML.jsp"/>
    Billy>   </action>
    Billy> Because of some deployment issue, I need to pre-compile the jsp files.  I 
successfully use the ANT's jspc tag to compile the all the jsp files to java files, 
then compile them to java files.  However, I cannot make it use the servlet in the 
forward tag.  I tried to do this (AccountsHTML_jsp is class file of the compiled 
version of AccountsHTML.jsp), but I get 404 page.
    Billy>   <action path="/accounts" 
    Billy>    type="com.mydomain.AccountsAction"
    Billy>    name="accountsForm"       
    Billy>    validate="false"
    Billy>    input="/WEB-INF/jsp/AccountsHTML.jsp">
    Billy>    <forward name="accounts" path="/WEB-INF/ui/AccountsHTML_jsp"/>
    Billy>   </action>

    Billy> Would anybody knows how can I make this work?

You don't change your "struts-config.xml" at all to use precompiled JSP pages.
You do have to change your "web.xml" file, however, to include the servlet
mappings for the generated servlets.  You also have to include the generated
and compiled servlet class files in your WAR file.

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to