Servlet not working...

i'm running tomcat 4.0.1 on IIS and i haven't been able to get my servlet to work.
i'm thinking that it has something to do with where i am placing my servlet, or my directory structure.
my applet is run out of the directory "\\server\\wwwroot$\\testDir\\"
and my servlet is in the directory "\\server\\tomcat$\\webapps\\ROOT\\WEB-INF\\classes\\"
here is my applet code for calling the servlet....
try
URL url = new URL("http://www2.homepage.com/serlvet/servletOne");
URLConnection conn = url.openConnection();
InputStream inputStreamFromServlet = conn.getInputStream();
catch(IOException io) { io.printStackTrace(); }
here is my servlet code....
public class servletOne extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
try
FileWriter f = new FileWriter("\\server\\wwwroot$\\testDir\\test2.htm");
f.write("testing");
f.flush();
f.close();
catch(IOException io) { io.printStackTrace(); }
the error i get when i try to run it is a FileNotFoundException.
i believe that this is the proper location for my servlet, but does the tomcat directory have to be within the wwwroot$ directory, in order for it to work?
any help would be greatly appreciated
thanks
Andy

Seems that FileWriter cannot find test2.htm file. The path for FileWriter constructor can be any absolute system dependent path. So you can use "c:\\server\\wwwroot\\testDir\\test2.htm".
Regards,
Ignat

Similar Messages

  • Servlets not working in tomcat-4.1.24

    Servlets are not working in a new context which I have created in tomcat-4.1.24. if i put the same servlet in examples context it is working. jsps are working in the new context also. any idea????
    binny

    Suppose your servlets class is called "app", you need to add this in your web.xml file
    <servlet>
    <servlet-name>app</servlet-name>
    <servlet-class>app</servlet-class>
    <servlet-mapping>
    <servlet-name>app</servlet-name>
    <url-pattern>/app</url-pattern>
    </servlet-mapping>
    </servlet>

  • Urgent--custom servlet not working with https/gateway of the portal server

    We have created the custom servlet to add some more authentication to the login screen. I have explained detaildely below.
    We have set if password reset change password screen should come by using identity server.
    First screen comes which asks �user id� and �password�.
    after this next screen comes with �old password�, �New Password� and �Confirm Password� (as we have forcefully asked user to change password after reset by using identity server ).
    On this page we have added two new filed �Date of Birth� and �Date of Joining�.
    And we are forcefully transferring request to our Custom Servlet which will validate the �Date of Birth� and �Date of Joining� from the database and submit the same a form as required by Login Servlet to validate the default parameters �old Password�, �New Password� and �Confirm Password� (which is the default validation without adding custom Servlet).
    This whole process is working with �http� protocol and giving �unable to connect� host with �https� protocol.
    Without custom Servlet process is like this, which is working
    Login (usrid, password) � Login (Old Password, New Password, Confirm Password) � Portal home Page
    With custom Servlet , Which is not working with �https� Protocol. we are getting the message "Authentication Failed" screen.
    Login (usrid, password) --> Login (Old Password, New Password, Confirm Password , Date of Birth, Date of Joinig) --> Custom Servlet validate Date of Birth, Date of Joining --> Login (Old password, new Password, Confirm Password) --> Protal Home Page
    This one works with http, whereas this one gives the "Authentication Failed" screen with the https.
    Please let me know if anybody have implemented this and help me to resolve the issue.
    Best Regards
    Ramkumar

    Hi,
    I am also getting this error message in the sun ONE webserver error log file....
    [20/Nov/2004:13:42:39] failure ( 6162): for host 172.16.5.21 trying to GET /amserver/UI/Login, service-j2ee reports:
    StandardWrapperValve[LoginServlet]: WEB2792: Servlet.service() for servlet LoginServlet threw exception
    com.iplanet.jato.CompleteRequestException
    at com.sun.identity.authentication.UI.AuthenticationServletBase.onUncaughtException(AuthenticationServletBase
    .java:141)
    at com.iplanet.jato.ApplicationServletBase.fireUncaughtException(ApplicationServletBase.java:1023)
    at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:469)
    at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:324)
    at com.iplanet.jato.ApplicationServletBase.doGet(ApplicationServletBase.java:294)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:787)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:586)
    Regards
    Ramkumar R

  • Frame access from servlet not working

    Dear all,
    I am running my servlets on Tomcat 5.5 and using JDK 1.6. I have a small program that uses codecs to access frames from a video file. PreAccessCodec implements Codec interface and PostAccessCodec extends PreAccessCodec. I set the two codecs into the processor's codec chain. The program is implemented as a thread and once started grabs frames and stores the images in a certain interval. The problem is this: whenever I start the thread from a main program, everything runs without a glitch. However, when I put the code in init() method of the servlet, I get the following error message:
    The input format is not compatible with the given codec plugin: com.mapper.utils.PostAccessCodec@69d02b
    Failed to realize: com.sun.media.ProcessEngine@1478a43
      Cannot build a flow graph with the customized options:
        Unable to add customed codecs:
          com.mapper.utils.PreAccessCodec@15356d5
          com.mapper.utils.PostAccessCodec@69d02b
    Error: Unable to realize com.sun.media.ProcessEngine@1478a43 I am using netbeans 5.5.1 to deploy my servlets. I doubt that the problem is with classpaths because the servlet doesn't complain when I am using JMF's classes like Processor.
    I would really appreciate any help.
    Thank you.
    Message was edited by:
    calculemus

    The GE.iH() method should return false for
    a ..head-full ..en-headed, not headless
    environment, and I expect (from what you
    reported above) that will return false for both
    your servlet and application, and is apparently
    not the problem.It returned false when I tried GE, and it was not the problem as you suggested. However, I now noticed in the logs:
    java.awt.HeadlessException
    I use Netbeans for the development, and I tried using -Dheadless=true and -Dheadless=false, it did not change anything...
    I think it is time to check that assumption
    more carefully.
    My impression is that PreAccessCodec and
    it's 'Post' equivalent are mentioned a lot in JMF
    example code, but are custom classes,
    built to suit the use at the time. Did you write the
    Pre/PostAccessCodecs for this app.?Yes I customized them from the JMF sample codes. They are in the classpaths and are correctly read by the servlet. I did some logging and I actually saw that the code inside Pre/PostAccess was logging when my servlet was run.
    >
    So, what I am thinking, is that while the JMF
    based Processor class may well be on the
    server's
    classpath, perhaps Pre/PostAccessCodec classes
    are not.
    oes a jar appear in the WEB-INF/lib directory,
    that contains the Pre/PostAccessCodec.class?
    Failing that, are the classes themselves in
    WEB-INF/classes/(sub-dir according to package name)/ ?Nevertheless, just to double check I checked WEB-INF directory and the classes appear correctly in their appropriate 'package-folders'.
    I figured out where exactly the thread was not running. In my PostAccessCodec class, I had overloaded getSupportedInputFormats() function to return RGB format.
    public Format [] getSupportedInputFormats() {
    Format [] fomats = {new RGBFormat()};
    return fomrats;
    When I changed it to return {VideoFormat()}, the codec initializes, but I get nothing when I want to access the frame.
    I guess I will have to start another thread.
    @moderators, please move the post if it is inappropriate to put it in this thread, my apologies.
    The problem is still there and I am not able to get the frame access not working from the servlet. :(
    Message was edited by:
    calculemus
    Message was edited by:
    calculemus

  • Move jsp code into servlet, not work!!

    Hi:
    I am new in servlet and java, I can use jdom to read xml file
    into a jsp file, but whan I move jsp code into servlet, they are not work
    have any ideals?
    Thank!

    Hi:
    my.jsp
    <%@ page contentType="text/html"%>
    <%@ page import="java.io.File,
    java.util.*,
    org.jdom.*,
    org.jdom.input.SAXBuilder,
    org.jdom.output.*" %>
    <%
    String Records = "c:/XMl/Quotes.xml";
    SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser");
    Document l_doc = builder.build(new File(Records));
    my servlet
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import org.jdom.*;
    import org.jdom.input.*;
    import org.jdom.input.SAXBuilder;
    import org.jdom.output.*;
    public class XmlJdom extends HttpServlet
    String Records = "c:/xml/Quotes.xml";
    SAXBuilder builder = null;
    Element Author = null;
    Element Text = null;
    Element Date = null;
    * Initializes the servlet.
    public void init(ServletConfig config) throws ServletException
    super.init(config); //pass ServletConfig to parent
    try
    // JDOM can build JDOM trees from a variety of input sources. One
    // of those input sources is a SAX parser.
    SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser");
    catch ( org.jdom.JDOMEXception e)
    public void doGet(
    HttpServletRequest request,
    HttpServletResponse response)
         throws IOException, ServletException
         PrintWriter out = null;
         out = response.getWriter();
         try{                
         Document l_doc = builder.build(new File(Records));
    Element root = l_doc.getRootElement();
    //get a list of all recode in my XML document
    String l_pages = root.getChild("quote");
    String Iterator e = l_pages.iterator();
    while ( e.hasNext())
    Element l_quote= (Element) e.next();
         Element l_Author = l_quote.getChild("Date").getChild("Text");
    XMLOutputter l_format = new XMLOutputter();
    String ls_result = l_format.outputString(l_doc);
    out.println(ls_result);
    catch( org.jdom.JDOMException e )
         finally
              if( out != null)
                   out.close();
    Please tell me, what is wrong!!!
    Element root = l_doc.getRootElement();
    /* get a list of all the links in our XML document */
    List l_pages = root.getChildren("quote");
    Iterator Myloop = l_pages.iterator();
    while ( Myloop.hasNext())
    Element l_quote= (Element) Myloop.next();
         Element l_Author = l_quote.getChild("Date").getChild("Text");
    XMLOutputter l_format = new XMLOutputter();
    String ls_result = l_format.outputString(l_doc);
    ls_result = l_format.outputString(l_doc);
    %>
    <html><head><title></title></head>
         <body>
              <pre>
              <%=ls_result%>
              </pre>
         </body>
    </html>

  • JSP/Servlets not working after upload

    I have a JSP file and some servlets that work fine on my PC running Tomcat.
    I just uploaded them to my web server (which supports servlets/jsp and has apache web server running), but they do not work. The jsp file does not run, it just displays the source code.
    Strangely, the support people at my server say the jsp files run ok when they view them. But when I view them from my browser it just shows source code.
    Do I need to configure something in my program? Or is it a server problem?

    Very hard to help without seeing the page - the answer is in the code  :-)
    Can you please point a link to your page?
    Are you sure you uploaded all the image files, and that the paths to the images are all correct?
    Nadia
    Adobe® Community Expert : Dreamweaver
    http://www.perrelink.com.au
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    http://csstemplates.com.au/
    http://twitter.com/nadiap

  • Hello World Servlet Not Working

    Hi,
    I am using apache and eclipse for the first time. I am running into an issue. When I create the HelloServlet.java class, a yellow icon with a question mark appears on top on my web-inf, package, and class. I also notice a yellow line appears under the class name HelloWorld. I place the curso on top of it, and I saw the message below:
    �The serializable class HelloServlet does not declare a static final serialVersionUID field of type long�. I am not sure what I did wrong. When I paste the url in the browser, it does not show the message. It shows me an error 404.
    I am using eclipse 3 with tomcat 6 and java 5.
    P.S. I started tomcat, and all the jsp and html samples are working fine.

    I am getting the error message below when I compile my hello World Servlet.
    Dec 13, 2007 11:45:54 AM org.apache.catalina.core.AprLifecycleListener init
    INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_14\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jre1.6.0_03\bin\client;C:\Program Files\Java\jre1.6.0_03\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.5.0_14\bin;C:\JDBC\sqljdbc_1.2\enu\sqljdbc.jar;c:\Program Files\Microsoft SQL Server\90\Tools\binn\
    Dec 13, 2007 11:45:54 AM org.apache.coyote.http11.Http11Protocol init
    SEVERE: Error initializing endpoint
    java.net.BindException: Address already in use: JVM_Bind:8080
         at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
         at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:177)
         at org.apache.catalina.connector.Connector.initialize(Connector.java:1059)
         at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
         at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
         at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
         at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
    Dec 13, 2007 11:45:54 AM org.apache.catalina.startup.Catalina load
    SEVERE: Catalina.start
    LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind:8080
         at org.apache.catalina.connector.Connector.initialize(Connector.java:1061)
         at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
         at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
         at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
         at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
    Dec 13, 2007 11:45:54 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 827 ms
    Dec 13, 2007 11:45:54 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Dec 13, 2007 11:45:54 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
    Dec 13, 2007 11:45:54 AM org.apache.tomcat.util.digester.Digester fatalError
    SEVERE: Parse Fatal Error at line 1 column 6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
    org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
         at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
         at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(XMLScanner.java:689)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(XMLDocumentFragmentScannerImpl.java:750)
         at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(XMLScanner.java:664)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocumentScannerImpl.java:845)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
         at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
         at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:369)
         at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1062)
         at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4239)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
         at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:516)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Dec 13, 2007 11:45:54 AM org.apache.catalina.startup.ContextConfig applicationWebConfig
    SEVERE: Parse error in application web.xml file at jndi:/localhost/HelloWorld/WEB-INF/web.xml
    org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
         at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
         at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:369)
         at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1062)
         at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4239)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
         at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:516)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Dec 13, 2007 11:45:54 AM org.apache.catalina.startup.ContextConfig applicationWebConfig
    SEVERE: Occurred at line 1 column 6
    Dec 13, 2007 11:45:54 AM org.apache.catalina.startup.ContextConfig start
    SEVERE: Marking this application unavailable due to previous error(s)
    Dec 13, 2007 11:45:54 AM org.apache.catalina.core.StandardContext start
    SEVERE: Error getConfigured
    Dec 13, 2007 11:45:54 AM org.apache.catalina.core.StandardContext start
    SEVERE: Context [HelloWorld] startup failed due to previous errors
    Dec 13, 2007 11:45:55 AM org.apache.coyote.http11.Http11Protocol start
    SEVERE: Error starting endpoint
    java.net.BindException: Address already in use: JVM_Bind:8080
         at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
         at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:515)
         at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:204)
         at org.apache.catalina.connector.Connector.start(Connector.java:1132)
         at org.apache.catalina.core.StandardService.start(StandardService.java:531)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Dec 13, 2007 11:45:55 AM org.apache.catalina.startup.Catalina start
    SEVERE: Catalina.start:
    LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: java.net.BindException: Address already in use: JVM_Bind:8080
         at org.apache.catalina.connector.Connector.start(Connector.java:1139)
         at org.apache.catalina.core.StandardService.start(StandardService.java:531)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Dec 13, 2007 11:45:55 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1244 ms
    Dec 13, 2007 11:45:55 AM org.apache.catalina.core.StandardServer await
    SEVERE: StandardServer.await: create[8005]:
    java.net.BindException: Address already in use: JVM_Bind
         at java.net.PlainSocketImpl.socketBind(Native Method)
         at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
         at java.net.ServerSocket.bind(ServerSocket.java:319)
         at java.net.ServerSocket.<init>(ServerSocket.java:185)
         at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
         at org.apache.catalina.startup.Catalina.await(Catalina.java:630)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:590)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

  • Servlet not working on a Mac

    I have a site that requires a login. The login page is a JSP which then calls a servlet that checks the database and forwards to either an error page of the members area. This works perfectly on a PC. However when I test it on IE on a Mac it does not.
    Does anyone know why this might be?
    I thought JSPs and Servlets were cross platform and if they worked on a PC they would work on a Mac.
    Cheers
    Andy

    there is plenty of code in the Java APIs that, if used carelessly, can make you progs platform dependent. what are the errors?

  • Redirecting URL Servlet not working

    Hi all,
    All my JSPs are located in pages folder of my Application's Web Context. I need to redirect JSP URLs to the pages folder. For example if user requests http://localhost:8080/RedirectJSPApp/test.jsp then I need to redirect to http://localhost:8080/RedirectJSPApp/pages/test.jsp. But if user request http://localhost:8080/RedirectJSPApp/pages/test.jsp then i dont need to do any redirection.
    So I define a Servlet:
    package com.srh.servlet;
    public class RedirectServlet
          extends javax.servlet.http.HttpServlet
       public void doGet(HttpServletRequest request, HttpServletResponse response)
             throws ServletException, IOException
          doPost(request, response);
       public void doPost(HttpServletRequest request, HttpServletResponse response)
             throws ServletException, IOException
          String contextPath = request.getContextPath();
          String requestUrl = request.getRequestURL().toString();
          String targetRequestUrl = null;
          String jspRequested = null;          
          int index = -1;
          index = requestUrl.indexOf("/pages/");
          // The JSP is not called properly;
          if (index == -1)
             // Call the JSP properly
             index = requestUrl.indexOf(contextPath);
             if (index != -1)
                targetRequestUrl = requestUrl.substring(0, index+contextPath.length());
                jspRequested = requestUrl.substring(index+contextPath.length()+1);
                targetRequestUrl += "/pages/" + jspRequested;
                response.sendRedirect(targetRequestUrl);
    }In the web.xml I wrote:
       <servlet>
          <description>This Servlet redirects JSP URLs to appropriate lcoation w.r.t. Server</description>
          <display-name>RedirectServlet</display-name>
          <servlet-name>RedirectServlet</servlet-name>
          <servlet-class>com.srh.servlet.RedirectServlet</servlet-class>
       </servlet>
       <servlet-mapping>
          <servlet-name>RedirectServlet</servlet-name>
          <url-pattern>*.jsp</url-pattern>
       </servlet-mapping>I have a test.jsp in pages folder:
    <html>
       <head>
          <title>Test</title>
       </head>
       <body>
          Inside test.jsp
       </body>
    </html>I deployed on JBoss 4.2.0. I type http://localhost:8080/RedirectJSPApp/test.jsp in my browser and it changes to http://localhost:8080/RedirectJSPApp/pages/test.jsp which is perfect but it never prints "Inside test.jsp" on the page. Why this is happening?
    If I remove RedirectServlet entries from web.xml and just type in http://localhost:8080/RedirectJSPApp/pages/test.jsp then it prints "Inside test.jsp" on the page. What I am missing here?
    TIA
    TV

    I tried forward of RequestDispatcher but still same problem:
    package com.srh.servlet;
    public class RedirectServlet
          extends javax.servlet.http.HttpServlet
       public void doGet(HttpServletRequest request, HttpServletResponse response)
             throws ServletException, IOException
          doPost(request, response);
       public void doPost(HttpServletRequest request, HttpServletResponse response)
             throws ServletException, IOException
          String contextPath = request.getContextPath();
          String requestUrl = request.getRequestURL().toString();
          String targetRequestUrl = null;
          String jspRequested = null;          
          int index = -1;
          index = requestUrl.indexOf("/pages/");
          // The JSP is not called properly;
          if (index == -1)
             // Call the JSP properly
             index = requestUrl.indexOf(contextPath);
             if (index != -1)
    //          targetRequestUrl = requestUrl.substring(0, index+contextPath.length());
    //          jspRequested = requestUrl.substring(index+contextPath.length()+1);
    //          targetRequestUrl += "/pages/" + jspRequested;
    //          response.sendRedirect(targetRequestUrl);
                jspRequested = requestUrl.substring(index+contextPath.length()+1);
                RequestDispatcher rd = request.getRequestDispatcher("/pages/" + jspRequested);
                rd.forward(request, response);
    }

  • Output byte[] (image) to JSP page from Servlet - not working - why??

    I'm testing some new code in my servlet. I'm changing the method I use for pulling an image from the db (which is stored in a Blob column) and then displaying it in a Jsp page via <img src="go.callServlet">
    The new way works up until the code that outputs the image (bytes).
    Here's a snippet of the code -
                   rs = stmt.executeQuery("Select image from images");
                   rs.next();
                   Blob blobimage = rs.getBlob(1);          
                   int index = 0;             
                in = blobimage.getBinaryStream();        
                BufferedImage orig = ImageIO.read(in);    
                //resize image
                GraphicsConfiguration gc = getDefaultConfiguration(); //calls method in servlet
                 BufferedImage image = toCompatibleImage(orig, gc); //calls method in servlet                   
                 final double SCALE = (double)max_Width_Large/(double)image.getWidth(null);
                 int w = (int) (SCALE * image.getWidth(null));
                 int h = (int) (SCALE * image.getHeight(null));
                 final BufferedImage resize = getScaledInstance(image, w, h, gc);
                   //convert bufferedimage to byte array
                   ByteArrayOutputStream bytestream = new ByteArrayOutputStream();                                        
                  // W R I T E                                        
                  ImageIO.write(resize,"jpeg",bytestream);                                                                      
                  byte[] bytearray = bytestream.toByteArray();
                  bytestream.flush();
                  res.reset();
                   res.setContentType("image/jpeg");                   
                   while((index=in.read(bytearray))!= -1 ) {                         
                             res.getOutputStream().write(bytearray,0,index);
                   res.flushBuffer();              
                   in.close();     
                   //....               I know for a fact that the process of getting the image as a blob, making a BufferedImage from it, having the BufferedImage resized, and then converted into a byte[] array, works! I tested by putting the result into a db table.
    I just don't understand why it is that as soon as it gets to the code where it should output the image, it doesn't work. Its frustrating:(
    Here's the code I use regularly to output the image to the jsp, works all the time. The reason I've changed the method, is because I wanted to resize the image before displaying it, and keep it to scale without losing too much quality.
    rs = stmt.executeQuery("Select image from testimages");
                   rs.next();
                   Blob blobimage = rs.getBlob(1);
                   int index = 0;             
                in = blobimage.getBinaryStream();
                  int blob_length = (int)blobimage.length();
                  byte[] bytearray = new byte[blob_length];
                  res.reset();
                  res.setContentType("image/jpeg");
                   while((index=in.read(bytearray))!= -1 ) {
                             res.getOutputStream().write(bytearray,0,index);
                   res.flushBuffer();
                   in.close();     
    //...Can someone shed some light on this trouble I'm having?
    Much appreciated.

    I hate to bother you again BalusC, but I have another question, and value your expertise.
    With regards to using the BufferedInput and Output Streams - I made the change to my code that is used for uploading an image to the db, and I hope I coded it right.
    Can you please take a look at the snippet below and see if I used the BufferedOutputStream efficiently?
    The changes I made are where I commented /*Line 55*/ and /*Line 58*/.
    Much appreciated.
         boolean isPart = ServletFileUpload.isMultipartContent(req);
             if(isPart) { //40
              // Create a factory for disk-based file items
              FileItemFactory factory = new DiskFileItemFactory();
              // Create a new file upload handler
              ServletFileUpload upload = new ServletFileUpload(factory);                    
              java.util.List items = upload.parseRequest(req); // Create a list of all uploaded files.
              Iterator it = items.iterator(); // Create an iterator to iterate through the list.                         
              int image_count = 1;
         while(it.hasNext()) {                                                       
              //reset preparedStatement object each iteration
              pstmt = null;
                 FileItem item = (FileItem)it.next();     
                 String fieldValue = item.getName();     
                 if(!item.isFormField()) {//30
              //when sent through form
              File f = new File(fieldValue); // Create a FileItem object to access the file.
              // Get content type by filename.
                 String contentType = getServletContext().getMimeType(f.getName());
                 out.print("contenttype is :"+contentType+"<br>");                    
                 if (contentType == null || !contentType.startsWith("image")) {                               
                     String message = "You must submit a file that is an Image.";
                     res.sendRedirect("testing_operations.jsp?message="+message);
                       return;
              }//if
              //#### Code Update 3/18/09 ####
    /*line 38*/     BufferedInputStream bis = new BufferedInputStream(new FileInputStream(f));
              BufferedImage bug_lrg_Img = ImageIO.read(bis);                                           
              //code to resize the image;
              BufferedImage dimg = new BufferedImage(scaledW,scaledH,BufferedImage.TYPE_INT_RGB);
              //more code for resizing
              //BufferedImage dimg now holding resized image                           
                  ByteArrayOutputStream bytestream = new ByteArrayOutputStream();
                // W R I T E
                /* Line 55 */     
                   /*  ??? - is a BufferedOutputStream more efficient to write the data */
                   BufferedOutputStream bos = new BufferedOutputStream(bytestream);
                   /*line 58 */     
                   //changed from  ImageIO.write(dimg,"jpg",bytestream);                                  
                   //to
                   ImageIO.write(dimg,"jpg",bos);
              // C L O S E
              bytestream.flush();
                   /* Line 63 */
                   byte[] newimage = bytestream.toByteArray();                    
              pstmt = conn.prepareStatement("insert into testimages values(?)");                              
              pstmt.setBytes(1,newimage);
              int a = pstmt.executeUpdate();     
                   bis.close();
                bytestream.close();
                   bos.close();
                  //...

  • Servlets Not Working with PointBase Database

    Hello All,
    Background (This is more of a PointBase Question): I am developing a web application and am attempting to integrate a PointBase database with the app to capture my data.
    Issue: While attempting to start and populate my database, I receive an error which reads (Class Not Found: JBDC driver com.pointbase.jdbc.jdbcUniversalDriver could not be loaded)
    Question: Has anyone ever encountered this issue and resolved it?...or have any ideas about what could be the problem. Thanks for any assistance. RodneyM
    Detail: I have the pbclient.jar file in the tomcat\common\lib directory.
    My ant build.xml script is below....as well as my db schema.
    <!-- =================== Web.xml DATABASE TARGETS =============================== -->
    <target name="createUserData">
    <input message="Please enter username for table: "
    addproperty="table.username" />
    <copy file="db/data_template.sql" tofile="db/data.sql">
    <filterset>
    <filter token="username" value="${table.username}"/>
    </filterset>
    </copy>
    </target>
    <target name="createSchema">
    <sql
    driver="com.pointbase.jdbc.jdbcUniversalDriver"
    url="jdbc:pointbase://localhost/dvdlibrary,new"
    userid="PBPUBLIC"
    password="PBPUBLIC"
    classpath="${pointbase.home}/lib/pbclient.jar"
    onerror="continue"
    src="db/schema.sql"
    />
    </target>
    <target name="populateDatabase" depends="createSchema,createUserData">
    <sql
    driver="com.pointbase.jdbc.jdbcUniversalDriver"
    url="jdbc:pointbase://localhost/dvdlibrary"
    userid="PBPUBLIC"
    password="PBPUBLIC"
    classpath="${pointbase.home}/lib/pbclient.jar"
    onerror="continue"
    autocommit="true"
    print="true"
    src="db/data.sql"
    />
    </target>
    <!-- =================== END DATABASE TARGETS =============================== -->
    <!-- =================== SCHEMA =============================== -->
    -- This is the Database Schema for the DVD Library Application.
    -- Clear out the old table.
    DROP TABLE ObjectIDs;
    DROP TABLE Item;
    -- This table represents the "next" object_ID for a given table.
    CREATE TABLE ObjectIDs (
    -- PRIMARY KEY --
    table_name VARCHAR(30) PRIMARY KEY,
    -- DATA FIELDS --
    id INTEGER NOT NULL
    -- This table represents the DVD Items
    CREATE TABLE Item (
    -- PRIMARY KEY --
    id INTEGER PRIMARY KEY,
    -- DATA FIELDS --
    username VARCHAR(20) NOT NULL,
    title VARCHAR(100) NOT NULL,
    year CHAR(4) NOT NULL,
    genre VARCHAR(20) NOT NULL
    COMMIT;

    Yeah. Millions of Java programmers have had the problem where something isn't in their classpath, and gone on to resolve it. In fact it's a rare Java programmer who hasn't had that problem.
    Perhaps there's a conflict between this statement:"I have the pbclient.jar file in the tomcat\common\lib directory."And this configuration option:classpath="${pointbase.home}/lib/pbclient.jar"

  • 9i Portal servlets not working

    [06/07/2001 16:10:02:002 GMT+10:00] page/ContentFetcher Exception, name=content-fetcher12
    java.io.IOException: Stream closed
    at oracle.webdb.page.ExpandablePipedWriter.write(ExpandablePipedWriter.java, Compiled Code)
    at oracle.webdb.page.ContentFetcher.run(ContentFetcher.java, Compiled Code)
    [06/07/2001 16:10:02:003 GMT+10:00] page/Error writing message for content=118
    [06/07/2001 16:10:07:012 GMT+10:00] page/ContentFetcher Exception, name=content-fetcher17
    java.io.IOException: Stream closed
    at oracle.webdb.page.ExpandablePipedWriter.write(ExpandablePipedWriter.java, Compiled Code)
    at oracle.webdb.page.ContentFetcher.run(ContentFetcher.java, Compiled Code)
    [06/07/2001 16:10:07:013 GMT+10:00] page/Error writing message for content=92
    [06/07/2001 16:10:22:475 GMT+10:00] page/ContentFetcher Exception, name=content-fetcher14
    java.io.IOException: Stream closed
    at oracle.webdb.page.ExpandablePipedWriter.write(ExpandablePipedWriter.java, Compiled Code)
    at oracle.webdb.page.ContentFetcher.run(ContentFetcher.java, Compiled Code)
    [06/07/2001 16:10:22:479 GMT+10:00] page/Error writing message for content=91
    [06/07/2001 16:10:22:478 GMT+10:00] page/ContentFetcher Exception, name=content-fetcher3
    java.io.IOException: Stream closed
    at oracle.webdb.page.ExpandablePipedWriter.write(ExpandablePipedWriter.java, Compiled Code)
    at oracle.webdb.page.ContentFetcher.run(ContentFetcher.java, Compiled Code)
    [06/07/2001 16:10:22:480 GMT+10:00] page/Error writing message for content=97
    Any ideas ? This happens when we press the navigator button in portal. This error is produced in Jserv.log
    any help much appreciated.
    null

    Hi Frank,
    I followed the signing directions creating a certificate and signed the host.jar file. I
    added host.jar to ARCHIVE_JINI entry. Java console shows it being loaded, but, I am
    still not being prompted to trust code. Java console shows error:
    Loading http://jonjon:8889/forms90/java/f90all_jinit.jar from JAR cache
    Loading http://jonjon:8889/forms90/java/local.jar.sig from JAR cache
    Downloading http://jonjon:8889/forms90/java/host.jar to JAR cache
    connectMode=HTTP, native.
    Forms Applet version is : 90290
    java.lang.ClassNotFoundException: java.io.IOException: open HTTP connection failed.
    at sun.applet.AppletClassLoader.getBytes(Unknown Source)
    Host.fmx still displays but nothing seems to happen when I type in command and push Host.
    Any other ideas will be appreciated
    Jon

  • JSPs and Servlets do not work on Apache HTTP- Procesor Intel P4

    Computer description: Intel Pentium 4 processor with 20GB HD
    drive, 1GB RAM, Windows 2000Pro, Service pack II
    Before installation:
    We created a temporary directory on our Intel Pentium. 4
    processor server (e.g. \TEMP).
    Copied the contents of the Oracle* Server CD to the temporary
    directory.
    Renamed each copy of the SYMCJIT.DLL to SYMCJIT.OLD.
    Set the java_compiler=none environment variable.
    Installation:
    We run the SETUP.EXE from the \TEMP\install\win32 directory and
    install Oracle 8.1.7 EE Rel 3 Typical
    Configuration tool Net8 Configuration Assistant succeeded
    Configuration tool Oracle Database Configuration Assistant
    succeeded
    Configuration tool Starting Oracle HTTP service: 7 times error
    message (java.exe has generated errors and will be closed by
    Windows, You will need to restart the
    program, An error log is being created)
    HTTP server responses.
    All Java programs do not respond (e.g. IsItWorking does not work)
    After installation:
    Open the jserv.conf file chack that ApJServManual is set to Off.
    set ApJServLogLevel debug (will give more informative errors for
    debugging)
    set ApJServDefaultHost www.in.oracle.com (to your machine name
    with the
    domain name or IP address)
    set ApjServDefaultPort 80000
    Open the jserv.properties files and make the following changes:
    bindaddress=www.in.oracle.com (Same name as ApJServDefaultHost
    in jserv.conf)
    port=80000 (same port as in the jserv.conf)
    Enable all log options in jserv.properties:
    log=true
    log.file=/usr/local/apache/var/log/jserv.trace
    log.timestamp=true
    log.dateFormat=[yyyyMMdd HHmmss:SSS]
    log.channel.init=true
    log.channel.terminate=true
    log.channel.serviceRequest=true
    log.channel.authentication=true
    log.channel.requestData=true
    log.channel.responseHeaders=true
    log.channel.signal=true
    log.channel.exceptionTracing=true
    log.channel.servletManager=true
    Java servlets and JSP still do not redspond.
    If we try to start HTTP server from Windows service, we always
    get message: unable to locate dll: The dynamic link
    library Perl.dll could not be found in the secified path (our
    path: C:\oracle\ora81\bin;C:\oracle\ora81\Apache\Perl\5.00503
    \bin\mswin32-x86;
    C:\Program Files\Oracle\jre\1.1.7
    \bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;) and
    error message: Could not start
    OracleOraHome81HTTPServer service on local computer. The service
    did not respond to the start or control request in a
    timely fashion.
    Starting Oracle HTTP service from Start/Programs/Oracle: 7 times
    error message (java.exe has generated errors and will be closed
    by Windows, You will need to restart the
    program, An error log is being created)
    We tested also modifications of oraparam.ini
    a. Copy only the install directory from the CD to the hard
    disk ,say, e:\temp.
    b. Open oraparam.ini and make the following modifications
    (Assuming CD
    drive is f:)
    * Change the "SOURCE=" line to use the full path to the CD
    instead of a
    relative path. (i.e., SOURCE=f:\stage\products.jar)
    * Change the "JRE_LOCATION" line to use the full path to the CD
    instead of a
    relative path. (i.e.,
    JRE_LOCATION=f:\stage\Components\oracle\swd\jre\1.1.7\1
    \DataFiles\Expanded)
    * Change the "OUI_LOCATION" line to use the full path to the CD
    instead of a
    relative path. (i.e.,
    OUI_LOCATION=f:\stage\Components\oracle\swd\oui\1.6.0.9.0\1
    \DataFiles\Expanded
    * Change the "JRE_MEMORY_OPTIONS" line to add "-nojit" as the
    first argument.
    (i.e., JRE_MEMORY_OPTIONS=-nojit -ms16m -mx32m)
    ^^^^^^
    * Other entries should remain the same
    c. Launch setup.exe from the temporary location on your hard
    drive (i.e.
    e:\temp\install\ win32\setup.exe). This will use the modified
    oraparam.ini and pick up the information from the CD since the
    absolute
    locations are specified.
    After that modification of oraparam.ini, the HTTPServer does not
    respond at all.
    So we undo changes on oraparam.ini and reinstall HTTP.
    We copied SYMCJIT.DLL and jvm.dll from JDK 1.1.8_008 to
    Apache\jdk\..
    Since then at least the demo IsItWorking responses, but database
    connection can not be established. But jsp demo still do not?
    THX in advance
    Neja

    I'm still having problems with Portal config (as part of 9iAS) on
    a P4 but i have cleared the hurdle of the HTTP listener (i
    think).
    I downloaded and installed the JRE that is P4 compatible from
    www.sun.com (it puts it under c:\program files)
    then overwrote all the files in the jre directories in the cd
    staging area with the files from Sun (i.e. all symcjit.dll
    locations). I also had to put a file "javai.dll" in the same
    directory as the file "java.exe". This got the install all
    working.
    The service will fail first time because the install creates
    another set of incompatible jre files. You must again search for
    symcjit and repeat the above procedure.
    You must also overwrite the files in the c:\program
    files\oracle\inventory\jre directories (sorry cant remember exact
    path).
    Hope this helps.
    Mark Gornicki
    PS if anyone knows why Portal config hangs at 67%
    (before/during/after processing "bulkload.jar" section) please
    let me know :-)

  • 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.
              

  • BUG: Oracle Schema Processor does not work in Servlets

    We found a bug with Oracle's Schema Processor. It does not work in Servlets.
    When we try to validate a XML document in a Servlet it does not work, but we can execute the same code in a stand alone application and it works.
    The following is the code we are using:
    try {
    File f =new File(filename);
    FileReader r = new FileReader(f);
    DOMParser dp = new DOMParser();
    URL url = createURL (filename);
    dp.setValidationMode(false);
    dp.setSchemaValidationMode(true);
    dp.setPreserveWhitespace(true);
    dp.parse(url);
    System.out.println("it is parsed");
    } catch(Exception e){System.out.println("there is Error"+e.getMessage());}
    null

    I don't think this is related to Servlets per se.
    Check that the Schema processor classes used by the servlet container, and your application are the same.
    Java does not have proper versioning of classes, I have seen many applications collapse. People compiled their code on developer machines, where it worked fine, but when moved to a production machine they failed because the production machine had a different version of classes. Usually the name of the class doesn't change, but either a method or a variable is missing in several classes. VM doesn't complain but simply crashes.
    In your Schema Processor classes that are used by the servlet engine might be different from the one that the app uses. Do a search on the file system to see how many copy of the same class bundle (zip, jar) you have on the system.

Maybe you are looking for

  • Smartform in multiple language

    Hi , I have a smartform for purchase order which is in English Language,and i want this smartform in 10 different languages with some modification,how to do that. Points will be rewarded. Thanks

  • I-Trigue 3400 static problem..

    It's been only 4 months max since I've been using these speakers, and all of a sudden starting yesterday, static sounds appeared. I've tried plugging it out and waiting.. It was ok for a while.. but static returned. It is NOT my computer, since when

  • AS2 TextInput Background Color - Issues when trying to change dynamically

    Hello, I'm having issues changing a TextInput background color after the initial onLoad using AS2. On load, I have no issues setting the background color with this code: Code: onClipEvent (load) {     this.background = true;     this.backgroundColor

  • Output .bat-file to console AND logfile.txt

    Hello, in my .bat file i have added the following to a command : >> c:\1.txt This will log the output to 1.txt, but not to my console/screen anymore. What is the command to have the output to the console AND 1.txt? Thx

  • Looping flash gallery?

    Hello, This forum has been priceless in the creation of my website! I never thought I would have been able to accomplish what I did! Now I am looking for a flash gallery like the one on the home page of this website: http://www.catoandpade.com.au/Hom