How set up Tomcat 5?

Hi,
how do i set up tomcat 5 to be "JSF-enabled"?
Which jars must be shipped with my JSF-Webapp?
What have to be done?
Best regards,
Thomas

Hi Matthias,
Sorry about my boring posts, but i think i must post everything:
It's a app called squarecalc:
Ok, first the web.xml:
<?xml version="1.0"?>
<web-app 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 web-app_2_4.xsd"
    version="2.4">
     <!-- #############  Faces Servlet  #############  -->
     <servlet>
          <servlet-name>JavaServer Faces Servlet</servlet-name>
          <servlet-class>
               javax.faces.webapp.FacesServlet
          </servlet-class>
          <load-on-startup>1</load-on-startup>
     </servlet>
     <!-- ############# Mapping ###############  -->
     <servlet-mapping>
          <servlet-name>JavaServer Faces Servlet</servlet-name>
          <url-pattern>/faces/*.jsf</url-pattern>
     </servlet-mapping>
</web-app> The faces-config.xml:
<?xml version="1.0"?>
<!DOCTYPE faces-config PUBLIC
  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
  "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
     <navigation-rule>
         <from-view-id>/faces/eingabe.jsf</from-view-id>
         <navigation-case>
                <from-outcome>success</from-outcome>
                <to-view-id>/faces/ausgabe.jsf</to-view-id>
         </navigation-case> 
     </navigation-rule>
       <managed-bean>
            <managed-bean-name>Square</managed-bean-name>
          <managed-bean-class>com.edu.jsf.bean.SquareBean</managed-bean-class>
          <managed-bean-scope>session</managed-bean-scope>
     </managed-bean>
</faces-config>The eingabe.jsf:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<html>
<head>
     <title>Berechnung eines Fl�cheninhaltes</title>
</head>
<body>
<f:view>
     <h3>JSF-Beispielanwendung zur Berechnung eines Fl�cheninhaltes:</h3>
    <i>Dieses Programm berechnet aufgrund der Eingabe einer
    Seitenl�nge den Fl�cheninhalt eines Quadrates.</i>
    <br><br>
    <h:form id="inputForm">
          Bitte geben Sie eine Seitenl�nge ein:     
          <h:inputText value="#{Square.length}" />
          <h:commandButton value="Berechnen" action="success" />
     </h:form>
</f:view>
</body>
</html>The ausgabe.jsf:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<html>
<head>
     <title>Berechnung eines Fl�cheninhaltes</title>
</head>
<body>
<f:view>
     <h3>JSF-Beispielanwendung zur Berechnung eines Fl�cheninhaltes:</h3>
    <i>Dieses Programm berechnet aufgrund der Eingabe einer
    Seitenl�nge den Fl�cheninhalt eines Quadrates.</i>
    <br><br>
    <h:form id="inputForm">
          Ergebnis der Berechnung<br><br>
          Ihre Eingabe war: <h:outputText value="#{Square.length}" />
          <br>
          damit ist der Fl�cheninhalt: <h:outputText value="#{Square.area}" />
     </h:form>
</f:view>
</body>
</html>The SquareCalc.java:
package com.edu.jsf.bean;
public class SquareBean {
     private int length;
     private int area;
     public int getArea() {
          return length*length;
     public int getLength() {
          return length;
     public void setArea(int i) {
          area = i;
     public void setLength(int i) {
          length = i;
}The directory-structure:
tomcat-root
-webapps
--squarecalc
---faces
----ausgabe.jsf
----eingabe.jsf
---WEB-INF
----classes
----lib
----tldsIn classes is of course the SquareClalc-Bean.
In lib is:
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
jsf-api.jar
jsf-impl.jar
In tlds is:
html_basic.tld
jsf_core.tld
Sorry for the long and boring posting.
Best regards & thanks
Thomas

Similar Messages

  • How could force tomcat to stop and start on every build on Ide?

    How could force tomcat to stop and start on every build on Ide?

    Hello,
    See this help article:
    *[https://support.mozilla.org/en-US/kb/How%20to%20set%20the%20home%20page How to set the home page]
    Or try go to about:config page, search for "browser.startup.homepage" change its value to "about:home"(default) or "about:blank"(blank page)
    *[http://kb.mozillazine.org/About:config about:config]

  • How set  UserName and Password for HTTP Basic Authentication for a servlet

    Hi..
    How set UserName and Password for HTTP Basic Authentication for a servlet in JBoss server?
    Using Tomcat i can do it .(By setting roles in web.xml, and user credintails in tomcat-user.xml).
    But i dont know how do it in JBOSS..
    I am using Netbeans and Eclipse IDEs.. Can we do it by using them also!?
    Thank u

    Hi Raj,
    You can do this by creating a Login screen for the users and check the authentication of each user in PAI i.e. PROCESS AFTER INPUT.
    Store the user information in a database table and check the username and password when the user enters it.
    You can display password as *** also. For this double click on input box designed for password and goto Display tab. Select Invisible in the list and check it.
      CASE sy-ucomm.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN <fcode for submit>.
          SELECT SINGLE uname pwd
           FROM <DB table>
           INTO (user, pass)
           WHERE username = user AND
                   password = passwd.
          IF sy-subrc = 0.
    <Go to next screen for further processing>
          ELSE.
    <Display Error message and exit>
          ENDIF.
      ENDCASE.
    Regards,
    Amit
    Message was edited by:
            Amit Kumar

  • Problems setting up Tomcat with RoboHelp Server V8

    Hi,
    My Systems Administrator is trying to set up RoboHelp Server version 8 for me. he has been following the Adobe Installation guide and has got as far as page 10 where it tells him to install and configure IIS and TomCat, at this point he says he does not understand what he should be doing. He has not installed TomCat before and it is telling him to configure the tomcat directory and although he has tried using what it says it comes up with an error the directory does not exist.
    He is using:
    Windows 2008 Server Standard
    IIS 7.0
    TomCat 6.0.20
    SQL Server 2008 express SP1 - this is the latest version the adobe instructions says RooHelp Server works with SQL Server 2008 but does not mention express not sure if that could be a problem?
    MS Report Viewer 2008 SP1
    Java V6 Update 12
    He says the installation guide talks about a directory with Win32 in it which does not appear on his machine its a 64 bit machine.
    Please can someone give me some instructions on how to set up the TomCat part - I have looked but the troubleshooting that adobe has does not seem to be for Windows 2008 only Vista and XP and even then it says nothing about setting up TomCat
    Thanks in advance
    Erika

    Erika
    Not an area I can help with but try this post. http://forums.adobe.com/thread/204737?tstart=0
    Also look through the forum. There are some detailed posts on this.
    Finally take a look at http://notcolin.wordpress.com. There are some relevant blogs there.
    See www.grainge.org for RoboHelp and Authoring tips

  • How to config tomcat or browser can open some file type in browser?

    I use tomcat 4.0 (web server) for my project (JSP). I can upload file to folder of my web server. Some file type can read in browser e.g. .pdf .doc ,but some file type can't read in browser e.g. .ppt .xsl and etc. ? (http://localhost:8080//test.ppt --> it show some text,but can't read)
    How to configuration tomcat or browser for every file type can read in browser? help me please...

    In your tomcat confiruration files there must be some file for setting the mime types. You can add the required mime types to that file.
    Or the mime type configuration can be a part of some configuration file, you can change it there. Please look in to the conf directory.

  • How to startup tomcat not on the nic

    i downloaded tomcat-5.0 and want to run it locally set it up so that it doesn't bind to the ip address from the network card (nic). It only has to bind to 127.0.0.1 localhost.
    We have problems in the license agreement of the isp with setting up a webserver on port 8080 on the network card. That is why i want to set it up on localhost. I want to be able to see the output of a jsp. If my isp sees a webserver on my ip then they disconnect me (which is reasonable).
    How can i accomplish this?

    HEllo ,
    you can set up tomcat to run on diffrent port other than 8080.While running the set up of tomcat it asks for the port number you give it some other port number
    hope this will solve your problem
    bye
    Apratim Khandalkar

  • Security Manager Setting for Tomcat.

    Hi,
    Can anyone show me how to setup Security Manager for Tomcat step by step ?
    What do we need to set in server.xml and tomcat policy?
    After setting, how do run Tomcat?
    I did refer to the Tomcat Security Guide, but I didn't success to setup Security Manager.
    Can anyone explain in layman term to me?
    Your help will be appreciated.
    Thank you.

    I've solved my problem.
    For those who have are interested,
    you can refer to :
    http://jakarta.apache.org/tomcat/tomcat-3.2-doc/uguide/tomcat-security.html

  • How to link tomcat 5 with apache 2 on win2k?

    i've just installed the new tomcat 5.
    i need help on how to combine tomcat 5 with apache2.
    so can anyone give me some URLs?
    thanks very much.

    Have a look at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html . I believe it's works the same way as for Tomcat 4.1.
    The following steps briefly describe what to do:
    1. Install the mod_jk DLL (if running on Windows) in your Apache\modules directory. You can find it on http://jakarta.apache.org/site/binindex.cgi as JK 1.2 'Binary Releases'. (Installing the JK2 Connector is more complicated.) Just copy it over.
    2. Create a file workers.properties in you Tomcat\conf\jk directory with the following content:
    # Definiert worker fuer Tomcat
    worker.list=ajp13
    # --- Settings for the ajp13 worker
    worker.ajp13.type=ajp13
    worker.ajp13.host=localhost
    worker.ajp13.port=8009
    You may need to make amendments if you're not running it on the same host or port.
    3. In your Apache conf directory edit the httpd.conf file. Add the following lines:
    # load the module you just added
    LoadModule jk_module modules/mod_jk_xxx.dll
    # set path for your settings
    JkWorkersFile "D:/Programs/jakarta-tomcat-4.1.24/conf/jk/workers.properties"
    JkLogFile "D:/Programs/jakarta-tomcat-4.1.24/logs/mod_jk.log"
    JkLogLevel info
    <VirtualHost *>
    ServerName your.server.name.com
    # link all the static files directly to your tomcat directory. Ignore that if you have them somwhere else.
    Alias /kleika/1_00 "D:/Programs/jakarta-tomcat-4.1.24/webapps/yourwebapp"
    <Directory "D:/Programs/jakarta-tomcat-4.1.24/yourwebapp">
    Options Indexes FollowSymLinks
    DirectoryIndex index.html index.htm index.jsp
    </Directory>
    # all requests to this path will be forwarded to Tomcat
    JkMount /yourwebapp/* ajp13
    </VirtualHost>
    I hope that helps.
    Steffen

  • Urgent!! How to setup Tomcat instance in windows??

    Urgent!! How to setup Tomcat instance in windows??
    I have the next problem when execute tomcat.bat start:
    sin espacion en entorno
    you must set java_home to point at your java development kit installation

    You need to set the following two environment variables after you install tomcat on windows
    set JAVA_HOME= {Java directory path}
    set TOMCAT_HOME= {Tomcat directory path}
    Do this and try running start.bat again. It should get past this error.

  • How set-up time capsule as external hard drive

    How set-up a tme capsule as esternal hard drive

    Click here and follow the instructions. When it's on the Finder's desktop or in the sidebar, it's an external drive.
    (60835)

  • How to Embbed Tomcat in Java Application

    Hi
    At the moment i have the basic setup of applicatoin like this
    first i run the file "Tomcat.bat" that start the tomcat server, in a specific directory and also the webservice is enabled.
    Secondly then i run the Program.java that uses the web service started in the first step.
    However, now i want to start the webservice (Apache Tomcat) from with in the Java Application. So that whenever, i need to i can start it. I also need the control over ports, so as to which port should the tomcat run on...
    So at the end of the my simple question is how to run tomcat from with in a java application. At the moment i can not use the Runtime.exec() since this is a real time application and using Runtime.exec() causes some problems over the locking of threads...
    Any Help would be greatly appreciated.
    Thanks for looking.

    i looked at the my catalina.sh script file and see that java runs "org.apache.catalina.startup.Bootstrap" class first so that i think by instaitating that class and preparing the parameters that needed will start the tomcats "org.apache.catalina.startup.Bootstrap" class and that class will load all the needed parts and start serving request.
    and how to change starting port ? i thought that you can generate the server.xml on fly and after creating that file you can start tomcat.
    these are my opinion but i think these are true,i have no time to try this if i can i will write here.or if somebody can try write here.

  • How set up  macbook  pro Internet router?

    how set up  macbook  pro Internet router?

    But isn't the MacBook Pro connected to the modem and being used as the router? You can only share an Ethernet connection wirelessly. You only check the box to share the Ethernet connection to Wi-Fi. Do not check any of the other boxes. You select Ethernet from the dropdown menu as the connection you will share. Your preferences should look like this:
    The only difference will be that yours will show just Ethernet, not Ethernet 1.

  • How to redirect tomcat's (not in jwsdp) output  to catalina.out

    how to redirect tomcat's (not in jwsdp) output from consolee to catalina.out

    Finally we solve this.
    In startup.bat we've changed string
    call "%EXECUTABLE%" start %CMD_LINE_ARGS%
    to
    call "%EXECUTABLE%" run %CMD_LINE_ARGS% 1>..\logs\catalina.out 2>..\logs\catalina-err.out
    (the above in one string)
    May be someone know something better?

  • How set a SESSION variable?

    How set a SESSION variable?
    There is a standard object where could do this?
    Thx in advance Roberto.

    >I'm not at all sure that you CAN change the portal language in the way that you want.
    >Perhaps you should repost this question in the portal forum.
    No i manage the language of WebDynpro myself, with tables from R3.
    I wanna do only a thing like HTTP SESSION variable from the WEB.
    I could do it, using java function of servlet, but i don't wanna use third packege out of WebDynpro FRAMEWORK.
    The isn't an OBJECT CLASS STANDARD od WebDynpro that do that?
    I wanna PERMANENT variable from a WebDynpro to another.
    It is an implicit variable passage.
    No one did something of similar?
    Bye
    Message was edited by: giovanni angerame

  • How good is Tomcat ....

    Hi, just curious to know how well the Tomcat app-server performs in comparison to other servers. Can it handle large amounts of simultaneous users, and what would be the main differences between Tomcat and ones like SunONE, WebLogic, Websphere(besides price).
    Thanks

    Tomcat is a servlet/JSP engine. All the others that you mentioned are J2EE app servers that run EJBs in addition to servlets and JSPs.
    Benchmarks are dicey things: they can be manipulated.
    But with that in mind, Google turned these up for a search on "servlet engine performance benchmarks":
    http://www.webperformanceinc.com/library/ServletReport/
    http://www.intelliware.ca/individualmessages/2002/11/408.html
    http://www.theserverside.com/reviews/index.jsp
    MOD

Maybe you are looking for

  • How do I download iMessage to my macbook pro?

    how do I download iMessage to my macbook pro?

  • Update sql statement in sender/receiver jdbc adapter

    Hi What is the update sql statement we give in the sender/ receiver adapter when 1) SELECT statement was written in query sql statement 2) EXECUTE statement was written for a stored procedure in query sql statement thanks Anitha

  • Same file name - Different extension - Viewing problem

    I know this has been written about quite a bit and I have searched through the posts but I cannot find a solution to my problem. I shoot RAW, import then into Lightroom, make changes, import into CS3 & make more changes, save as a .psd file; no probl

  • Photo Stream album not listed. I have to go to iCloud to access it. ?

    Trying to add photos to my photo stream. I originally have a Photo Stream on my old PC, which is now in the closet. I have all my photos on my mac. How do I access my Photo Stream? In my iPhoto, it only shows up when I go into iCloud. I don't have th

  • Can't boot in OS 9

    I need to run OS 9.2.2 so that I can install a Sonnet Duet 1.8 Ghz processor upgrade. I have a G4 Quicksilver 2001, running OS 10.4.9 on the boot drive. I have 2 other internal drives for the purpose of storage. I performed a clean OS 9.1 install on