jboss IDE & JSP/Servlet question?
dpruitt Sep 19, 2005 5:52 PMHi,
Please excuse the newbie question. I'm using jboss-4.0.3RC2 & IDE 1.5M2 and have successfully built the IDE/JB3 trailblazer for authors. I am now attempting to invoke a jsp from the servlet. I get the following error "The requested resource (/Intro.jsp) is not available." from tomcat. The directory structure is as follows:
src
-- org.jboss.jb3demo
----- bean pojo here
----- org.jboss.jb3demo.web
-------- AuthorServlet.java
-------- Intro.jsp
-- web.xml
I can see that the jsp is in the generated authors.war file as org/jboss/jb3demo/web/Intro.jsp. I have tried a number of prefix variations in the packaging-build.xml file without success. I would appreciate your suggestions.
thanks,
dpruitt
AuthorServlet.java //doGet() handler protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { //this.doTask(req, resp); req.getRequestDispatcher("/Intro.jsp").forward(req,resp); } packaging-build.xml <?xml version="1.0" encoding="UTF-8"?> <project default="_packaging_generation_" name="Packaging Generator"> <target name="_packaging_generation_" depends="N10004,N10015"/> <target name="N10004" description="authors-beans.ejb3"> <jar destfile="authors-beans.ejb3"> <zipfileset dir="bin" excludes="**/*Servlet.java"/> </jar> </target> <target name="N10015" description="authors.war"> <jar destfile="authors.war"> <zipfileset dir="src" prefix="WEB-INF"> <include name="web.xml"/> </zipfileset> <zipfileset dir="bin" prefix="WEB-INF/classes" includes="**/*Servlet.java, **/*.jsp"/> </jar> </target> </project> web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <servlet> <servlet-name>AuthorServlet</servlet-name> <servlet-class>org.jboss.jb3demo.web.AuthorServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>AuthorServlet</servlet-name> <url-pattern>/authors</url-pattern> </servlet-mapping> </web-app>