Web.xml related problem

Hi,
user.do should take me to UserServlet.
*.do(except user.do) should take me to ActionServlet.
Can anyone tell me how I map this in web.xml
Thanks.

Just create two servlet mappings, one for user.do, one for *.do
Exact matches take precedence over wildcards.
<!-- Standard Action Servlet Mapping -->
<servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
</servlet>
<servlet>
    <servlet-name>userServlet</servlet-name>
    <servlet-class>com.mypackage.UserServlet</servlet-class>
</servlet>
  <servlet-mapping>
    <servlet-name>userServlet</servlet-name>
    <url-pattern>/user.do</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>

Similar Messages

  • Web.xml file problem in tomcat

    Hi i need help in this... its urgent
    currently i just subscribe to a web hosting site and i need to start the private tomcat in the web server..
    The followings are the instructions and i have follow them but i do not know how to create a web.xml file to store in the folder indicated for example a HelloServlet that im testing :
    To setup servlet, you need to configure servlet into the file web.xml which needs to be placed in /var/www/html/WEB-INF directory.
    www root directory or webapps:/var/www/htm
    Classes directory located in: /var/www/html/WEB-INF/Classes/
    There you will need to upload your Java class file.
    Our default url-mapping for servlet is: /servlet/*
    To check servlet in your browser: www.mydomain.net/servlet/HelloWorld
    Jsp Files - Upload anywhere in /var/www/html
    all the above steps are follow except the web.xml file which i suppose to write and store in the folder... but i actually try to write one but i still cannot load my servlet on the webpage... test on standalone tomcat works.
    pls help its urgent!!!

    first sorry about cross posting the subject. i didnt know i am not suppose to do that. i post in a few forums that are related to my topic. sorry
    The tomcat on the web server is of version Private J2EE / Tomcat 4.1.29 and the standalone tomcat i am using is also tomcat 4.1
    the web.xml in my standalone server in root/web-inf/ is as follows and it is configure for authentication purposes. It works together with the tomcat-users.xml located on conf directory
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
    <web-app>
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>
    Restricted Area
    </web-resource-name>
    <url-pattern>/secure/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>manager</role-name>
    <role-name>tomcat</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
    <form-login-page>/Login.html</form-login-page>
    <form-error-page>/Error.html</form-error-page>
    </form-login-config>
    </login-config>
         <security-role>
         <description>The Secure ROLE</description>
         <role-name>manager</role-name>
              <role-name>tomcat</role-name>
         </security-role>
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>
    Restricted Area
    </web-resource-name>
    <url-pattern>/Customer/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>customer</role-name>
    <role-name>tomcat</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
    <form-login-page>/Login.html</form-login-page>
    <form-error-page>/Error.html</form-error-page>
    </form-login-config>
    </login-config>
         <security-role>
         <description>The Secure ROLE</description>
         <role-name>customer</role-name>
              <role-name>tomcat</role-name>
         </security-role>
    </web-app>
    using this web.xml, my stanalone web pages works fine for all servlets and jsp. however if i copy this over to the web server, i still cannot load my servlets and jsp. moreover it doesnt work for authentication purpose anymore. i don't know why too
    i have try the codes you write before and it also doesnt work
    the problem is i cannot get the support form the web hosting site. This is the link that suppose to teach me but it doesn not tell me how to configure my web.xml
    https://www.eroute.net/JSPSupport.htm

  • Web based related problem

    Hello!
    Please help me with this problem.
    I need to preserve the values I have entered in a textbox even if I shifted from one page to another, but currently, if I did some changes on the current page(ex: page 2) and I shifted to another page(page 3), if I returned to the previous page (page 2), the changes I made were no longer reflected.
    In addition, I have to save whatever changes I made to all the pages I have, but everytime I shift pages, it goes back to its original value.
    Any help is appreciated.
    Thanks a lot!

    of course you can preserve it.
    Make an array on the number of records you wish that will come from the database.. let say you have 50.. The as you click the button submit the page. The action must be set to itself.. So you can request for the values of the textbox.. In your case you can request for 10 values because you have 10 records per page.. Now save the values in your array. the array will serve as the temporary storage.. you can put it on session for you to be able to get the values easily..
    You can if the array now has values on it, you can now assign it to your textboxes.. lets say
    on page 1:
    <input type="text" name="textBox1" value<%=YourArray[0]%>
    <input type="text" name="textBox2" value<%=YourArray[1]%>
    <input type="text" name="textBox3" value<%=YourArray[2]%>
    <input type="text" name="textBox4" value<%=YourArray[3]%>
    .on page 2:
    <input type="text" name="textBox1" value<%=YourArray[10]%>
    <input type="text" name="textBox2" value<%=YourArray[11]%>
    <input type="text" name="textBox3" value<%=YourArray[12]%>
    <input type="text" name="textBox4" value<%=YourArray[13]%>
    .that is my analysis to your problem.. Hope it will help.

  • XML Related Problem

    Post Author: Anandh
    CA Forum: Formula
    Hi All,
    I am using Crystal Enterprise 8 , i use to generate reports from XML.
    Many users wuld call a report so i have to change the xml name dynamically .
    Can we change the xml name  for a report in dynamically or pass the xml name in URL.
    kindly help me in getting a solution.
    Thanks in advance.
    Anandh.B

    Just create two servlet mappings, one for user.do, one for *.do
    Exact matches take precedence over wildcards.
    <!-- Standard Action Servlet Mapping -->
    <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>userServlet</servlet-name>
        <servlet-class>com.mypackage.UserServlet</servlet-class>
    </servlet>
      <servlet-mapping>
        <servlet-name>userServlet</servlet-name>
        <url-pattern>/user.do</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
      </servlet-mapping>

  • A sample web.xml

    a sample web.xml
    <!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    // bla blahi use this type of web.xml .
    my problem is to see the DTD "http://java.sun.com/dtd/web-app_2_3.dtd"
    why it is "http://java.sun......." ??
    does it read the DTD via internet ONLINE when i run my application ?
    when i put this same web application in a no-internet connected machine, the web application works.
    why then it is "http://java.sun......." ?
    can i download that DTD in my hard disk and put "file:///dtd_location_in_my_drive" ?

    You are definitely a java guru . Thank you, but I am still a novice.
    BTW, you have told
    I never encountered the case when it is not.1) r u sure all know professional servers keeps a
    copy of that DTD .
    if the server is not registered and dont have a copy
    , then what you would do ? Any J2EE compliant application server should have this. I am not sure if this is mentioned in the specifications, but this is the way it goes. I have seen it in Tomcat, JBoss, Sun One, Weblogic and Websphere. I think this sample is representative enough for the family of J2EE application servers.
    Logically, someone must have thought of the fact that people cannot be online all the time and they need to validate their deployment descriptors. The best way to achieve this is to provide a local copy.
    because in that case server is going to throw an
    exception as soon as you are going to start the
    e server .
    How do you solve this problem I don't know, honestly. Maybe I would copy it somewhere on the local drive and write the code like the application servers do.
    will you copy the DTD file from tomcat and put it in
    your WEB-INF directory and metion this path in your
    web.xml ? In the worst case, yes. But that's irrelevant. If something like this is happening to the application server, it is better to find a new one. :)
    in any case, i am surprised to see that i am not been
    able to download this DTD fle from Sun website. why?
    It is alwasy better to download this stuff and keep
    it in the hard disk and specify the path in the
    web.xml . i hope, this will resolve all the problems
    of whether the server is registered or not.As I mentioned, you need not bother about that unless you are a fervent advocate of Murphy's law.
    unfortunately, i am not been able to download this
    stuff from Sun !Just paste that URL in the browser when you have an internet connection, you will be able to get the DTD.

  • Problem displaying error page of web.xml when using JSF, Ajax4jsf

    Hi,
    My application is using MyFaces, RichFaces and Ajax4jsf. When i try to display error page configured in web.xml, i am getting exception "Error while processing error page".
    my web.xml contents are as follows:
    <?xml version="1.0"?>
    <web-app 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">
    <filter>
    <display-name>RichFaces Filter</display-name>
    <filter-name>richfaces</filter-name>
    <filter-class>org.ajax4jsf.Filter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>richfaces</filter-name>
    <servlet-name>faces</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>
    <filter>
    <filter-name>extensionsFilter</filter-name>
    <filter-class>
    org.apache.myfaces.webapp.filter.ExtensionsFilter
    </filter-class>
    <init-param>
    <description>
    set the size limit for uploaded files. Format: 10 - 10 bytes 10k
    - 10 KB 10m - 10 MB 1g - 1 GB
    </description>
    <param-name>uploadMaxFileSize</param-name>
    <param-value>100m</param-value>
    </init-param>
    <init-param>
    <description>
    Set the threshold size - files below this limit are stored in
    memory, files above this limit are stored on disk.
    Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
    </description>
    <param-name>uploadThresholdSize</param-name>
    <param-value>100k</param-value>
    </init-param>
    </filter>
    <filter>
    <filter-name>Seam Redirect Filter</filter-name>
    <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
    </filter>
    <filter>
    <filter-name>KTServletFilter</filter-name>
    <filter-class>com.kenexa.core.system.KTServletFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>/faces/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>Seam Redirect Filter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>KTServletFilter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <!-- seam Listeners -->
    <listener>
    <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
    </listener>
    <listener>
    <listener-class>com.kenexa.kr.web.KRServletListener</listener-class>
    </listener>
    <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/rc/systemError.jsf</location>
    </error-page>
    </web-app>
    As per the configuration, when exception is thrown out of the application, container tries to display systemError.jsp page. If we want to include the JSF tags in systemError.jsp page, the request should pass through FacesServlet, so in the <error-page> <location> tag systemError page is specified with the extention systemError.jsf though it's actual extention is .jsp
    When exception is thrown from the application container invoke the error page but, while rendering systemError.jsf page exception is thrown saying "Exception processing error page "systemError.jsp" "
    To solve this problem i've gone through several forums, materials.
    In one forum a guy said, JSF1.1 spec has some problem in displaying error pages. To solve this don't write <f:view> tags in the error page, use <f:subview> intstead. By reading this, i again changed the contents of systemError.jsp page replacing <f:view> by <f:subview>. But the error is still repeating.
    Finally what i found is, when we use Ajax4jsf in the application, its AjaxViewRender class is throwing exception while rendering error pages configured through web.xml.
    So what i did is i changed error page extention from .jsf to .jsp in the <location> tag. Now jsf won't come in the picture and remove JSF related tags from the systemError.jsp page.
    <error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/rc/systemError.jsp</location>
    </error-page>
    Any comments are welcome----------------------------------------------------------------

    I too iam facing the same problem could you advise if you have found any solutions
              -Ram

  • Problems with jsp-error page in web.xml

    Hello everybody, I have a confusing problem concerning the use of jsps as error pages for 404-errors.
    I inserted the following lines in my web.xml file:
    <error-page>
    <error-code>404</error-code>
    <location>/personal404.jsp</location>
    </error-page>
    The problem is: when an 404 occurs, instead of showin the personal404.jsp, the browser tells me that it tries to download a file which it can't (it tries to download the mis-spelled file). When I try to redirect the 404 to a static html-page, as in
    <error-page>
    <error-code>404</error-code>
    <location>/personal404.html</location>
    </error-page>
    everything works fine.
    Please, does anybody have any idea or suggestion, what I am doing wrong?
    Thanks in advance,
    Sebastian

    Hi Ivan,
    I tried it, but there wasn't any difference.
    I'll try to explain in more detail what happens:
    Imagine my application has the following root-path
    http://myServerName:port/mainRoot/
    When I try the following URL:
    http://myServerName:port/mainRoot/pageThatDoesNotExist.jsp, the browser tells me, it tries to download the file pageThatDoesNotExist.jsp from myServerName and that it can't find that file.
    The same happens, when I type http://myServerName:port/mainRoot/pathThatDoesNotExist/pageThatDOESExist.jsp, except that the browser tries to download the file pageThatDOESExist.jsp which (again) it can't.
    I have located the files 404.jsp and 404.html in the same directory, so I don't think this is a path-related problem, because everything works fine, when I specify the 404.html as the target error page (i.e. the browser displays the 404.html when I type the URLs shown above).
    I don't know if I'm making this clear, but maybe you get the idea.
    Sebastian

  • How to give relative path in web.xml?

    Hi All,
    Im creating a servlet which has to load the properties file.
    I don't want to give the location of the properties file as ABSOLUTE PATH. But I'm unable to provide the same as RELATIVE PATH.
    When I give the path is given as ABSOLUTE PATH (drive:/dir/) it is working. But if I give the RELATIVE PATH(../), the same is not working.
    Kindly help me in this.
    Regards,
    Kumar Madhavan.
    My web.xml file is:
    <?xml version="1.0"?>
    <!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>
         <display-name>NGT - ASCII</display-name>
         <description>Application for Safety Critical Information vIew.</description>
         <welcome-file-list>
              <welcome-file>ASCII.html</welcome-file>
         </welcome-file-list>
         <context-param>
              <param-name>asciifiledir</param-name>
    <!-- This is the tag in which I would like to
              <param-value>../</param-value>
         </context-param>
    </web-app

    Hi.
    Exclude the directory path from the <param-value/> in
    the web.xml and just keep the property file name.
    Place the property file in the classpath and load it
    like this from the servlet:
    Properties props = new Properties();
    String propFileName = "" // Read param-value from web.xml
    try {
    InputStream is = TheServlet.class.getResourceAsStream(propFileName);
    props.load(is);
    } catch (Exception ex) {
    System.out.println("Prop file not in classpath!");
    /Jesper

  • Problem with the data source and web.xml

    I have an issue where JSC is removing my resource reference:
    <resource-ref>
    <description>Creator generated DataSource Reference</description>
    <res-ref-name>jdbc/localOracleDatabase</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    from the web.xml and sun-web.xml.
    The application has been working great in the IDE for months then wham, no more data source definition. I try and add the reference manually and the IDE takes it out. I am "NOT" adding it to the .xml's in the build area. Why is JSC removing the data source entry?

    This continues to be a problem. The only way that I can get around the problem is to drag a table from the data source onto the design pallete and then the datasource is added back to the web.xml. I can run fine for 10 or 15 runs then the entry is once again removed from the web.xml.
    Help please!

  • Problem in web.xml  -- servletcontext

    Pls look at the code and web.xml file for invoking servlet.
    index.html
    <html>
    <head>
    <title>Servlet Context Example</title>
    </head>
    <body>
    <form method="get" action="callservlet">
    <input type="submit" value="Submit">
    </form>
    </body>
    </html>ServletConExample.java
    package com.servletcontext;
    import java.io.IOException;
    import javax.servlet.ServletContext;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class ServletConExample extends HttpServlet {
         private static final long serialVersionUID = 1L;
         ServletContext con;
         public void init()
              con = getServletContext();
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException
              con.setAttribute("logname", "shobhit");
              response.sendRedirect("./com.servletcontext.TestServCon");
    }TestServCon.java
    package com.servletcontext;
    import java.io.IOException;
    import javax.servlet.ServletContext;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class TestServCon extends HttpServlet {
         private static final long serialVersionUID = 1L;
         ServletContext con;
         public void init()
              con = getServletContext();
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException
              String str = (String)con.getAttribute("logname");
              response.getWriter().println("value of attribute logname is "+str);
    }web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app>
         <servlet>
              <servlet-name>servletcontext</servlet-name>
              <servlet-class>com.servletcontext.ServletConExample</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>servletcontext</servlet-name>
              <url-pattern>/callservlet</url-pattern>
         </servlet-mapping>
         <Welcome-file-list>
              <Welcome-file>index.html</Welcome-file>
         </Welcome-file-list>
    </web-app>Error Page:
    HTTP Status 404 - /ServletContext/com.servletcontext.TestServCon
    type Status report
    message /ServletContext/com.servletcontext.TestServCon
    description The requested resource (/ServletContext/com.servletcontext.TestServCon) is not available.
    Apache Tomcat/5.5.26 I think problem is in web.xml file. Can any help me to resolve this problem.
    Thanks,
    Shobhit

    You must declare TestServCon.java on web.xml as you did for the first servlet
    and in the sendRedirect use the following code :
    response.sendRedirect("TestServCon");//   TestServCon is the servlet mapping you declared in web.xml
    //or this
    response.sendRedirect("./TestServCon");

  • Problem in Web.xml.........

    Hi to All,
    I installed the eval version of Crystal Reporst XI, created an example report with it and now I want to call my report from JSF Page.i followed the crxi_startup_guide_for_j2ee.i got the error in 'web.xml' file.the error is:
    "cvc-complex-type.2.4.a: Invalid content was found starting with element 'env-entry-value'. One of '{"http://java.sun.com/xml/ns/j2ee":env-entry-type}' is expected"
    here i shows my entry in web.xml file:
    <env-entry>
    <env-entry-name>jdbc/mydatabase name</env-entry-name>
    <env-entry-value>!com.microsoft.jdbc.sqlserver.SQLServerDriver!jdbc:odbc:mydatabase name</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    im unable to get what was the problem.my environment is Tomcat 5.0.28,SQL2000.
    i created that report using ODBC connection.is it correct?suppose if i have to connect using JNDI means how to achive this?
    can any one get me out of this please!!
    Thanks in Advance,
    --RK                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    This is my web.xml file........
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app 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">
    <env-entry>
    <env-entry-name>jdbc/IMDB</env-entry-name>
    <env-entry-value>!com.microsoft.jdbc.sqlserver.SQLServerDriver!jdbc:odbc:IMDB</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    <context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <context-param>
    <param-name>crystal_image_uri</param-name>
    <param-value>crystalreportviewers11</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
         <welcome-file>
    index.jsp
    </welcome-file>
    </welcome-file-list>
    </web-app>
    Thnx,
    Rk

  • I  have some more problem in the  web.xml file and url-pattern in my  syste

    HI ALL!
    How can I create and place the web.xml and URL-parrten.Because I run
    the tomcat in my computer with ME system.
    Hoc

    what is the problem? please be more specific and detailed? check a sample web.xml file and make your own one and place it in your <application-context>\WEB-INF folder..

  • Problem in uri references in web.xml

    There are quite a few instances where external URIs are referenced in various sorts of files in WebAdmin. For example:
    index.jsp:
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:bean="BEAN" xmlns:logic="LOGIC" xmlns:html="HTML" xmlns:nested="NESTED" xmlns:custom="CUSTOM" xmlns:c="C" version="1.2">
    web.xml:
    <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">
    If Tomcat is running behind a firewall where the URIs are unreachable, it is very likely that Tomcat/WebAdmin will not start or will, at best, start in an impaired state.
    Cache all these external reference to local files.
    If it is, then download the external reference and update the URI to point to a local resource. For example:
    old:
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
    new:
    http://emg-vip:12300/xml/ns/j2ee/web-app_2_4.xsd

    thank you for these possible problems and solutions.
    But are you really sure this problem occurs ?
    And URI is not an URL and normally the resources referenced by the URI's are not downloaded anyway.

  • Problem with mime type in web.xml file

    Hi everybody,
    I actually got a problem with mime types on Weblogic 6.0 under Linux.
    I read the documentation so I added the next lines in the web.xml file in
    the WEB-INF directory of my server :
    <mime-mapping>
    <extension>
    doc
    </extension>
    <mime-type>
    application/msword
    </mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>
    ppt
    </extension>
    <mime-type>
    application/vnd.ms-powerpoint
    </mime-type>
    </mime-mapping>
    Why can't I retrieve a .doc or .ppt files with an internet browser correctly
    ? I get only text/plain ...
    Can someone help me ?
    Regards,
    Alexis Berger

    I am having the same problem with doc and xsl. I have added this
    <mime-mapping>
    <extension>xls</extension>
    <mime-type>application/vnd.ms-excel</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>doc</extension>
    <mime-type>application/msword</mime-type>
    </mime-mapping>
    to my web.xml. I even restarted the server. I still see doc and xsl in binary.
    Is there some other setting that needs to take place?
    I am using WL6.1 with fixpack 1.
    I can see the doc and excel files in the browser if I don't go through the weblogic
    server. That just confirms it's not my browser.
    Kumar Allamraju <[email protected]> wrote:
    <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <html>
    It works fine for me in 6.1 SP1.
    <br><br>
    If the following doesn't work , can you
    <br>try application/winword instead of application/msword?
    <p>--
    <br>Kumar
    <p>Siming Mu wrote:
    <blockquote TYPE=CITE>Hi,
    <p>I setup in my web.xml a mime mapping as follows,
    <p><mime-mapping>
    <br><extension>doc</extension><mime-type>application/msword</mime-type>
    <br></mime-mapping>
    <p>When I specify a test.doc url, the doc file appears in my browser
    as
    binary data
    <br>instead of download.
    <p>Please reference change request 055002, which decribes this problem. 
    According
    <br>to edocs, it has been fixed in wls6.1sp1.
    <p>But I am seeing it fixed.  Am I doing anything wrong? Thanks.
    <p>Siming</blockquote>
    </html>

  • Problems with error-page in web.xml and page caching

    Having a few problems with error pages and web.xml with browsers caching the error pages and strange errors coming out of weblogic.servlet.intenal.WebAppServletContext
    I'm trying to set a web app up so that all http errors and all exceptions are routed thruogh predefined resources. For now, I'm simply send 400 errors to 400.html and the ServletException, IOException and RuntimeException to respective html pages.
    What I'm finding is that the error codes work fine but the exceptions are only be routed to the correct error page for the first call to the servlet after server restart.
    So for example, I have my servlet throwing a ServletException as a test case. The weblogic server log shows that ServletException is thrown, and the correct error page for ServletExceptions is shown.
    If I change the Servlet code to throw IOException in place of SevletException, the weblogic.log shows that IOExceptyion is being thrown (so the servlet has deployed successfully), however the Servletxception error page is shown on the browser.
    I'm using IE6 and I've changed the setting such that a new page is requested every time using the tools-internet options-temp internet files-settings option to "check for new versions of stored pages: Every visit to the page".
    Despite this, the servlet exception error page still appears.
    If you clear the cache from the temp intenet files->delete files IE option, the correct errror page will be shown so it appears that the browser cache is being used after all.
    everytime I delete the temp intenet files I get the correct error page on the first request after but then not after that.
    I have implemented the service method for this test to throw the exceptions - does this make a differecne?
    As a test, I have moved the imlpementation to the doGet method instead bu I now get a strange eror from weblogic comlpaining about an arrayOutOfBoundsException because eror codes in the web.xml are not supported! - see error above.
    Any help is appreciated

    After further investigation: -
    There are no problems with error pages based on error codes, only error exceptions.
    As a test case, I have a service method in a servlet throwing either one of the three exception types that servlets can throw (Runtime, Servlet & IO) the following rules apply. The exception to be thrown is hardcoded and is changed and the web app rebuilt each time. The correct web.xml has been deployed to the app server (checked through console). the webapp is being redeployed correctly - this can be seen in the weblogic log, where the correct exception is reported.
    I am using WLS 8.1, Servlet 2.3, JDK 1.4.1_02
    In all cases, the weblogic log reports that the servlet is throwing the exception as expected.
    Despite having set error-page for exception javax.servlet.ServletException, the exceptions are diverted to the error page that has been set up for http error code 500
    The error page for ServletException is therefore never reached.
    I have the browser set to request pages every time it is asked.
    Once the servlet has thrown an IOException, the only way to get the browser to report an IO or Runtime exception error-page is to clear the browser cache. Restarting the server has no effect.
    Once the servlet has responded with ANY exception, it is not possible to get it to report a ServletException (which is incorrectly reported as a 500 anyway) unless the cache is cleared. Restarting the server has no effect.
    In the case where the servlet throws ServletException, it has no root exception. The servlet 2.3 spec states that if ServletException is thrown but cannot be found in the error pages, the root excpetion will be extracted and the error page list traversed again. Knowing that the RuntimeException error page is correct shown when RuntimeException is throwm, I have nested this inside the ServletException, however error page for http error 500 is still shown.
    I don't believe this is a WLS 8.1 problem, as the console shows that the correct exception is thrown each time. this is backed up by the fact that the correct exception page is thrown when the cache is cleared regardless of what exception was previousdly thrown by the servlet. This excludes ServletException which is always incorrectly thrown as a 500.

Maybe you are looking for

  • Problem with Append mode in File Receiver

    Hello, I am facing some problem with Append Mode in File Receiver. In channel config, i have given : Construction Mode : Append File Type : Text Message Protocol : File Content Conversion The size of the file which i am trying to send is about 9.5MB.

  • .Xls to Pdf convert

    I have . xls files with multiple tabs.I want to covert to .Pdf with batch processing with formating. Can anyone help me how i can do it.

  • Multiple systems in landscape

    Hello All, We have a situation where we want to add one more development system(non-standard) to the existing standard e-q-p system landscape. I did that succesfully including transport route so that it looks e-e-q-p now. My problem is with now deali

  • PROBLEMS : ODBC(POLITE) FROM FORMS9i ON XP

    We had an application running on Polite (Oracle Lite 5.0.1), on a windows2000 client, executing from Forms6i. This worked fine. Now (corporative requirements), it has to run on a client WindowsXp Profesional. We have installed Forms9i but we can't fi

  • Looking for a link

    Please, Could someone give me a link where I could study cases on how to find out whether the index is selective. Thanks