Using Tomcat - Avant go page timeout

Hello,
I am actually developing an application for Palm devices using Tomcat and AvantGo. I have some XML/XSL stuff which I transform to HTML using a Servlet. Several different parameters can be passed to the Servlet.
In AvantGo I created a custom channel which calls this Servlet. The first page contains links to other pages using the same Servlet with different parameters.
When synchronizing the Palm, AvantGo returns only the first page of my application, any other page contains the error message: "Timed Out. AvantGo closed the connection to this page because it was idle too long"
The synchronization lasts also about 2 Minutes, so no doubt about the correctness of the timeout message.
When browsing through the application with a normal browser or even with the Palm emulator - on the same or on a different machine - there is no problem and speed is fast enough.
I do not know if AvantGo opens several connections to Tomcat which cannot reply to them in a certain laps of time...
Any suggestions?
TIA,
Dominik

I just found the answer myself:
I put in the XSL for a link "?&param1=value1&param2=value2" which works best with a standard browser.
But IT DOES NOT WORK WITH AvantGo (and some other handheld browsers).
So put instead "<servletname>?&param1=value1&param2=value2"
Dominik

Similar Messages

  • Calling a class in JSP page using Tomcat 5.5

    Hi,
    I want to call a java class in a JSP page but getting error.
    I am trying to deploy JSP through a WAR file so for that I have created folder structure as per requirement and in WEB-INF folder, I kept web.xml file.
    What entry exactly I have to make in web.xml file as I am using Tomcat 5.5 webserver. When the same code I put in JSP then it works.
    my web.xml entry is
    <servlet>
    <servlet-name>TBS</servlet-name>
    <servlet-class>pack1.GetData</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>TBS</servlet-name>
    <url-pattern>/JSP/TBS_main</url-pattern>
    </servlet-mapping>
    Do I need to change in it or we have to make some more entries in different XML files.
    Please help me to resolve this issue.
    Thanks
    Mukesh

    you dont have to specify the class file in the web.xml just import it on your jsp then instatiate the class on the scriplet and you can call the methods on it.

  • How to call Servlet from jsp page and how to run this app using tomcat..?

    Hi ,
    I wanted to call servlet from jsp action i.e. on submit button of JSP call LoginServlet.Java file.
    Please tell me how to do this into jsp page..?
    Also i wanted to execute this application using tomcat.
    Please tell me how to do this...? what setting are required for this...? what will be url ..??
    Thanks.

    well....my problem is as follows:
    whenever i type...... http://localhost:8080/appName/
    i am getting 404 error.....it is not calling to login.jsp (default jsp)
    but when i type......http://localhost:8080/appName/login.do........it executes servlet properly.
    Basically this 'login.do' is form action (form action='/login.do').....and i wanted to execute this from login jsp only.(from submit button)
    In short can anyone please tell me how to diaplay jsp page using tomcat 5.5
    plz help me.

  • Serious problem of jdbc-mysql connectivity using tomcat

    hi everybody
    i m in serious problem since last 15-20 days. i m trying hard to make the connection jdbc-mysql using tomcat with the help of a jsp test page but every time i am facing almost the similar probems listed below in detail:
    to make sure that the jdrivers's .jar (mysql-connector-java-3.1.7-bin.jar) available for such connections working fine i have tried the above said connection without using tomcat....which is working fine...for this i have created a dummy database with a dummy table ..and written some queries in the .java file of my code which upon running inserts the specified values in the defined(dummy) database.
    this is the confirmation that the classpath etc..are ok in regard to the mysql-connector-java-3.1.7-bin.jar
    now i have placed a copy of this .jar file in to the commons/lib directory of the tomcat web server(which is suppossed to be the place for such external jars)
    after doing so i have followed 2 methods :
    method 1st:........
    i have made aone more jar file from the following .java file....
    import javax.naming.*;
    import javax.sql.*;
    import java.sql.*;
    public class TestSQLLoad
    String user = "Not Connected";
    String pwd = "no pwd";
    int id = -1;
    public void init() {
    try{
    Context ctx = new InitialContext();
    if(ctx == null ) {
    throw new Exception("Boom - No Context");
    DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/TestDB");
    if (ds != null) {
    Connection conn = ds.getConnection();
    if(conn != null) {
    user = "Got Connection "+conn.toString();
    Statement stmt = conn.createStatement();
    String q = "select name, password, id from user";
    ResultSet rst = stmt.executeQuery(q);
    if(rst.next()) {
    user=rst.getString(1);
    pwd=rst.getString(2);
    id = rst.getInt(3);
    conn.close();
    }catch(Exception e) {
    e.printStackTrace();
    public String getUser() {
    return user;
    public String getPassword() {
    return pwd;
    public int getID()
    return id;
    after compiling it at the cmd prompt i made a .jar file from the .class of it and named it MySQLLoad.jar...then i placed it also in to the commons/lib directory where the mysql-connector-java-3.1.7-bin.jar was already placed.
    then i have changed the server.xml and web.xml files from the conf directory of the tomcat as given here:
    server.xml
    <!-- Example Server Configuration File -->
    <!-- Note that component elements are nested corresponding to their
    parent-child relationships with each other -->
    <!-- A "Server" is a singleton element that represents the entire JVM,
    which may contain one or more "Service" instances. The Server
    listens for a shutdown command on the indicated port.
    Note: A "Server" is not itself a "Container", so you may not
    define subcomponents such as "Valves" or "Loggers" at this level.
    -->
    <Server port="8005" shutdown="SHUTDOWN">
    <!-- Comment these entries out to disable JMX MBeans support used for the
    administration web application -->
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
    <!-- Global JNDI resources -->
    <GlobalNamingResources>
    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    <!-- Editable user database that can also be used by
    UserDatabaseRealm to authenticate users -->
    <Resource name="UserDatabase" auth="Container"
    type="org.apache.catalina.UserDatabase"
    description="User database that can be updated and saved"
    factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
    pathname="conf/tomcat-users.xml" />
    </GlobalNamingResources>
    <!-- A "Service" is a collection of one or more "Connectors" that share
    a single "Container" (and therefore the web applications visible
    within that Container). Normally, that Container is an "Engine",
    but this is not required.
    Note: A "Service" is not itself a "Container", so you may not
    define subcomponents such as "Valves" or "Loggers" at this level.
    -->
    <!-- Define the Tomcat Stand-Alone Service -->
    <Service name="Catalina">
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector
    port="80" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" redirectPort="8443" acceptCount="100"
    connectionTimeout="20000" disableUploadTimeout="true" />
    <!-- Note : To disable connection timeouts, set connectionTimeout value
    to 0 -->
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
    enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost">
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
    resourceName="UserDatabase"/>
    <Host name="localhost" appBase="webapps"
    unpackWARs="true" autoDeploy="true"
    xmlValidation="false" xmlNamespaceAware="false">
    <Context path="/testdb" docBase="TOMCAT_HOME/webapps/tomcat-docs/testdb"
    debug="5" reloadable="true" crossContext="true" >
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="localhost_DBTest_log." suffix=".txt"
    timestamp="true"/>
    <Resource name="jdbc/TestDB"
    auth="Container"
    type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/TestDB">
    <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>10</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>5</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>10000</value>
    </parameter>
    <!-- MySQL dB username and password for dB connections -->
    <parameter>
    <name>username</name>
    <value>root</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>mysql</value>
    </parameter>
    <!-- Class name for mm.mysql JDBC driver -->
    <parameter>
    <name>driverClassName</name>
    <value>com.mysql.jdbc.Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:mysql://localhost/testdb?autoReconnect=true</value>
    </parameter>
    </ResourceParams>
    </Context>
    </Host>
    </Engine>
    </Service>
    </Server>
    and the other xml file i.e
    web.xml is here:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <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 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
    <servlet>
    <servlet-name>default</servlet-name>
    <resource-ref>
    <description>DB Connection</description>
    <res-ref-name>jdbc/TestDB</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-cl ***>
    <init-param>
    <param-name>debug</param-name>
    <param-value>0</param-value>
    </init-param>
    <init-param>
    <param-name>listings</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>invoker</servlet-name>
    <servlet-class>
    org.apache.catalina.servlets.InvokerServlet
    </servlet-class>
    <init-param>
    <param-name>debug</param-name>
    <param-value>0</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>jsp</servlet-name>
    <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
    <init-param>
    <param-name>fork</param-name>
    <param-value>false</param-value>
    </init-param>
    <init-param>
    <param-name>xpoweredBy</param-name>
    <param-value>false</param-value>
    </init-param>
    <load-on-startup>3</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>
    <!-- The mapping for the JSP servlet -->
    <servlet-mapping>
    <servlet-name>jsp</servlet-name>
    <url-pattern>*.jsp</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>jsp</servlet-name>
    <url-pattern>*.jspx</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>abs</extension>
    <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ai</extension>
    <mime-type>application/postscript</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>aif</extension>
    <mime-type>audio/x-aiff</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>aifc</extension>
    <mime-type>audio/x-aiff</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>aiff</extension>
    <mime-type>audio/x-aiff</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>aim</extension>
    <mime-type>application/x-aim</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>art</extension>
    <mime-type>image/x-jg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>asf</extension>
    <mime-type>video/x-ms-asf</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>asx</extension>
    <mime-type>video/x-ms-asf</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>au</extension>
    <mime-type>audio/basic</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>avi</extension>
    <mime-type>video/x-msvideo</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>avx</extension>
    <mime-type>video/x-rad-screenplay</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>bcpio</extension>
    <mime-type>application/x-bcpio</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>bin</extension>
    <mime-type>application/octet-stream</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>bmp</extension>
    <mime-type>image/bmp</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>body</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>cdf</extension>
    <mime-type>application/x-cdf</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>cer</extension>
    <mime-type>application/x-x509-ca-cert</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>class</extension>
    <mime-type>application/java</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>cpio</extension>
    <mime-type>application/x-cpio</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>csh</extension>
    <mime-type>application/x-csh</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>css</extension>
    <mime-type>text/css</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>dib</extension>
    <mime-type>image/bmp</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>doc</extension>
    <mime-type>application/msword</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>dtd</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>dv</extension>
    <mime-type>video/x-dv</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>dvi</extension>
    <mime-type>application/x-dvi</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>eps</extension>
    <mime-type>application/postscript</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>etx</extension>
    <mime-type>text/x-setext</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>exe</extension>
    <mime-type>application/octet-stream</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>gif</extension>
    <mime-type>image/gif</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>gtar</extension>
    <mime-type>application/x-gtar</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>gz</extension>
    <mime-type>application/x-gzip</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>hdf</extension>
    <mime-type>application/x-hdf</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>hqx</extension>
    <mime-type>application/mac-binhex40</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>htc</extension>
    <mime-type>text/x-component</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>htm</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>hqx</extension>
    <mime-type>application/mac-binhex40</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ief</extension>
    <mime-type>image/ief</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jad</extension>
    <mime-type>text/vnd.sun.j2me.app-descriptor</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jar</extension>
    <mime-type>application/java-archive</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>java</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jnlp</extension>
    <mime-type>application/x-java-jnlp-file</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jpe</extension>
    <mime-type>image/jpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jpeg</extension>
    <mime-type>image/jpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jpg</extension>
    <mime-type>image/jpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>js</extension>
    <mime-type>text/javascript</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jsf</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jspf</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>kar</extension>
    <mime-type>audio/x-midi</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>latex</extension>
    <mime-type>application/x-latex</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>m3u</extension>
    <mime-type>audio/x-mpegurl</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mac</extension>
    <mime-type>image/x-macpaint</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>man</extension>
    <mime-type>application/x-troff-man</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>me</extension>
    <mime-type>application/x-troff-me</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mid</extension>
    <mime-type>audio/x-midi</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>midi</extension>
    <mime-type>audio/x-midi</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mif</extension>
    <mime-type>application/x-mif</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mov</extension>
    <mime-type>video/quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>movie</extension>
    <mime-type>video/x-sgi-movie</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mp1</extension>
    <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mp2</extension>
    <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mp3</extension>
    <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mpa</extension>
    <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mpe</extension>
    <mime-type>video/mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mpeg</extension>
    <mime-type>video/mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mpega</extension>
    <mime-type>audio/x-mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mpg</extension>
    <mime-type>video/mpeg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>mpv2</extension>
    <mime-type>video/mpeg2</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ms</extension>
    <mime-type>application/x-wais-source</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>nc</extension>
    <mime-type>application/x-netcdf</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>oda</extension>
    <mime-type>application/oda</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pbm</extension>
    <mime-type>image/x-portable-bitmap</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pct</extension>
    <mime-type>image/pict</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pdf</extension>
    <mime-type>application/pdf</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pgm</extension>
    <mime-type>image/x-portable-graymap</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pic</extension>
    <mime-type>image/pict</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pict</extension>
    <mime-type>image/pict</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pls</extension>
    <mime-type>audio/x-scpls</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>png</extension>
    <mime-type>image/png</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pnm</extension>
    <mime-type>image/x-portable-anymap</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>pnt</extension>
    <mime-type>image/x-macpaint</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ppm</extension>
    <mime-type>image/x-portable-pixmap</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ppt</extension>
    <mime-type>application/powerpoint</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ps</extension>
    <mime-type>application/postscript</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>psd</extension>
    <mime-type>image/x-photoshop</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>qt</extension>
    <mime-type>video/quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>qti</extension>
    <mime-type>image/x-quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>qtif</extension>
    <mime-type>image/x-quicktime</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ras</extension>
    <mime-type>image/x-cmu-raster</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>rgb</extension>
    <mime-type>image/x-rgb</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>rm</extension>
    <mime-type>application/vnd.rn-realmedia</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>roff</extension>
    <mime-type>application/x-troff</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>rtf</extension>
    <mime-type>application/rtf</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>rtx</extension>
    <mime-type>text/richtext</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>sh</extension>
    <mime-type>application/x-sh</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>shar</extension>
    <mime-type>application/x-shar</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>smf</extension>
    <mime-type>audio/x-midi</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>sit</extension>
    <mime-type>application/x-stuffit</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>snd</extension>
    <mime-type>audio/basic</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>src</extension>
    <mime-type>application/x-wais-source</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>sv4cpio</extension>
    <mime-type>application/x-sv4cpio</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>sv4crc</extension>
    <mime-type>application/x-sv4crc</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>swf</extension>
    <mime-type>application/x-shockwave-flash</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>t</extension>
    <mime-type>application/x-troff</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>tar</extension>
    <mime-type>application/x-tar</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>tcl</extension>
    <mime-type>application/x-tcl</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>tex</extension>
    <mime-type>application/x-tex</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>texi</extension>
    <mime-type>application/x-texinfo</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>texinfo</extension>
    <mime-type>application/x-texinfo</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>tif</extension>
    <mime-type>image/tiff</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>tiff</extension>
    <mime-type>image/tiff</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>tr</extension>
    <mime-type>application/x-troff</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>tsv</extension>
    <mime-type>text/tab-separated-values</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ulw</extension>
    <mime-type>audio/basic</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ustar</extension>
    <mime-type>application/x-ustar</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>xbm</extension>
    <mime-type>image/x-xbitmap</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>xht</extension>
    <mime-type>application/xhtml</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>xhtml</extension>
    <mime-type>application/xhtml</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>xml</extension>
    <mime-type>text/xml</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>xpm</extension>
    <mime-type>image/x-xpixmap</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>xsl</extension>
    <mime-type>text/xml</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>xwd</extension>
    <mime-type>image/x-xwindowdump</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>wav</extension>
    <mime-type>audio/x-wav</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>svg</extension>
    <mime-type>image/svg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>svgz</extension>
    <mime-type>image/svg</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>vsd</extension>
    <mime-type>application/x-visio</mime-type>
    </mime-mapping>
    <mime-mapping>
    <!-- Wireless Bitmap -->
    <extension>wbmp</extension>
    <mime-type>image/vnd.wap.wbmp</mime-type>
    </mime-mapping>
    <mime-mapping>
    <!-- WML Source -->
    <extension>wml</extension>
    <mime-type>text/vnd.wap.wml</mime-type>
    </mime-mapping>
    <mime-mapping>
    <!-- Compiled WML -->
    <extension>wmlc</extension>
    <mime-type>application/vnd.wap.wmlc</mime-type>
    </mime-mapping>
    <mime-mapping>
    <!-- WML Script Source -->
    <extension>wmls</extension>
    <mime-type>text/vnd.wap.wmlscript</mime-type>
    </mime-mapping>
    <mime-mapping>
    <!-- Compiled WML Script -->
    <extension>wmlscriptc</extension>
    <mime-type>application/vnd.wap.wmlscriptc</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>wrl</extension>
    <mime-type>x-world/x-vrml</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>Z</extension>
    <mime-type>application/x-compress</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>z</extension>
    <mime-type>application/x-compress</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>zip</extension>
    <mime-type>application/zip</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    </web-app>
    after all this i have taken a jsp page whose code is here:
    (the mysql database used is named as "testdb" and the table name is "user" which is having fields name,password and id)
    <html>
    <head>
    <title>DB Test</title>
    </head>
    <body>
    <%
    TestSQLLoad tst = new TestSQLLoad ( );
    tst.init();
    %>
    <h2>Results</h2>
    User <%= tst.getUser() %>
    Pwd <%= tst.getPassword() %>
    Id <%= tst.getID() %>
    </body>
    </html>
    and placed it in to the Tomcat 5.5\webapps\tomcat-docs\testdb directory and saved as test-db.jsp
    when i run this page on the browser i get a lot may errors stating
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 12 in the jsp file: /testdb/test-db.jsp
    Generated servlet error:
    TestSQLLoad cannot be resolved or is not a type
    An error occurred at line: 12 in the jsp file: /testdb/test-db.jsp
    Generated servlet error:
    TestSQLLoad cannot be resolved or is not a type
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.j ava:84)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:389)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.4 logs.
    AND NOW WHEN just to get rid of such errords i try to include a statement
    <%@ page import="pkg.TestSQLLoad" %> in the jsp page code (and also place the MySQLLoad.class file in a folder called pkg and place it in the same directory where the jsp page is )and make it look like
    <html>
    <head>
    <%@ page import="pkg.TestSQLLoad" %>
    <title>DB Test</title>
    </head>
    <body>
    <%
    TestSQLLoad tst = new TestSQLLoad ( );
    tst.init();
    %>
    <h2>Results</h2>
    User <%= tst.getUser() %>
    Pwd <%= tst.getPassword() %>
    Id <%= tst.getID() %>
    </body>
    </html>
    now when i run it i get the following errors:
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Only a type can be imported. pkg.TestSQLLoad resolves to a package
    An error occurred at line: 12 in the jsp file: /testdb/test-db.jsp
    Generated servlet error:
    TestSQLLoad cannot be resolved or is not a type
    An error occurred at line: 12 in the jsp file: /testdb/test-db.jsp
    Generated servlet error:
    TestSQLLoad cannot be resolved or is not a type
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.j ava:84)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:389)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    in response to the above error i have even tried placing the MySQLLoad.class directly in the testdb folder along with the jsp page without keeping it in a package named pkg and then importing directly as <@page import="MySQLLoad" %>
    that too gave me the following errors
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    The import TestSQLLoad cannot be resolved
    An error occurred at line: 12 in the jsp file: /testdb/test-db.jsp
    Generated servlet error:
    TestSQLLoad cannot be resolved or is not a type
    An error occurred at line: 12 in the jsp file: /testdb/test-db.jsp
    Generated servlet error:
    TestSQLLoad cannot be resolved or is not a type
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.j ava:84)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:389)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    and if i do not use the statement <%@ page import="MySQLLoad"%> then also i get the errors like
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 11 in the jsp file: /testdb/test-db.jsp
    Generated servlet error:
    TestSQLLoad cannot be resolved or is not a type
    An error occurred at line: 11 in the jsp file: /testdb/test-db.jsp
    Generated servlet error:
    TestSQLLoad cannot be resolved or is not a type
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.j ava:84)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:389)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    THE 2nd Method:
    in my second method i did the same changes in the web.xml and server.xml
    then i took a jsp page with the following code:
    <%@ page import="javax.sql.*,java.sql.*,javax.naming.*,com.mysql.jdbc.*" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> trial doc </TITLE>
    </HEAD>
    <BODY>
    <h1>Trial Document</h1>
    <% InitialContext context=new InitialContext( );
    DataSource dataSource=(DataSource) context.lookup("java:comp/env/jdbc/testdb");
    Connection conn=dataSource.getConnection();
    Statement stmt=conn.createStatement();
    ResultSet rset=stmt.executeQuery("select * from user");
    if (rset.next()){
    %>
    <table width="100%" border="1">
    <tr align="left">
    <th>name</th> <th>password</th><th>id</th>
    </tr>
    <%
    do {
    %>
    <tr><td> <%=rset.getString(1)%> </td>
    <td><%=rset.getString(2) %></td>
    <td><%=rset.getString(3) %></td></tr>
    <%
    } while (rset.next());
    %>
    </table>
    <%
    } else{
    %>
    No results from query
    <%
    rset.close();
    stmt.close();
    conn.close();
    context.close();
    %>
    </BODY>
    </HTML>
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 15 in the jsp file: /testdb/Big1.jsp
    Generated servlet error:
    The type Connection is ambiguous
    An error occurred at line: 15 in the jsp file: /testdb/Big1.jsp
    Generated servlet error:
    The type Statement is ambiguous
    An error occurred at line: 15 in the jsp file: /testdb/Big1.jsp
    Generated servlet error:
    The type ResultSet is ambiguous
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.j ava:84)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:389)
    org.apache.jasper.compiler.Compiler.compile(C

    thanx for ur response
    as u said that the problem is more of a jsp page not getting compiled....
    me also pointed towards the similar situation providing all the surrounding situations
    which i have met and gone through
    i m still thinking that problem may b in the tomcat's server.xml and web.xml as well
    so better if u plz guide me in that regard
    regards,
    kuldeep

  • Viewing Excel Files using Tomcat - Problem with caching

    Hi all,
    A small part of an application I'm writing has links to Excel files for users to view/download. I'm currently using Tomcat v5 as the web/app server and have some very simple code (an example is shown below) which calls the excel file.
    <%@ page contentType = "application/vnd.ms-excel" %>
    <%
    response.setHeader("Pragma", "no-cache");
    response.setHeader("Cache-Control", "no-cache");
    response.setDateHeader("Expires", 0);
    response.sendRedirect("file1.xls");
    %>
    This all works except but I'm having one big problem.
    The xls file (file1.xls) is updated via a share on the server so each month, the xls file is overwritten with the same name but with different contents. I'm finding that when an update is made to the xls file and the user then attempts to view the new file in the browser they recieve only the old xls file. It's caching the xls file and I don't want it to. How can I fix this so that it automatically gives the user the new updated file.
    The only way I've managed to get Tomcat to do this is to delete the work directory and delete the file from my IE temp folder and then restart Tomcat - this is a bit much!
    Any help would be greatly appreciated.
    Thanks.

    I'd a problem with caching a few years back, for a servlet request which returned an SVG file.
    As a workaround, I ended up putting appending "#" and a timestamp / random number after it. The browser assuming each request was new, and didn't use the cache.
    Eg.
    http://myserver/returnSVG.do#1234567
    where 1234567 is a timestamp / random.
    Not sure whether you can do this on a file based URL... but maybe worth a shot...
    regards,
    Owen

  • Importing class in a jsp using Tomcat

    Hello All,
    Using Tomcat:
    I have class here:
    examples/WEB-INF/classes/ package/myclass.class
    I have a .jsp here:
    examples/JSPFolder/myjspfile.jsp
    I want to import the class into the jsp.
    I have tried the following combinations of importy lines based on previous posts on these boards and each have failed with same error:
    Unable to load class for JSP
    <%@ page import="myclass" %>
    <%@ page import="myclass.*" %>
    <%@ page import="package.myclass" %>
    <%@ page import="package.myclass.*" %>
    <%@ page import="WEB-INF/classes/package/myclass%>
    I have seen a number of posts for this same problem, and have tried those solutions as well, but none work. I am sure that this is simply a problem of finding the right directory, as I can successfully run the .jsp file iwhen I remove the import line.
    Can someone please help?

    There is a folder for shared packages
    tomcat_root\lib; or
    tomcat_root\common
    also most versions have a lib or common folder for each webapp for packages that are not to be shared.
    tomcat_root\webapps\appname\web-inf\lib
    Agreed that it is strange to allow servlets to import from the classes foler but not JSPs. It should make no difference but it is convension to place single classes in the same folder as the app's directory and packages (especially jar's) in the lib directory.

  • Calling a external Java method from JSP - using Tomcat server

    Hi all,
    I am trying to call a method in an external Java file from my JSP. I am using Tomcat server.
    I have my class within the package package "mypackage" and it is called myclass.class. It has only one static method mymethod() which reads from a file and writes to a file.
    I compiled the java class and I put the class file under webapps/ROOT/web-inf/classes/mypackage/myclass.class
    I am trying to say something like this from my JSP file(which is under webapps/ROOT) :
    <%@ page import = "mypackage.myclass"%>
    <% myclass.mymethod(); %>
    I am not instatiating the class as its a static method.
    This is what I get while accessing my jsp file :
    javax.servlet.ServletException: try to access class mypackage.myclass from class org.apache.jsp.index_005ftest_jsp
    To put my problem in a nutshell, Can someone guide me how to access a method of an external class from a JSP page? I have a bunch of pages doing the same operation so I thought I would have it in a method and call it from every page. Even though I tried to put the file under web-inf/classes, The JSP is not able to see the class.
    Please help.
    Thanks
    -Uday

    I have a situation that is a bit similar. I have successfully used beans for storing methods used in JSPs and used by other methods in the same class as was suggested above. Now I would like to break some methods into another (utility) class since they are lower level and can be used by lots of things. They are for database operations (given a String query and String dbname, it queries and returns ResultSet for example). I want to have them in a separate class for reusability and OOP.
    I am having problems calling those public static methods in the public class from my bean that communicates with the JSP. I can't compile the class that calls the method in the database ops class. I get an error like :
    loginHelper.java:45: cannot find symbol
    symbol : variable sqlHelper
    location: class dbHelperBean.loginHelper
    and when I include the package name in the call I get
    loginHelper.java:45: cannot find symbol
    symbol : class sqlHelper
    location: package dbHelperBean
    That's strange since the package of both classes is dbHelperBean and the class is indeed called sqlHelper. I tried to compile it in the same directory as sqlHelper as well. What am I doing wrong?
    Thanks for any help.

  • Problems with JSP and Tag Libraries in JBoss using Tomcat 5.5.9

    Hi,
    I am experiencing a really weird situation here. When running a deployed EJB3 ear application in a JBoss 4.0.3sp1 application using Tomcat service 5.5.9, Jasper is unable to compile any JSP file using Tag Libraries. To be more precise, when generating the Java source file (looking in the 'work' directory) everything in the file after the first occurance of a Tag Library usage is commented out (with "//"), causing the Java source to be invalid and outputs an error when accessing the page via a browser saying:
    "org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Syntax error, insert "}" to complete ClassBody
    Generated servlet error:
    Syntax error, insert "}" to complete Block
    Generated servlet error:
    Syntax error, insert "finally" to complete TryStatement
    Generated servlet error:
    Syntax error, insert "}" to complete MethodBody"
    etc... where every error row is a suggestion of steps to take to make the source file valid. (of course).
    The Tag Library jar files are located in the web application WEB-INF/lib folder as they should be. The descriptive Tag Library Definition files (tld:s) are located in the WEB-INF folder and every JSP file references these tld files directly via this path (WEB-INF/).
    Any hints are most appreciated!!
    Cheers!
    /Henrik

    Hi,
    I am experiencing a really weird situation here. When running a deployed EJB3 ear application in a JBoss 4.0.3sp1 application using Tomcat service 5.5.9, Jasper is unable to compile any JSP file using Tag Libraries. To be more precise, when generating the Java source file (looking in the 'work' directory) everything in the file after the first occurance of a Tag Library usage is commented out (with "//"), causing the Java source to be invalid and outputs an error when accessing the page via a browser saying:
    "org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Syntax error, insert "}" to complete ClassBody
    Generated servlet error:
    Syntax error, insert "}" to complete Block
    Generated servlet error:
    Syntax error, insert "finally" to complete TryStatement
    Generated servlet error:
    Syntax error, insert "}" to complete MethodBody"
    etc... where every error row is a suggestion of steps to take to make the source file valid. (of course).
    The Tag Library jar files are located in the web application WEB-INF/lib folder as they should be. The descriptive Tag Library Definition files (tld:s) are located in the WEB-INF folder and every JSP file references these tld files directly via this path (WEB-INF/).
    Any hints are most appreciated!!
    Cheers!
    /Henrik

  • Unable to load Applet in JSP using Tomcat 5.5.12

    Hi
    I am aunable to applet in jsp using Tomcat 5.5.12 and JRE 1.5. Below is the code that I am using
                                       <applet
                                       codebase = "."
                                       archive = "WebPOSApplet.jar"
                                       code = "webposprint.WPMainApplet.class"
                                       name = "Trans Applet"
                                       width = "450"
                                       height = "115"
                                       hspace = "0"
                                       vspace = "0"
                                       align = "middle"
                                       >
    <param name = "redirectInfo" value = "SearchProducts.do">
                                       </applet>
    <%/*%>
    <OBJECT
                                       classid = "clsid:CAFEEFAC-0014-0002-0000-ABCDEFFEDCBA"
                                       codebase = "http://java.sun.com/products/plugin/autodl/jinstall-1_4_2-windows-i586.cab#Version=1,4,2,0"
                                       WIDTH = 450 HEIGHT = 115 >
    <PARAM NAME = CODE VALUE = webposprint.WPMainApplet.class>
    <PARAM NAME = archive VALUE = WebPOSApplet.jar>
    <PARAM NAME = "type" VALUE = "application/x-java-applet;jpi-version=1.4.2">
    <param name = "redirectInfo" value = "SearchProducts.do">
    <PARAM NAME = "scriptable" VALUE = "false">
    <PARAM NAME = model VALUE=models/buckminsterfullerine.xyz>
    <embed width="450" height="115" code="webposprint.WPMainApplet.class" archive="WebPOSApplet.jar" type="application/x-java-applet;jpi-version=1.4.2" redirectinfo="SearchProducts.do" scriptable="false" model="models/buckminsterfullerine.xyz" src="webposprint.WPMainApplet.class">
    </embed> <COMMENT> <EMBED
                                       type = "application/x-java-applet;jpi-version=1.4.2" \
                                       CODE = webposprint.WPMainApplet.class\
                                                 archive = WebPOSApplet.jar\
                                       WIDTH = 373 \
                                       HEIGHT = 167 \
                                       model =models/buckminsterfullerine.xyz \
                                            scriptable = false \
                                            pluginspage = "http://java.sun.com/products/plugin/index.html#download"> <NOEMBED>
    alt="Your browser understands the <APPLET>
    tag but isn't running the applet, for some reason."
    Your browser is completely ignoring the <APPLET>
    tag! </NOEMBED> </EMBED> </COMMENT>
    </OBJECT>
    <%*/%>
    This code doesn't seems working with Tomcat 5.5.12. I works fine with Tomcat 4.1.31
    Please help
    Thanks

    Applets run client side - which means the relevant class files need to be downloaded to the client.
    Anything under the WEB-INF directory is not directly accessible by the client. Nothing under WEB-INF can be downloaded.
    ergo, specifying the WEB-INF directory as part of your applet codebase is a bad idea.
    I would suggest try copying the applet classes from under WEB-INF to some other place in your application.
    Also, you should probably specify the full class name of your Applet in the plugin tag.
    <%@ page import="com.util.MyApplet" %>
    <jsp:plugin type="applet" code="com.util.MyApplet" codebase="/classes" width="250" height="100" jreversion="1.6">
         <jsp:fallback>
              <B>Unable to start plugin!</B>
         </jsp:fallback>
    </jsp:plugin>cheers,
    evnafets

  • Using TomCat to view JSP files

    I've installed tomcat for the purpose of viewing jsp files.
    In which folder am i supposed to place the jsp files to view them?
    Also, what address am i supposed to type in my browser ( http://localhost:8080/myJspFile.jsp ?????? )
    My tomcat folder is e:\tomcat
    and JAVA_HOME is d:\jdk1.3
    Thank you

    Here is a good link for you to start from
    http://www.moreservlets.com/Using-Tomcat-4.html#Try-Pages
    http://localhost:8080/myJspFile.jsp
    This looks right unless you have changed your port setting which the link above shows you how to change the port setting to port 80 so you dont have to type http://localhost:8080/blah it would http://localhost/blah.
    You_tomcat_install/webapps/ROOT
    or
    You_tomcat_install/webapps/ROOT/some_dir
    Anyways good luck and go to that link I gave you and it should help you out alot.

  • Deploying app in public domain using tomcat on unix

    I am using windows and I have deployed my app to a local instance of tomcat 5.5.9 and it runs perfectly. However I am trying to get my app running on my web host using tomcat 5.5.9 on unix but it has problems.
    As stated in other threads my host provides a public_html folder for my site however *.war files do not run or unpack from this folder and my web host won�t allow deploying of *.war files elsewhere in their system. So instead I upload all the folders/files in my app build which should give the same result as deploying the *.war anyway.
    Unfortunately the app won�t run at all when entering the domain www.<mydomain>.com due to following error:
    javax.servlet.jsp.JspException: Cannot find FacesContext
    When I enter the URL www.<mydomain>.com/faces/index.jsp the page loads but has problems with referencing styles and scripts that are generated dynamically at runtime such as:
    <script type="text/javascript" src="/theme/com/sun/rave/web/ui/defaulttheme/javascript/formElements.js"></script>
    <link rel="stylesheet" type="text/css" href="/theme/com/sun/rave/web/ui/defaulttheme/css/css_master.css" />
    <link rel="stylesheet" type="text/css" href="/theme/com/sun/rave/web/ui/defaulttheme/css/css_ie55up.css" />
    <script type="text/javascript">
    var sjwuic_ScrollCookie = new sjwuic_ScrollCookie('/index.jsp', '/faces/index.jsp');
    </script>
    I think this problem is because the path to my webapp is not standard. I asked my web host for the absolute path to my domain and they said it is �/home/<account name>/public_html�. However I want to avoid having to enter faces/index.jsp into the url if possible. It works like this locally so why not on web host? The welcome file in web.xml points to �faces/index.jsp� so it should come up automatically just by entering the domain. But even when I run my app locally I can enter localhost:8080/<webapp>/faces/index.jsp and it renders correctly.
    So my questions are�
    Does anyone know how I can get my app working properly under my public domain? Does my problem relate to the pathing of my app and if so is it possible to specify the absolute path to my app so that tomcat registers it properly. If so where and how would this be done?
    Obviously all configuration must be handled within my app as I have no access to modify settings on the web host.
    Please help!
    Thanks

    Hi, i managed to work out a solution with my web host.
    The problem was that they are using Apache to process all incoming http requests then only forwarding specific requests to tomcat.
    So by entering the port number after the domain ie www.mydomain.com:8080/ the http request went directly to tomcat and was processed correctly.
    Furthermore my web host configured apache so all requests go straight to tomcat so now the port number isn't even required and all is well with the world again!
    except... navigating to different pages in my site does not update the url correctly.
    For example the site loads index.jsp when entering www.mydomain.com/ but when navigating to another page (i.e. photo.jsp) the photo.jsp page loads ok but the url is updated to www.mydomain.com/faces/index.jsp which is not correct. When refreshing the photo.jsp page it reloads the index.jsp page because of the incorrect url.
    any ideas...

  • Need basic info how to run my servlet with SSL/http (I am using Tomcat 4.0.

    I have a servlet that gets a user id and password
    and query information from an HTML form
    and then writes back the answer to the query as a new web page. We want to
    make the transaction secure because it is customer confidential information.
    What do I need to do in my servlet to get it to run under SSL?
    (I am using Apache Tomcat 4.0 on WinNT and
    can use either JDK 1.2.2 or 1.3.1....)
    I know this is a very basic question, but what I'm reading does not
    make it clear to me what I have to do to my servlet code to use SSL, or
    whether the server and client do all the work "outside" my
    servlet code so that no changes to the servlet would be required(???).
    Can I use Tomcat 4.0 for SSL? Any help getting my head pointed in the right
    direction will be much appreciated. (You may reply to this forum or
    to my email: [email protected]
    Much thanks!

    When one follows this how-to, one got the following result:
    The same page, say xyz.html, can be accessed in two ways: one is from
    http://localhost:8080/xyz.html, and the other is from https://localhost:8443/xyz.html.
    How can one allow people to be only able to access from https://localhost:8443/xyz.html, to be not able to access from http://localhost:8080/xyz.html? There is one sentence mentioned some where that Servlet 2.4 specification can do this. But Servlet 2.4 specification would not provide any help. Any clue?

  • How use Tomcat with MySQL

    Can anybody suggest me as how to use Tomcat with MySQL server.
    Thanks in advance.
    Khiz_eng

    add the classpath to the JDBC-driver to the tomcat-
    environment (I did it in tomcat.sh)
    Then put your code accessing MySQL into a servlet....
    You can put the user-ID and the password into a session-
    object or read them in as parameters.
    The book 'core Servlets and Java Server Pages' from
    Marty Hall gave me a lot information.
    Regards
    Fredy

  • Tomcat webapp jsp pages are blanc

    Hi,
    I'm using tomcat 5.5.17 and it's working fine. When I deploy my webapp to,I can start Tomcat , but when I request a jsp page, no matter which one it is, it returns a blanc page.
    Can someone help me?
    Thanks.
    Regards,
    Michiel.

    Hi,
    My Tomcat is configured well. Other webapps run just fine.
    Within my war file that Ideploy to this Tomcat installation there are several jar files included as a reference to them.Because at first I included as well the javax.servlet.jar and the javax.servlet.jsp.jar which Tomcat uses as well, I thought that there might bea conflictas I describedin my first post. But I removed them and there is no change (I stopped Tomcat before).
    Thanks.
    Michiel.

  • Sum of LineCount Including Groups and Detail Data On Each Page Used To Generate New Page If TotalPageLineCount 28

    Post Author: tadj188#
    CA Forum: Formula
    Needed: Sum of LineCount Including Groups and Detail Data On Each Page Used To Generate New Page If TotalPageLineCount > 28
    Background:
    1) Report SQL is created with unions to have detail lines continue on a page, until it reaches page footer or report footer, rather than using  subreports.    A subreport report is now essentially a group1a, group1b, etc. (containing column headers and other data within the the report    with their respective detail lines).  I had multiple subreports and each subreport became one union.
    Created and tested, already:
    1) I have calculated @TotalLineForEachOfTheSameGroup, now I need to sum of the individual same group totals to get the total line count on a page.
    Issue:
    1) I need this to create break on a certain line before, it dribbles in to a pre-printed area.
    Other Ideas Appreciated:
    1) Groups/detail lines break inconveniently(dribble) into the pre-printed area, looking for alternatives for above situation.
    Thank you.
    Tadj

    export all image of each page try like this
    var myDoc = app.activeDocument;
    var myFolder = myDoc.filePath;
    var myImage = myDoc.allGraphics;
    for (var i=0; myImage.length>i; i++){
        app.select(myImage[i]);
        var MyImageNmae  = myImage[i].itemLink.name;
        app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.high;
        app.jpegExportPreferences.exportResolution = 300;
           app.selection[0].exportFile(ExportFormat.JPG, File(myFolder+"/"+MyImageNmae+".JPEG"), false);
        alert(myImage[i].itemLink.name)

Maybe you are looking for