O
ohaya
Hi,
I am trying to create a JSP-only WAR file "manually", and have some
questions.
I am first creating a directory structure as follows:
e:\work
e:\work\myjspapp
- foo1.jsp
- foo2.jsp
e:\work\myjspapp\images
- a bunch of image files used by JSPs
e:\work\myjspapp\WEB-INF
- web.xml
The web.xml file contains:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<servlet>
<servlet-name>foo1</servlet-name>
<jsp-file>foo1.jsp</jsp-file>
<servlet-name>foo2</servlet-name>
<jsp-file>foo2.jsp</jsp-file>
</servlet>
<display-name>MyJSPApp</display-name>
<description>This is my JSP Appplication</description>
<welcome-file-list>
<welcome-file>foo1.jsp</welcome-file>
</welcome-file-list>
</web-app>
I guess that my first question is: Does the above structure and does
the web.xml look all right?
Assuming that it is, do I:
1) cd e:\work, then
jar cvf myjspapp.war myjspapp
OR
2) cd e:\work\myjspapp, then
jar cvf myjspapp.war *
OR
Something else?
Sorry if this might be a silly question, and thanks for your patience,
but I'm in a situation that I'm having to build the WAR "by hand"...
Thanks,
Jim
I am trying to create a JSP-only WAR file "manually", and have some
questions.
I am first creating a directory structure as follows:
e:\work
e:\work\myjspapp
- foo1.jsp
- foo2.jsp
e:\work\myjspapp\images
- a bunch of image files used by JSPs
e:\work\myjspapp\WEB-INF
- web.xml
The web.xml file contains:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<servlet>
<servlet-name>foo1</servlet-name>
<jsp-file>foo1.jsp</jsp-file>
<servlet-name>foo2</servlet-name>
<jsp-file>foo2.jsp</jsp-file>
</servlet>
<display-name>MyJSPApp</display-name>
<description>This is my JSP Appplication</description>
<welcome-file-list>
<welcome-file>foo1.jsp</welcome-file>
</welcome-file-list>
</web-app>
I guess that my first question is: Does the above structure and does
the web.xml look all right?
Assuming that it is, do I:
1) cd e:\work, then
jar cvf myjspapp.war myjspapp
OR
2) cd e:\work\myjspapp, then
jar cvf myjspapp.war *
OR
Something else?
Sorry if this might be a silly question, and thanks for your patience,
but I'm in a situation that I'm having to build the WAR "by hand"...
Thanks,
Jim