Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

Tomcat/JSP

Thread view: 
Jon.Trav@gmail.com - 21 Nov 2006 17:45 GMT
I'm trying to call a jsp page when tomcat is started.  I tried putting
it into the web.xml file in the conf folder.  it says it can't find the
class.  The jsp page is in the ROOT folder.
riccardonews@gmail.com - 21 Nov 2006 22:44 GMT
This is the right floder list

/tomcatdir/webapps/myproject/index.jsp

/tomcatdir/webapps/myproject/WEB-INF/web.xml

/tomcatdir/webapps/myproject/WEB-INF/classes/myclass.class

/tomcatdir/webapps/myproject/WEB-INF/lib/mylib.jar

call index.jsp into your browser by
http://localhost:8080/myproject/index.jsp

bye bye!
Riccardo

Jon.Trav@gmail.com ha scritto:

> I'm trying to call a jsp page when tomcat is started.  I tried putting
> it into the web.xml file in the conf folder.  it says it can't find the
> class.  The jsp page is in the ROOT folder.
Jon.Trav@gmail.com - 22 Nov 2006 15:44 GMT
I got that to work, but I want it to run automatically when the tomcat
service is started.  I read that if you put it in the ROOT dir and the
ROOT web.xml file it would work with the load-on-start parm.  This is
saying call not found.

> This is the right floder list
>
[quoted text clipped - 17 lines]
> > it into the web.xml file in the conf folder.  it says it can't find the
> > class.  The jsp page is in the ROOT folder.
riccardonews@gmail.com - 22 Nov 2006 22:25 GMT
if you want to start your application with
index.jsp you put this code in your web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" 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">
    <display-name>My Application</display-name>
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
</web-app>

the welcome page is index.jsp.

Jon.Trav@gmail.com ha scritto:

> I got that to work, but I want it to run automatically when the tomcat
> service is started.  I read that if you put it in the ROOT dir and the
[quoted text clipped - 22 lines]
> > > it into the web.xml file in the conf folder.  it says it can't find the
> > > class.  The jsp page is in the ROOT folder.
Juha Laiho - 27 Nov 2006 21:57 GMT
"Jon.Trav@gmail.com" <Jon.Trav@gmail.com> said:
>I got that to work, but I want it to run automatically when the tomcat
>service is started.  I read that if you put it in the ROOT dir and the
>ROOT web.xml file it would work with the load-on-start parm.  This is
>saying call not found.

Hmm.. I think JSP's cannot be run as "init-on-startup" modules.
You need servlets for that. Which makes quite a lot of sense:
JSPs primarily output documents (primarily HTML) -- and where
would you output the document with no browser.
Signature

Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
        PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.