Servlet Reloading Problem!

JSP + Bean is OK!
But, Servlet + Bean occur a reloading problem.(Reloading does not happen)
For example,
1) TestClass.java (Bean)
public class TestClass {
private String txt;
public TestClass() {
txt = "Test!!"; ---(1)
public String getTxt() {
return txt;
2) Test.java (Servlet)
public class Test extends HttpServlet {
public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
TestClass testClass = new TestClass();
PrintWriter out = res.getWriter();
out.println(testClass.getTxt());
In above examples, though I change txt String(number (1)) Bean reloading does not occur. So old txt String shows.
In Tomcat, such problem does not happen.
Is this a problem of OC4J?
Thanks.
null

Well, only servlets are supposed to be reloaded, not their dependent classes.
If you are using Tomcat 4.x, then there might be an explanation. It seems that Tomcat 4.x will simply reload the entire web app context if it detects that a servlet (not a JSP!) has changed. Just define a servlet context listener to see that.
Regards,
Vadym

Similar Messages

  • Servlet reloading doesn't work

    Running WL 5.1 SP6 and can't get servlet reloading to work. Have the
              necessary lines in weblogic.properties:
              weblogic.httpd.servlet.classpath=<my classpath>
              weblogic.httpd.servlet.reloadCheckSecs=1
              The servlets are in a web app so I have the web app's WEB-INF/classes, where
              the servlets reside, in weblogic.httpd.servlet.classpath.
              Possibly this is a problem only with web apps? Anyone else run into this?
              Thanks.
              

    From my understanding, putting the servlet classes in the WEB-INF/classes
              directory eliminates the need to put them into any classpath (servlet, weblogic,
              or otherwise). Put them back into the WEB-INF /classes directory and make sure
              that this directory is not in the weblogic or servlet classpath.
              Hope this helps,
              Robert
              Paul Folbrecht wrote:
              > Ok, that makes sense. But, I tried what you suggested in your mail- moving
              > them to /servletclasses instead of /classes, and putting that directory on
              > the servlet classpath with this line:
              >
              > weblogic.httpd.servlet.classpath=e:/development/Projects/ExampleWebApp/deplo
              > yment/Web-inf/servletclasses
              >
              > I then get a ClassNotFoundException when trying to hit any servlet. Don't
              > know what could be wrong.
              >
              > Mike Reiche <[email protected]> wrote in message
              > news:[email protected]...
              > >
              > > Well, you have to figure something else out or put up with that
              > > behavior.
              > >
              > > As long as the servlet classes are in your WEBLOGICCLASSPATH, they
              > > will not get reloaded. The servlet class loader first tries to
              > > get the servlet class from the 'parent' class loader - and if it
              > > can find it there, it will not load a new one. That is why your
              > > modified servlets do not get reloaded.
              > >
              > > Mike
              > >
              > > "Paul Folbrecht" <[email protected]> wrote:
              > > >I'm afraid I can't agree. Also, I tried it, and it doesn't
              > > >work. Putting
              > > >servlets in WEB-INF/servletclasses results in ClassNotFoundExceptions
              > > >on
              > > >the servlet. The server doesn't know about this directory-
              > > >why should it?
              > > >There is no such directory mentioned anywhere in the J2EE
              > > >webapp spec. I
              > > >see only WEB-INF/classes mentioned.
              > > >
              > > >Also, the servlet classpath is explicity set in weblogic.properties
              > > >as I
              > > >noted below.
              > > >
              > > >In addition,
              > > >Mike Reiche <[email protected]> wrote in message
              > > >news:[email protected]...
              > > >>
              > > >> The servlets should be in something like WEB-INF/servletclasses
              > > >> which is ONLY in weblogic.httpd.servlet.classpath.
              > > >>
              > > >> You say you have them in WEB-INF/classes, which is also
              > > >in
              > > >WEBLOGICCLASSPATH
              > > >> (?) so they won't be reloaded.
              > > >>
              > > >> Mike
              > > >>
              > > >>
              > > >>
              > > >> "Paul Folbrecht" <[email protected]> wrote:
              > > >> >Running WL 5.1 SP6 and can't get servlet reloading
              > > >to
              > > >> >work. Have the
              > > >> >necessary lines in weblogic.properties:
              > > >> >
              > > >> >weblogic.httpd.servlet.classpath=<my classpath>
              > > >> >weblogic.httpd.servlet.reloadCheckSecs=1
              > > >> >
              > > >> >The servlets are in a web app so I have the web app's
              > > >> >WEB-INF/classes, where
              > > >> >the servlets reside, in weblogic.httpd.servlet.classpath.
              > > >> >
              > > >> >Possibly this is a problem only with web apps? Anyone
              > > >> >else run into this?
              > > >> >
              > > >> >Thanks.
              > > >> >
              > > >> >
              > > >> >
              > > >>
              > > >
              > > >
              > >
              

  • Servlet Compilation Problem !

    Hi,
    I am just starting to learn servlets and I got problem in compiling them. I got compilation error in
    import javax.servlet.*;statement. Seems that the compiler cannot find the servlet package. I got J2EE 1.4 beta installed on my machine but there is no servlet.jar package. I am using J2SDK 1.4.1_02, J2EE 1.4 beta and Tomcat 4.1.24.
    Can anyone help me with my servlet compilation problem?
    Thanks in advance!
    Josh

    servlet.jar is here :
    <tomcatdir>\common\lib
    add it to your compiler classpath

  • Servlet chaining problem..

    import java.io.*;
        import javax.servlet.*;
        import javax.servlet.http.*;
        public class Deblink extends HttpServlet {
          public void doGet(HttpServletRequest req, HttpServletResponse res)
                                       throws ServletException, IOException {
            String contentType = req.getContentType();  // get the incoming type
            if (contentType == null) return;  // nothing incoming, nothing to do
            res.setContentType(contentType);  // set outgoing type to be incoming type
            PrintWriter out = res.getWriter();
            BufferedReader in = req.getReader();
            String line = null;
            while ((line = in.readLine()) != null) {
              line = replace(line, "<BLINK>", "");
              line = replace(line, "</BLINK>", "");
              out.println(line);
          public void doPost(HttpServletRequest req, HttpServletResponse res)
                                        throws ServletException, IOException {
            doGet(req, res);
          private String replace(String line, String oldString, String newString) {
            int index = 0;
            while ((index = line.indexOf(oldString, index)) >= 0) {
              // Replace the old string with the new string (inefficiently)
              line = line.substring(0, index) +
                     newString +
                     line.substring(index + oldString.length());
              index += newString.length();
            return line;
    What is pre request fo above code to work.
    I had tried this many time but it is not working, what will be calling servlet look like

    And can you explain why your title is "Servlet chaining problem"?

  • How to make servlets reloadable in iplanet web server in solaris??

    hi all,
    does anyone know how to make servlets reloadable in iplanet ??? Thanks for help

    Hi there,
    I think your question is about "Dynamic Class Reloading", also named as Hot deployment. and the following lines may be helpful.
    iAS 6.0 SP3 and later version supports new hot deployment features through dynamic class
    reloading of EJBs.By default, dynamic servlet, EJB and registered JSP reloading is disabled in iPlanet Application Server.
    To enable dynamic reloading of servlets, EJBs and registered JSPs, perform the following steps:
    1.Start iPlanet Registry Editor, kregedit, and modify the Disable value under the Versioning key:
    SOFTWARE/iPlanet/Application Server/6.0/CCS0/SYSTEM_JAVA/Versioning
    2.Set the Disable value to 0 (By default, the Disable value is set to 1)
    3.Restart iPlanet Application Server to enable the change
    To hot deploy your application, simply compile and replace the file in the appropriate directory or, use iasdeploy to redeploy
    applications.
    I recommand you to check out the iAS's release notes (http://docs.iplanet.com/docs/manuals/ias/60/sp3/rn_sp3.html#20766) for more infomation.
    Good luck
    Shen Jie
    Developer Technical Support
    Sun Microsystems
    http://sun.com/developers/support

  • Dynamic Servlet reload activation in Weblogic 6.0 using web applications

    Dynamic Servlet reload activation in Weblogic 6.0 using web applications
              Add the next lines to your web.xml file
              <context-param>
              <param-name>weblogic.httpd.servlet.reloadCheckSecs</param-name>
              <param-value>0</param-value>
              </context-param>
              <context-param>
              <param-name>weblogic.httpd.servlet.classpath</param-name>
              <param-value>C:/bea/wlserver6.0/config/myServer/applications/MyApp/WEB-INF/serverclasses</param-value>
              </context-param>
              Register your servlet on web.xml file.
              <servlet>
              <servlet-name>Test</servlet-name>
              <servlet-class>Test</servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name>Test</servlet-name>
              <url-pattern>/Test/*</url-pattern>
              </servlet-mapping>
              <servlet>
              Create a directory under WEB-INF called "serverclasses"
              copy your servlet(also directories under serverclasses if your class has a package).
              Don't forget to remove from \classes the same servlet class file.
              I hope it could be helpfull for the community.
              Regards
              

    Dynamic Servlet reload activation in Weblogic 6.0 using web applications
              Add the next lines to your web.xml file
              <context-param>
              <param-name>weblogic.httpd.servlet.reloadCheckSecs</param-name>
              <param-value>0</param-value>
              </context-param>
              <context-param>
              <param-name>weblogic.httpd.servlet.classpath</param-name>
              <param-value>C:/bea/wlserver6.0/config/myServer/applications/MyApp/WEB-INF/serverclasses</param-value>
              </context-param>
              Register your servlet on web.xml file.
              <servlet>
              <servlet-name>Test</servlet-name>
              <servlet-class>Test</servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name>Test</servlet-name>
              <url-pattern>/Test/*</url-pattern>
              </servlet-mapping>
              <servlet>
              Create a directory under WEB-INF called "serverclasses"
              copy your servlet(also directories under serverclasses if your class has a package).
              Don't forget to remove from \classes the same servlet class file.
              I hope it could be helpfull for the community.
              Regards
              

  • Disable servlet reload

              I need to disable servlet reload(WLS 7 SP4) for performance reason. I set the
              servlet-reload-check-secs to -1 in the container-descriptor of the web.xml of
              my war file. However when I deploy my war file, from the admin console the "Reload
              Period" is set to 1. Is there a way to make the deployment set the default "Reload
              Period" to -1 during deployment? I hate to deploy, change "Reload Period" from
              console, shutdown server, them restart server. Thanks.
              

    Daniel Lo wrote:
              > I need to disable servlet reload(WLS 7 SP4) for performance reason. I set the
              > servlet-reload-check-secs to -1 in the container-descriptor of the web.xml of
              > my war file. However when I deploy my war file, from the admin console the "Reload
              > Period" is set to 1. Is there a way to make the deployment set the default "Reload
              > Period" to -1 during deployment? I hate to deploy, change "Reload Period" from
              > console, shutdown server, them restart server. Thanks.
              You can use the following in your web.xml
              <context-param>
              <param-name>weblogic.servlet.reloadCheckSecs</param-name>
              <param-value>-1</param-value>
              </context-param>
              Nagesh
              

  • Applet Reloading problem

    Hi,
    I am involved in a project in which we are using many images to scroll in a applet.The url of the images are retiriving from the data base and given to the applet using jsp.The problem is when the page is reloaded it takes much time to show the applet again even i am using the archive tag.Can any one tell me how to get rid of this reloading problem.
    Regards,
    Prakash

    Hi,
    Thanks for the reply.Actually i am not reloading the page.when i go to some other page and comes back it takes a long time ro load the page.Is there any way to overcome this problem.
    Regards,
    Prakash

  • Servlet reloading not working with WLS 5.1 sp8

              I downloaded and installed WLS 5.1's sp8 to fix the "java.net.SocketException: Connection aborted by peer: socket write error"
              problem. Although that problem is fixed, I have found that, however, the servlet (automatic) reloading does not
              work anymore. If I remove the sp8 from my Java system classpath and WL classpath (i.e. not using sp8), then
              the servler reloading works fine.
              Does anybody experience similar problem or have I forgot to do something?
              WLS properties/env vars setting:
              - weblogic.httpd.servlet.reloadCheckSecs=0
              - WEBLOGIC_CLASSPATH=%WEBLOGIC_HOME%\lib\weblogic510sp8.jar;...
              - JAVA_CLASSPATH=%WEBLOGIC_HOME%\lib\weblogic510sp8boot.jar;...
              Thanks in advance for any help.
              

              I've experienced the same problem with both sp6 and sp8. In both cases I performed several test, including
              - varied the value of weblogic.httpd.servlet.reloadCheckSecs
              - changes to the package depth the servlet belonged to
              - changes to the string length of the package names the servlet belonged to
              At best, the servlet would reload sometimes. I've moved back to sp5 and the problem has subsided.
              Note: I did not try registering the servlet to see how that would effect the dynamic reloading.
              Hope this helps
              - Dave
              "Michel Dinh" <[email protected]> wrote:
              >
              >I downloaded and installed WLS 5.1's sp8 to fix the "java.net.SocketException: Connection aborted by peer: socket write error"
              >problem. Although that problem is fixed, I have found that, however, the servlet (automatic) reloading does not
              >work anymore. If I remove the sp8 from my Java system classpath and WL classpath (i.e. not using sp8), then
              >the servler reloading works fine.
              >
              >
              >Does anybody experience similar problem or have I forgot to do something?
              >
              >WLS properties/env vars setting:
              >
              >- weblogic.httpd.servlet.reloadCheckSecs=0
              >- WEBLOGIC_CLASSPATH=%WEBLOGIC_HOME%\lib\weblogic510sp8.jar;...
              >- JAVA_CLASSPATH=%WEBLOGIC_HOME%\lib\weblogic510sp8boot.jar;...
              >
              >Thanks in advance for any help.
              

  • Servlets deployment problem

    Hello, everyone!
    The problem that I have might sound ridiculous but I am kind of desperate because I can't make head nor tail of it.
    I am using Tomcat 4.0 and JDK1.3.1_01 and the problem that I am facing is the following: I have an application called "prima" that I've placed in the "webapps" directory of the Tomcat home. I've created the whole directory structure required - that is:
    /prima/Web_inf/classes
    /prima/Web_inf/lib
    as well as the
    /prima/Web_inf/web.xml configuration file
    I've placed the following string in the /conf/server.xml
    configuration file:
    <Context path="/prima" docBase="prima"
    debug="0" reloadable="true" />
    I wrote the simplest servlet possible - the "HelloWorld" servlet which I called TryServlet. Here goes the code:
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class TryServlet extends HttpServlet {
    public void doGet (HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("<html>" +
         "<head><title>Hello World</title></head>");
    out.println("Hello, World!");           
    out.println("</body></html>");
    out.close();
    I've placed this in the /prima/Web-inf/classes directory and compiled it.
    I've edited the web.xml file like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!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>
    <servlet>
    <servlet-name>tryserv</servlet-name>
    <servlet-class>TryServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>tryserv</servlet-name>
    <url-pattern>/serv</url-pattern>
    </servlet-mapping>
    </web-app>
    Then I've written in the browser the following URL:
    http://localhost:8080/prima/serv
    http://localhost:8080/prima/servlet/serv
    and in neither cases does it work. I get the HTTP 404 - File not found exception.
    I had encountered a similar problem when I tried to use a bean from a JSP page.
    It looks like the /prima/Web-inf/classes directory cannot be seen.
    I hope someone will have a solution for my problem. Thank you in advance for any suggestion!
    Best regards!

    Tomcat is case sensitive. Use WEB-INF

  • Tomcat Servlet Security Problem? : Start Excel with NJAWIN - COMObjects

    I get an exception when I start my programm as servlet , as application it works just fine (when I start it as Servlet in the internal Tomcat from JBuilder it also works fine).
    Application app = new Application(Application.progID); // interfaces built with java2com for Excel
    com.develop.jawin.COMException: 8000ffff: CoCreateInstance for "{024500-00-0000-c000-000000000046}" failed
    at com.develop.jawin.win32.Ole32.CoCreateInstance(Unknown Source)
    at com.develop.jawin.win32.Ole32.GetFromProgID(Unknown Source)
    at com.develop.jawin.DispatchPtr.<init>(Unknown Source)
    at excel2pdf.Excel._Application.<init>(_Application.java:31)
    Actually Excel is started but as SYSTEM and not as my Username. Perhaps there's a problem with the security policy, I already gave all rights to catalina for my whole projekt( each directory of it). Have smb already had this problem? Any Ideas?

    Thanks for answering
    In my case I think I cannot use POI because I need Excel
    and a Virtual Printer , so I can convert excel files with exactly the same
    format to PDF. POI is suppose better idea for creating or manipulating
    OpenOffice files (they are working together with OO on file formats),
    and unfortunately OpenOffice doesnt work fine with charts (I already had
    this solution, openoffice-server and Uno ).
    It must be smth with Tomcat-Configuration or security, because my
    programm is working with the internal tomcat-server of JBuilder, and
    as application too. In both cases Excel is started with my username and
    not SYSTEM (my tomcat server is started as service, perhaps thats why
    by starting excel from my servlet Excel is by user - SYSTEM).

  • Applet-Servlet Communication problem EOFException

    Hi! i´ve been searching and searching through forums because it seems this problem is very common, but none of the solutions i´ve seen so far suits me, so i´m here looking for some help because i´ve been stuck one week with this. First of all sorry if my english isn´t the best... i´m a bit rusty...
    Well, i had some code that worked perfectly, but i needed to perform some changes because i needed the servlet to send more info to the applet, and here started the problems, when i made the changes it started to throw EOFException when i was trying to read the InputStream, and furthermore when i came back to the original code it started to throw the exception in the same place too
    So here i am... don´t know what to do now and i entrust to you to give me some tips.
    Here comes some code. This is the original code, the one that runned but it doesn´t run right now
    Applet:
    public ListasComponentesSeleccionables cargarListasComponentes( ) throws IOException, ClassNotFoundException {
              String serv = "/Desaladora/cargarListasComponentesApplet.do";
              String host = Principal.documentBase.getHost( );
              URL direccion = new URL( "http", host, 8080, serv );
              // Create conection
              URLConnection connection = direccion.openConnection( );
              connection.setDoInput( true ); 
              connection.setDoOutput( true );
              connection.setUseCaches( false );
              connection.setRequestProperty( "Content-Type", "application/x-java-serialized-object" );
              ObjectOutputStream output;
              output = new ObjectOutputStream( connection.getOutputStream( ) );
              output.writeObject( new Boolean(true) );
              output.flush( );
              output.close( );
              ObjectInputStream input = new ObjectInputStream( connection.getInputStream( ) ); //<-- Here is the problem
              ListasComponentesSeleccionables response = new ListasComponentesSeleccionables( );
              response = ( ListasComponentesSeleccionables ) input.readObject( );
              return response;
         }Servlet:
    ublic class CargarListasComponentesAppletAction extends Action {
    public ActionForward execute(     ActionMapping mapping,
                                                     ActionForm form,
                                                     HttpServletRequest request,
                                                     HttpServletResponse response )
                            throws ServletException, IOException, Exception  {
              InitialContext context = new InitialContext();
              SensorManagerService sensor_service;
              ActuatorManagerService actuator_service;
              Globals.LOGGER_SECURITY.debug( "Entering ACTION 'CargarListasComponentesAppletAction'" );
              response.setContentType("application/x-java-serialized-object");
              try
                   ObjectInputStream bufferentrada = new ObjectInputStream(request.getInputStream());
                   Boolean peticionOK = (Boolean)bufferentrada.readObject();
                   ObjectOutputStream buffersalida = new ObjectOutputStream(response.getOutputStream());
                   sensor_service = ( SensorManagerService ) context.lookup( "desaladora/SensorManagerServiceBean/local" );
                   ArrayList<AlarmConnectedSensorDTO> sensorList = sensor_service.findAllSensorsToAlarms();
                   actuator_service = ( ActuatorManagerService ) context.lookup( "desaladora/ActuatorManagerServiceBean/local" );
                   ArrayList<AlarmConnectedActuatorDTO> actuatorList = actuator_service.findAllActuatorsToAlarms();
                   buffersalida.writeObject( crearListasSeleccionables(sensorList, actuatorList) );
                   buffersalida.flush();
              catch(Exception e)
                   System.out.println("Error en la trasmision de datos");
              return null;
         private ListasComponentesSeleccionables crearListasSeleccionables(ArrayList<AlarmConnectedSensorDTO> sensorList,
                    ArrayList<AlarmConnectedActuatorDTO> actuatorList) {
              Vector<Integer> vectorSensores = new Vector<Integer>();
              Vector<Integer> vectorActuadores = new Vector<Integer>();
              for(AlarmConnectedSensorDTO sensor : sensorList) {
                   vectorSensores.add(sensor.getIdSensor( ));
              for(AlarmConnectedActuatorDTO actuator : actuatorList) {
                   vectorActuadores.add(actuator.getIdActuator( ));
              ListasComponentesSeleccionables listasComponentesSeleccionables =
                                  new ListasComponentesSeleccionables(vectorSensores, vectorActuadores);
              return listasComponentesSeleccionables;
    }i´ve been running some test in another computer, and this code simply works, but it doesn´t work in the machine i usually work.
    Maybe someway the stream get corrupt? the info i´ve been trying to send and started throwing the exception may still be in the stream? I don´t know what to think right now.
    Hope someone has any idea, thankyou.

    I dont see the problem. However, I suggest you change this;
    System.out.println("Error en la trasmision de datos"); t
    to e.printStackTrace() to see what it is doing when it stops working.
    I also suggest peppering your code with System.out.println() statements to see what it is doing just before stopping.
    Also, try your code with a brand new file with only a few characters in it. If it works, add to it some of your originial file content until it stops working. This way, you can determine if its the file size that is causing the crash or something in the file content. If all else fails, study java I/O and try some other way to read/write the file. You can also try a different browser. If it works, its the browser. Still having problems? Create a new project with a simple applet and file read/write program and get that working. That way, all the other stuff in your original project isn't in the way.

  • Servlet mapping problem in Resin, very weird!

    ENV: resin 2.1.6 on windows 2000
    1, I copied all the files and folders in $resin/doc/java_tut to $resin/webapps
    2, I did a little change to $resin/conf/resin.conf
    In the old resin.conf, there is a lot about the '/' webapp.
    <web-app id='/'>
    <classpath id='WEB-INF/classes'
    source='WEB-INF/classes'
    compile='true'/>
    </web-app>
    I replaced it just with
    <web-app id='/'/>
    3, I tested the 'java_tut' webapp
    http://localhost:8080/java_tut/servlet/example.servlet.basic.MappingServlet
    works well.
    http://localhost:8080/java_tut/exact
    works well, too.
    4, Then I tested the '/' webapp
    http://localhost:8080/servlet/example.servlet.basic.MappingServlet
    works well.
    but
    http://localhost:8080/java_tut/exact
    returns error code 404
    what's the problem?

    don't you need to get rid of the java_tut bit?

  • How to send Oracle rowid to servlet? | Problem with national characters.

    There is same possibility how to send rowid to servlet?
    I have now definition like this:
    <af:image source="/imageservlet?Par1=#{bindings.Col1.inputValue}"/>
    But If column contents national characters, servlet methods obtained changed these characters.
    My idea is to use not primary key for row, but use oracle rowid. It is simply possible?
    Use something like this:
    <af:image source="/imageservlet?Rowid=#{bindings.Rowid}"/
    Or Do you have ideas how to solve problem with national characters ?
    Thanks
    FiL

    Hi,
    Although your workaround works.
    I think this is a simple encoding problem.
    I simply need to make sure all parameters and pages are encoded with a char set which contains the national characters you mentioned.
    This is a bit dependent on the exact technology your using, but most can be done via the web.xml:
      <jsp-config>
          <jsp-property-group>
              <url-pattern>*.jsp</url-pattern>
              <page-encoding>UTF-8</page-encoding>
          </jsp-property-group>
      </jsp-config>     This forces all JSP pages to be encoded in UTF-8
    Adding the following parameter sometimes helps as well, although I think this one is a bit dated:
    You said your using a servlet so your servlet needs a similar block for its pattern
      <context-param>
        <param-name>PARAMETER_ENCODING</param-name>
        <param-value>UTF-8</param-value>
      </context-param>If you want to be 100% sure the encoding is set right make sure thepages contain:
    <%@ page contentType="text/html;charset=utf-8"%>Or depending on your view technology the syntax can be a bit different
    -Anton

  • Servlet configuration problems ..

    Hi
    I am a new member starting with Java Servlets:
    I have a problem with Configuring the Servlet on the J2EE Application server.
    Here is the Servlet code ...
    package mypackage;
    public class ShowParameters extends HttpServlet {
        public void doGet(HttpServletRequest request, HttpServletResponse response)         throws ServletException, IOException { .... }And this is the web.xml file
        <servlet>
            <servlet-name>ShowParameters</servlet-name>
            <servlet-class>mypackage.ShowParameters</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>ShowParameters</servlet-name>
            <url-pattern>/ShowParameters</url-pattern>
        </servlet-mapping>And the HTML file is ....
    <FORM ACTION="ShowParameters">
        First Parameter: <INPUT TYPE="TEXT" NAME="param1"><BR>
        Second Parameter: <INPUT TYPE="TEXT" NAME="param2"><BR>
        Third Parameter: <INPUT TYPE="TEXT" NAME="param3"><BR>
        <CENTER>
            <INPUT TYPE="SUBMIT">
        </CENTER>
    </FORM>I have set the CLASSPATH variable t /build/mypackage/
    I get two erros:
    Wrapper cannot find servlet class ..
    ClassNotFound exception ...
    Also, how do I compile " the servlet class file with the line; package hello; " with the package name
    I would appreciate any help ..
    Thanks
    N

    I am trying to invoke a servlet from an HTML page.
    Method 1
        <FORM ACTION="ThreeParams" METHOD="GET">
            First Parameter: <INPUT TYPE="TEXT" NAME="param1"><BR>
               <CENTER>
            <INPUT TYPE="SUBMIT">
        </CENTER>
        </FORM>Method 2
    <td><a href="Threeparams">Execute</a></td>Method 1 does not work but Method 2 does. But Method 2 does not transmit param1 to the server.
    Any thought on how to get it correct?
    Rgds
    N

Maybe you are looking for