|
 |
pro_jsp thread: The requested resource (/wroxdemo/servlet/AccessController) is not available"
Message #1 by "david chung" <davidc@m...> on Mon, 17 Mar 2003 05:53:31
|
|
Dear Mike Dennison,
Thank you for your reply about "The requested resource
(/wroxdemo/servlet/AccessController is not available" for the Pro JSP 1st
Ed.
Owing to I'm a beginner of studying Java, I'm unable to fully understand the
detail's advice mentioned on your last letter and some of the instructions
are different the book.Mike, I, therefore, ask you to do me a favor help me
solve this problem including how to setup the virtual directory of wroxdemo
and how to form actoin (/wroxdemo/servlet/AccessController ) while clicking
launch.html of the sample,and help the mentioned above samples to be
workable. I send a sample source code ch16 of Pro_JSP for your reference,
please kindly help me to solve this problem, if it is available to you.
mentioned below is my environment:
System Environment:
1. Windows 2000 Server platform
2. Tomcat 4.1.8
3. J2SDK 1.4
4. J2SDKEE 1.4
5. MS SQL Server and My SQL
6. Professional JSP Source Code to be installed :
a. ch01 to ch19 to be installed into c:\Tomcat4.1>webpps>examples>jsp
subdirectory
b.all the netscape ldap *.jar (jaas.jar,
ldapbeans.jar,ldapfilt.jar,ldapjdk.jar,ldapsp.jar,mcutil.jar)and the
Professional JSP's projsp.jar to be intalled into
c:\Tomcat4.1>webapps>WEB-INF>lib subdirectory.
c. all the source code of Professional JSP(*.java, *.class) to be installed
into c:\Tomcat4.1>webapps>WEB-INF>com>classes subdirectory
Questions:
1.I run the ch16 launch.html and click the submit button, the error message
is shown as below:
"The requested resource (/wroxdemo/servlet/AccessController) is not
available" It seems that I didn't setup the Virtual directory correctly from
Tomcat4.1, I don't know how to do as per your book's instruction. Please
kindly advise me how to do.
Owing to I have Tomcat4.1 and I didn't install JavaServer Web Development
Kit1.0. Therefore, there are a little bit different from your book's
instruction.For example:the following tag is unavailable on my computer:
<WebServer id="webServer">
<Service id="service0">
<WebAppliation id="examples" mapping="/examples" docBase="examples"/>
<WebAppliation id="wroxdemo" mapping="/wroxdemo" docBase="examples"/>
</Service>
</WebServer>
Your early reply on this message would be highly appreciate.
With best regards,
David
E-mail:davidc@m...
----- Original Message -----
From: "Mike Dennison" <mike@j...>
To: "Pro_JavaServer_Pages" <pro_jsp@p...>
Sent: Tuesday, March 18, 2003 12:45 AM
Subject: [pro_jsp] RE: The requested resource (/wroxdemo/servlet/AccessCon
troller) is not available"
> I'm not familiar with Pro JSP 1st Ed, but assuming it's roughly comparable
> to 2nd ed, I think that you might might be suffering from mixing
development
> webs with deployed webs as well as not actually understanding how web apps
> are structured and deployed.
>
> I suggest: -
>
> you install the projsp samples to a folder to C:\projsp so that so that
each
> chapter has its own folder C:\projsp\ch01 C:\projsp\ch02 etc.
>
> Download and install ant say to C:\ant - setting up ENV VARS as per docs.
>
> Reinstall tomcat from scratch to tomcat4.1 - setting up ENV VARS as per
> docs.
>
> If 1st edition is like 2nd edition then there is a build.xml ant file for
> each chapter plus a build.xml for all chapters. So once you've set up ant
> correctly run a DOS session and go to C:\projsp\ch01 and type "ant" this
> will compile the entire ch01 application into a single war file
> c:\projsp\wars\ch01.war. Stop tomcat copy war file to
> %CATALINA_HOME%\webapps i.e. c:\tomcat4.1\webapps. Restart tomcat - this
> will then deploy ch01 web app i.e. unjar ch01 into correct directory
> structure i.e. c:\tomcat4.1\webapps\ch01 and sub-folders.
>
> If you need additional JAR files, then these may be deployed either on a
> server-wide or application basis. I would recommend to use an app basis
> whilst learning. Therefore simply copy required JAR(S) to
C:\projsp\chXX\lib
> where XX is the chapter you are working on - rerun ant and redeploy your
> app.
>
> You have 2 methods of deploying new files to an existing deployed app
either
> remove entire app structure and redeploy war file as above - or you can
just
> copy over updated files. Please note
>
> Tomcat will only deploy a war file if the app does not exist. To redeploy
an
> amended version of ch01 then Stop tomcat, rmdir /S C:\tomcat\webapps\ch01,
> deploy new ch01.war to webapps and restart tomcat.
>
> JSP's and other web resource files can be deployed on the fly. New Java
> class files however require stopping and starting tomcat to ensure that
the
> correct version of the class is used.
>
> To deploy an app successfully i.e. get a context the app must be deployed
to
> %CATALINA_HOME%\webapps. A directory in webapps is a web application. If
you
> simply copy the projsp structure to webapps\examples, what you will get is
a
> mess.
>
> This is a bit of a simplification, but should help you.
> You do NEED to RTFM first though. Read the tomcat docs plus the servlet
and
> jsp spec's from sun.
>
> Mike Dennison
>
|
|
 |