That appears to be the correct structure.  Make sure you get the names correct.  Also 
note that Tomcat's jspc generates the "web.xml" excerpt, you shouldn't have to write 
this by hand.

> -----Original Message-----
> From: Billy Ng [mailto:[EMAIL PROTECTED]]
> 
> So, should I do this?
> 
> web.xml
> =====
>    <servlet>
>     <servlet-name>
>         AccountHTML_jsp
>     </servlet-name>
>     <servlet-class>
>         com.mydomain.AccountHTML_jsp
>     </servlet-class>
>    </servlet>
>    <servlet-mapping>
>     <servlet-name>
>        AccountHTML_jsp
>     </servlet-name>
>     <url-pattern>
>        /AccountHTML.jsp
>     </url-pattern>
>    </servlet-mapping>
> 
> struts-config.xml
> ===========
>   <action path="/accounts"
>    type="com.mydomain.AccountsAction"
>    name="accountsForm"
>    validate="false"
>    input="/WEB-INF/jsp/AccountsHTML.jsp">
>    <forward name="accounts" path="/WEB-INF/jsp/AccountsHTML.jsp"/>
>   </action>
> 
> Billy Ng
> 
> ----- Original Message -----
> From: "David M. Karr" <[EMAIL PROTECTED]>
> 
> > >>>>> "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]>
> >
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

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

Reply via email to