Problem with JDBC and Tomcat

I don't know where the problem originate, the only thing in my memory is that the program worked very well on my PC yesterday, but today, without even slightest change, it doesn't work anymore. As to debug it, I simplified the codes to the least, but it still refuse to work. I was beaten down by this problem totally, and cannot make out any solution for it, so, I come here, hoping to find a warrior to kill this damned bug for me.
My program is a Servlet, but for the purpose of debugging, I have recode it to an Application/Servlet. When run as a application, I can get the result expected, but as a Servlet, :-(, maybe you should see it by yourself. My server software is Tomcat 4.1.15, and the JDK version is 1.4.0. To excute this program, you should add Data Source "Test" to ODBC.
///////////////////////code begins/////////////////////////
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class Ex extends HttpServlet
     int ErrorType = 0;
     String err = new String("");
     public static void main(String args[]) throws Exception{
          Ex cEx = new Ex();
          cEx.init();     
          System.out.println(cEx.ErrorType);     
     public void init() {
          String url = "jdbc:odbc:Test";
          ErrorType = 3;     //passed
          try{
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          } catch (ClassNotFoundException e) {
               e.printStackTrace();
               ErrorType = 1; //trapped in Class.forName
          try{
               Connection c = DriverManager.getConnection(url);
          } catch (SQLException e) {
               e.printStackTrace();
               ErrorType = 2; //trapped in DriverManager.getConnection
               err = e.getMessage();
     public void service(HttpServletRequest req, HttpServletResponse res)
               throws IOException {
          res.setContentType("text/html; charset=GB2312");
          PrintWriter out = res.getWriter();
          out.println("Success " + "<p>" + ErrorType + "<p>" +err);
          out.close();
//////////////////////////code ends///////////////////////////////
The result from the Servlet tell me that the problem occurred within the connection process, I don't know who should be responsible to this - Tomcat or JDBC?

If you could print the exception that you got then that would help :) In the mean time, I could make a guess. It is unlikely that your application server (in this case, Tomcat) is blocking connections from your servlet. So the problem is either with JDBC directly or with the underlying datasource. It seems unlikely that it is JDBC given that you have stated that the code has not changed and it works in application form.
My guess would be that you are coming up against some sort of security constraint (eg: your DBMS is letting you log in from one IP but not another?, your Java plug-in security policy is disallowing the connection?). It's hard to say.
But if it works as an application but not via a servlet then you could try putting this in your java.policy file, which is located in the directory where your plug-ins are installed (eg: "C:\Program Files\Java\<version>\lib\security\") on Windows systems;
permission java.net.SocketPermission "bend xp:1099", "listen,connect,accept";
Try that, see if it works :)
Ben

Similar Messages

  • Problem with JNI and Tomcat (and threads???)

    Howdy,
    Here is the issue - I would like some help on HOW to debug and fix this problem:
    2 test use cases -
    1)
    a)User goes to Login.jsp, enters user and password
    b) User submits to LoginServlet
    c) login calls JNI code that connects to a powerbuilder(Yes I know this is ugly) PBNI code module (this is a .dll) that authenticates the user with the database
    d) the servlet then redirects to another .jsp page
    e) user then submits to LogoutServlet - also a JNI call to a powerbuilder PBNI code module
    f) REPEAT STEPS a-e over a few times (inconsistent) and then the call to the JNI code hangs
    2)
    a) users does NOT goto Login.jsp, but rather calls LoginServlet and passes the userid and password as GET parms
    b) user does NOT get redirected to a page (redirect code commented out)
    c) user calls LogoutServlet
    d) repeat steps a-c at will and no failure, no hanging
    The only difference is that in case 1 (with JSP), there is a redirect and it afffected the JNI call by haniging inside JNI code.
    In case 2 (without JSP) there is still a JNI call, but it does not hang. In addition, when it hangs and I stop Tomcat, the logs show cleanup entries that say:
    Oct 19, 2004 9:17:09 AM org.apache.catalina.core.StandardWrapper unload
    INFO: Waiting for 1 instance(s) to be deallocated
    Oct 19, 2004 9:17:10 AM org.apache.catalina.core.StandardWrapper unload
    INFO: Waiting for 1 instance(s) to be deallocated
    Oct 19, 2004 9:17:11 AM org.apache.catalina.core.StandardWrapper unload
    INFO: Waiting for 1 instance(s) to be deallocated
    Is this a threading issue in Tomcat???
    On would assume that the JNI code is not cleaning up after itself, but I don't believe this is the case,
    and even if it was, why would I get the tomcat log cleanup entries above???
    What do those cleanup entries imply about the state of Tomcat????

    hi ,
    I met the same problem this morning, and searched the www.google.com in order to solve it, as a result, your article was shown on my screen. :)
    Till now I have read some technical information and solved my problems. Maybe the solution be useful to you:
    ==============================
    error message : (Environment : Tomcat 5, Windows 2003, Mysql5)
    2006-3-29 11:53:48 org.apache.catalina.core.StandardWrapper unload
    message: Waiting for 2 instance(s) to be deallocated
    ==============================
    cause: the number of connection to database exceeded.another word,too many connections.
    ==============================
    solution: close the connection when it becomes useless for your program. :)
    ==============================
    ps. Sorry for my weak English . hehe ....

  • Problem with axis2 and Tomcat

    Hello,
    I am having a strange problem with Tomcat and axis. I have a webservice that uses axis2 for wsdl2java class generation. When I compile my project in maven a Test is performed. During the test a glassfish server is established and the project is deployed -everything work great with the expected results. However when I try to deploy the webservice on tomcat it has some problems.
    At first I tried to call axis code in a POST method that takes a MultiPart message. The code is as below:
    *@Path("identifyWavestream")*
    *@POST*
    *@Consumes(MediaType.MULTIPART_FORM_DATA)*
    *@Produces(MediaType.APPLICATION_XML)*
    *public String multipartTest(com.sun.jersey.multipart.MultiPart multiPart) throws Exception {* 
    *// get first body part (index 0)*
    *//tomcat shows that the first error is here (line 122 is the nest one with bodypart)*
    BodyPart bp = multiPart.getBodyParts().get(0);
    BodyPartEntity bodyPartEntity = (BodyPartEntity) bp.getEntity();
    InputStream stream = bodyPartEntity.getInputStream();
    *//the rest of the code either saves the incoming file or implements the wsdl2java axis interface - neither works.*
    And the tomcat error is:
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    java.util.ArrayList.RangeCheck(Unknown Source)
    java.util.ArrayList.get(Unknown Source)
    com.webserv.rest.resources.SearchResource.test.multipartTest(SearchResource.java:122)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    java.lang.reflect.Method.invoke(Unknown Source)
    com.sun.jersey.server.impl.model.method.dispatch.EntityParamDispatchProvider$TypeOutInvoker._dispatch(EntityParamDispatchProvider.java:138)
    com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
    com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:124)
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
    com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
    com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63)
    com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:555)
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:514)
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:505)
    com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:359)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    It was strange to me since this simple approach of handling a Multipart method worked for me earlier. Then I decided skip the handling of multipart method and just call the axis code. But the results also caused an error. I then tried to call the axis code in a simple @GET method (to cross out any issues regarding the multipart) and the result where the same. Again everything works on the maven- glassfish test. In this case the tomcat error is the following:
    javax.servlet.ServletException: java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpConnectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams;
    com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:361)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    root cause
    com.sun.jersey.api.container.MappableContainerException: java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpConnectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams;
    com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:74)
    com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:124)
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
    com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
    com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63)
    com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:555)
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:514)
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:505)
    com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:359)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    root cause
    java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpConnectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams;
    org.apache.axis2.transport.http.AbstractHTTPSender.initializeTimeouts(AbstractHTTPSender.java:454)
    org.apache.axis2.transport.http.AbstractHTTPSender.getHttpClient(AbstractHTTPSender.java:514)
    org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:156)
    org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
    org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
    org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
    org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
    org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
    org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
    org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
    com.webserv.rest.webapp.IntSoapServiceStub.getServerData(IntSoapServiceStub.java:2447)
    com.webserv..rest.resources.AIntSoapImpl.getServerData(AIntSoapImpl.java:112)
    com.webserv..rest.resources.SearchResource.test.pingTest(SearchResource.java:167)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    java.lang.reflect.Method.invoke(Unknown Source)
    com.sun.jersey.server.impl.model.method.dispatch.EntityParamDispatchProvider$TypeOutInvoker._dispatch(EntityParamDispatchProvider.java:138)
    com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
    com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:124)
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
    com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
    com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63)
    com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:555)
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:514)
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:505)
    com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:359)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    I think it is also a good ide to post the pom.xml file :
    Edited by: 803864 on 2010-10-21 00:30

    I think it is also a good ide to post the pom.xml file:
    +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"+
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    +<modelVersion>4.0.0</modelVersion>+
    +<groupId>com.myProjects</groupId>+
    +<artifactId>audioid-rest-interface</artifactId>+
    +<packaging>war</packaging>+
    +<name>AudioID Rest Interface</name>+
    +<version>0.1</version>+
    +<dependencies>+
    +<!--+
    +<dependency>+
    +<groupId>com.sun.tools.xjc.maven2</groupId>+
    +<artifactId>maven-jaxb-plugin</artifactId>+
    +<version>1.1</version>+
    +<scope>test</scope>+
    +</dependency>+
    +<dependency>+
    +<groupId>com.sun.jersey</groupId>+
    +<artifactId>jersey-client</artifactId>+
    +<version>1.0.1</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>com.sun.jersey.contribs</groupId>+
    +<artifactId>jersey-multipart</artifactId>+
    +<version>1.0.1</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>com.sun.grizzly</groupId>+
    +<artifactId>grizzly-servlet-webserver</artifactId>+
    +<version>1.9.0</version>+
    +<scope>test</scope>+
    +</dependency>-->+
    +<dependency>+
    +<groupId>com.sun.jersey.contribs</groupId>+
    +<artifactId>jersey-multipart</artifactId>+
    +<version>1.0.1</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>com.sun.jersey</groupId>+
    +<artifactId>jersey-client</artifactId>+
    +<version>1.0.1</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>com.sun.jersey</groupId>+
    +<artifactId>jersey-bundle</artifactId>+
    +<version>1.0.1</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>commons-logging</groupId>+
    +<artifactId>commons-logging</artifactId>+
    +<version>1.0.4</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>commons-collections</groupId>+
    +<artifactId>commons-collections</artifactId>+
    +<version>3.1</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>org.slf4j</groupId>+
    +<artifactId>slf4j-log4j12</artifactId>+
    +<version>1.5.6</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>junit</groupId>+
    +<artifactId>junit</artifactId>+
    +<version>3.8.2</version>+
    +<scope>test</scope>+
    +</dependency>+
    +<dependency>+
    +<groupId>org.glassfish.distributions</groupId>+
    +<artifactId>web-all</artifactId>+
    +<version>10.0-build-20080430</version>+
    +<scope>test</scope>+
    +</dependency>+
    +<dependency>+
    +<groupId>org.glassfish.embedded</groupId>+
    +<artifactId>gf-embedded-api</artifactId>+
    +<version>1.0-alpha-4</version>+
    +<scope>test</scope>+
    +</dependency>+
    +<dependency>+
    +<groupId>com.sun.jersey</groupId>+
    +<artifactId>jersey-server</artifactId>+
    +<version>1.0.3.1</version>+
    +<scope>test</scope>+
    +</dependency>+
    +<dependency>+
    +<groupId>com.sun.jersey.contribs</groupId>+
    +<artifactId>maven-wadl-plugin</artifactId>+
    +<version>1.0.3.1</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>org.hibernate</groupId>+
    +<artifactId>hibernate</artifactId>+
    +<version>3.2.5.ga</version>+
    +<exclusions>+
    +<exclusion>+
    +<groupId>javax.transaction</groupId>+
    +<artifactId>jta</artifactId>+
    +</exclusion>+
    +<exclusion>+
    +<groupId>cglib</groupId>+
    +<artifactId>cglib</artifactId>+
    +</exclusion>+
    +</exclusions>+
    +</dependency>+
    +<dependency>+
    +<groupId>org.apache.axis2</groupId>+
    +<artifactId>axis2</artifactId>+
    +<version>1.4.1</version>+
    +</dependency>+
    +<!-- <dependency> -->+
    +<dependency>+
    +<groupId>org.apache.axis2</groupId>+
    +<artifactId>axis2-aar-maven-plugin</artifactId>+
    +<version>1.4.1</version>+
    +<scope>test</scope>+
    +</dependency>+
    +<dependency>+
    +<groupId>org.apache.axis2</groupId>+
    +<artifactId>axis2-java2wsdl</artifactId>+
    +<version>1.4.1</version>+
    +<scope>test</scope>+
    +</dependency>+
    +<dependency>+
    +<groupId>org.apache.axis2</groupId>+
    +<artifactId>axis2-xmlbeans</artifactId>+
    +<version>1.4.1</version>+
    +</dependency>+
    +<!-- <dependency> -->+
    +<dependency>+
    +<groupId>com.sun.xml.bind</groupId>+
    +<artifactId>jaxb-impl</artifactId>+
    +<version>2.1.12</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>cglib</groupId>+
    +<artifactId>cglib-nodep</artifactId>+
    +<version>2.1_3</version>+
    +</dependency>+
    +</dependencies>+
    +<build>+
    +<finalName>audioid-rest-interface</finalName>+
    +<plugins>+
    +<plugin>+
    +<!-- This class is just generated for wadl support!!! -->+
    +<!-- Take care that folder ../music-dna-core is existing -->+
    +<groupId>com.sun.tools.xjc.maven2</groupId>+
    +<artifactId>maven-jaxb-plugin</artifactId>+
    +<version>1.1</version>+
    +<executions>+
    +<execution>+
    +<phase>generate-sources</phase>+
    +<goals>+
    +<goal>generate</goal>+
    +</goals>+
    +</execution>+
    +</executions>+
    +<configuration>+
    +<generatePackage> com.webserv.wsparameters</generatePackage>+
    +<schemaDirectory>../audioid-rest-interface/src/main/resources+
    +</schemaDirectory>+
    +<includeSchemas>+
    +<includeSchema>**/*.xsd</includeSchema>+
    +</includeSchemas>+
    +<extension>true</extension>+
    +<strict>false</strict>+
    +<verbose>false</verbose>+
    +</configuration>+
    +</plugin>+
    +<plugin>+
    +<groupId>org.apache.maven.plugins</groupId>+
    +<artifactId>maven-javadoc-plugin</artifactId>+
    +<!-- <version>2.6</version> -->+
    +<executions>+
    +<execution>+
    +<goals>+
    +<goal>javadoc</goal>+
    +</goals>+
    +<phase>compile</phase>+
    +</execution>+
    +</executions>+
    +<configuration>+
    +<encoding>UTF-8</encoding>+
    +<verbose>false</verbose>+
    +<show>public</show>+
    +<subpackages> com.webserv.rest.rest.resources: com.webserv.rest.rest.commons: com.webserv.wsparameters+
    +</subpackages>+
    +<doclet>com.sun.jersey.wadl.resourcedoc.ResourceDoclet</doclet>+
    +<docletPath>${path.separator}${project.build.outputDirectory}+
    +</docletPath>+
    +<docletArtifacts>+
    +<docletArtifact>+
    +<groupId>com.sun.jersey.contribs</groupId>+
    +<artifactId>wadl-resourcedoc-doclet</artifactId>+
    +<version>1.0.3.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>com.sun.jersey</groupId>+
    +<artifactId>jersey-server</artifactId>+
    +<version>1.0.3.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>xerces</groupId>+
    +<artifactId>xercesImpl</artifactId>+
    +<version>2.6.1</version>+
    +</docletArtifact>+
    +</docletArtifacts>+
    +<additionalparam>-output+
    +${project.build.outputDirectory}/resourcedoc.xml</additionalparam>+
    +<useStandardDocletOptions>false</useStandardDocletOptions>+
    +</configuration>+
    +</plugin>+
    +<plugin>+
    +<groupId>com.sun.jersey.contribs</groupId>+
    +<artifactId>maven-wadl-plugin</artifactId>+
    +<version>1.0.3.1</version>+
    +<executions>+
    +<execution>+
    +<id>generate</id>+
    +<goals>+
    +<goal>generate</goal>+
    +</goals>+
    +<phase>compile</phase>+
    +</execution>+
    +</executions>+
    +<configuration>+
    +<wadlFile>${project.build.outputDirectory}/application.wadl+
    +</wadlFile>+
    +<formatWadlFile>true</formatWadlFile>+
    +<baseUri>http://192.168.2.149:8080/${project.build.finalName}+
    +</baseUri>+
    +<packagesResourceConfig>+
    +<param> com.webserv.rest.resources</param>+
    +</packagesResourceConfig>+
    +<wadlGenerators>+
    +<wadlGeneratorDescription>+
    +<className>com.sun.jersey.server.wadl.generators.WadlGeneratorApplicationDoc+
    +</className>+
    +<properties>+
    +<property>+
    +<name>applicationDocsFile</name>+
    +<value>${basedir}/src/main/doc/application-doc.xml</value>+
    +</property>+
    +</properties>+
    +</wadlGeneratorDescription>+
    +<wadlGeneratorDescription>+
    +<className>com.sun.jersey.server.wadl.generators.WadlGeneratorGrammarsSupport+
    +</className>+
    +<properties>+
    +<property>+
    +<name>grammarsFile</name>+
    +<value>${basedir}/src/main/doc/application-grammars.xml</value>+
    +</property>+
    +</properties>+
    +</wadlGeneratorDescription>+
    +<wadlGeneratorDescription>+
    +<className>com.sun.jersey.server.wadl.generators.resourcedoc.WadlGeneratorResourceDocSupport+
    +</className>+
    +<properties>+
    +<property>+
    +<name>resourceDocFile</name>+
    +<value>${project.build.outputDirectory}/resourcedoc.xml</value>+
    +</property>+
    +</properties>+
    +</wadlGeneratorDescription>+
    +</wadlGenerators>+
    +</configuration>+
    +</plugin>+
    +<plugin>+
    +<groupId>org.codehaus.mojo</groupId>+
    +<artifactId>exec-maven-plugin</artifactId>+
    +<version>1.1</version>+
    +<executions>+
    +<execution>+
    +<goals>+
    +<goal>java</goal>+
    +</goals>+
    +</execution>+
    +</executions>+
    +<configuration>+
    +<mainClass>com.sun.jersey.samples.generatewadl.Main</mainClass>+
    +</configuration>+
    +</plugin>+
    +<plugin>+
    +<groupId>org.apache.maven.plugins</groupId>+
    +<artifactId>maven-compiler-plugin</artifactId>+
    +<inherited>true</inherited>+
    +<configuration>+
    +<source>1.5</source>+
    +<target>1.5</target>+
    +<!--+
    exclude temporary types that are only needed for wadl and doc
    generation
    -->
    +<!--+
    +<excludes> <exclude>com/webserv/types/temporary/**</exclude>+
    +<exclude>com/webserv/rest/commons/Examples.java</exclude>+
    +</excludes>+
    -->
    +</configuration>+
    +</plugin>+
    +<plugin>+
    +<groupId>org.jvnet.jaxb2.maven2</groupId>+
    +<artifactId>maven-jaxb2-plugin</artifactId>+
    +<executions>+
    +<execution>+
    +<goals>+
    +<goal>generate</goal>+
    +</goals>+
    +</execution>+
    +</executions>+
    +</plugin>+
    +<plugin>+
    +<groupId>org.apache.axis2</groupId>+
    +<artifactId>axis2-wsdl2code-maven-plugin</artifactId>+
    +<version>1.4.1</version>+
    +<executions>+
    +<execution>+
    +<id>generate reco core</id>+
    +<goals>+
    +<goal>wsdl2code</goal>+
    +</goals>+
    +<configuration>+
    +<packageName>com.webserv.rest.webapp</packageName>+
    +<wsdlFile>src/main/java/com/webserv/wsdl/web.wsdl</wsdlFile>+
    +<databindingName>adb</databindingName>+
    +</configuration>+
    +</execution>+
    +</executions>+
    +</plugin>+
    +<plugin>+
    +<groupId>com.sun.tools.xjc.maven2</groupId>+
    +<artifactId>maven-jaxb-plugin</artifactId>+
    +<version>1.1</version>+
    +<executions>+
    +<execution>+
    +<goals>+
    +<goal>generate</goal>+
    +</goals>+
    +</execution>+
    +</executions>+
    +<configuration>+
    +<generatePackage>com.webserv.wsparameters</generatePackage>+
    +<schemaDirectory>src/main/xsd</schemaDirectory> <includeSchemas>+
    +<includeSchema>**/*.xsd</includeSchema> </includeSchemas>+
    +<extension>true</extension>+
    +<strict>false</strict>+
    +<verbose>true</verbose>+
    +</configuration>+
    +</plugin>+
    +</plugins>+
    +</build>+
    +<profiles>+
    +<profile>+
    +<id>jdk-1.5</id>+
    +<activation>+
    +<jdk>1.5</jdk>+
    +</activation>+
    +<dependencies>+
    +<dependency>+
    +<groupId>com.sun.xml.bind</groupId>+
    +<artifactId>jaxb-impl</artifactId>+
    +<version>2.1.10</version>+
    +</dependency>+
    +</dependencies>+
    +<build>+
    +<plugins>+
    +<plugin>+
    +<groupId>org.apache.maven.plugins</groupId>+
    +<artifactId>maven-javadoc-plugin</artifactId>+
    +<configuration>+
    +<docletArtifacts>+
    +<docletArtifact>+
    +<groupId>com.sun.jersey.contribs</groupId>+
    +<artifactId>maven-wadl-plugin</artifactId>+
    +<version>1.0.3.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>com.sun.jersey.contribs</groupId>+
    +<artifactId>wadl-resourcedoc-doclet</artifactId>+
    +<version>1.0.3.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>com.sun.jersey</groupId>+
    +<artifactId>jersey-server</artifactId>+
    +<version>1.0.3.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>xerces</groupId>+
    +<artifactId>xercesImpl</artifactId>+
    +<version>2.6.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>javax.xml.bind</groupId>+
    +<artifactId>jaxb-api</artifactId>+
    +<version>2.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>javax.xml</groupId>+
    +<artifactId>jaxb-impl</artifactId>+
    +<version>2.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>javax.activation</groupId>+
    +<artifactId>activation</artifactId>+
    +<version>1.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>javax.xml.stream</groupId>+
    +<artifactId>stax-api</artifactId>+
    +<version>1.0</version>+
    +</docletArtifact>+
    +</docletArtifacts>+
    +</configuration>+
    +</plugin>+
    +</plugins>+
    +</build>+
    +</profile>+
    +<profile>+
    +<id>xsltproc</id>+
    +<activation>+
    +<file>+
    +<exists>../xsltproc_win32/xsltproc.exe</exists>+
    +</file>+
    +</activation>+
    +<build>+
    +<plugins>+
    +<!-- Create/generate the application.html using xsltproc -->+
    +<!-- Create/generate the application.html using xsltproc -->+
    +<plugin>+
    +<groupId>org.codehaus.mojo</groupId>+
    +<artifactId>exec-maven-plugin</artifactId>+
    +<version>1.1</version>+
    +<executions>+
    +<execution>+
    +<id>copy-docs-to-builddir</id>+
    +<goals>+
    +<goal>exec</goal>+
    +</goals>+
    +<phase>compile</phase>+
    +<configuration>+
    +<executable>copy</executable>+
    +<commandlineArgs>src\\main\\doc\\*.* target\\classes+
    +</commandlineArgs>+
    +</configuration>+
    +</execution>+
    +<execution>+
    +<id>prepare-xsltproc</id>+
    +<goals>+
    +<goal>exec</goal>+
    +</goals>+
    +<phase>package</phase>+
    +<configuration>+
    +<executable>copy</executable>+
    +<commandlineArgs>..\\audioid-rest-interface\\src\\main\\resources\\*.xsd+
    target\\classes</commandlineArgs>
    +</configuration>+
    +</execution>+
    +<execution>+
    +<id>exec-xsltproc: target/application.html</id>+
    +<goals>+
    +<goal>exec</goal>+
    +</goals>+
    +<phase>package</phase>+
    +<configuration>+
    +<!--<executable>xsltproc</executable>-->+
    +<executable>../xsltproc_win32/xsltproc.exe</executable>+
    +<commandlineArgs>-o target/application.html+
    src/main/doc/wadl_documentation.xsl
    target/classes/application.wadl</commandlineArgs>
    +</configuration>+
    +</execution>+
    +</executions>+
    +</plugin>+
    +</plugins>+
    +</build>+
    +</profile>+
    +</profiles>+
    +<pluginRepositories>+
    +<pluginRepository>+
    +<id>maven2-repository.dev.java.net</id>+
    +<name>Java.net Repository for Maven</name>+
    +<url>http://download.java.net/maven/2/</url>+
    +<layout>default</layout>+
    +</pluginRepository>+
    +<pluginRepository>+
    +<id>maven-repository.dev.java.net</id>+
    +<name>Java.net Maven 1 Repository (legacy)</name>+
    +<url>http://download.java.net/maven/1</url>+
    +<layout>legacy</layout>+
    +</pluginRepository>+
    +</pluginRepositories>+
    +<repositories>+
    +<repository>+
    +<id>maven2-repository.dev.java.net</id>+
    +<name>Java.net Repository for Maven</name>+
    +<url>http://download.java.net/maven/2/</url>+
    +<layout>default</layout>+
    +</repository>+
    +<repository>+
    +<id>maven-repository.dev.java.net</id>+
    +<name>Java.net Maven 1 Repository (legacy)</name>+
    +<url>http://download.java.net/maven/1</url>+
    +<layout>legacy</layout>+
    +</repository>+
    +<repository>+
    +<id>glassfish-repository</id>+
    +<name>Java.net Repository for Glassfish</name>+
    +<url>http://download.java.net/maven/glassfish</url>+
    +</repository>+
    +</repositories>+
    +</project>+
    Can anyonr contribute?

  • Cookie Problem  With JSP and Tomcat

    I have a tiny web application developed for my project thing.
    I am facing a problem while maintaining sessions with Cookie. I use Tomcat 3.2.1 Web Server and JSP 1.2 Specifications for my web application.
    I have created a page which creates a cookie and stores it in the client's PC, so when the same client visits the site, he can be remembered. Now while surfing the site in the same session, the site remembers the client. But once the client closes the browser and tries connecting to the site, he cannot be remembered. So I took a look into Temporary Internet Files of the client PC and found no cookie there. So where the cookie gets created and why does it disappears with the session. I have set a time limit of 1 year in the cookie.
    Now is that a Problem with Tomcat or with the configuration settings of IE in the client PC?? Or something else???
    Reply me Soon...

    Thanks for your reply.
    following is the code for how do i create a cookie...
    <%
         String custno = custBean.createPreferred();
         Cookie c = new Cookie("pc", custno);
         c.setVersion(1);
         c.setPath("/");
         c.setComment("PreferredCustomer");
         c.setDomain("think_machine");
    //think_machine is the name of the Web Server(Tomcat)
         c.setMaxAge(365*24*60*60);
         response.addCookie(c);
    %>
    And the code to read a cookie is..
         String custID = null;
         Cookie[] cookies = request.getCookies();
         for(int i = 0; i < cookies.length; i++)
              if(cookies.getName().equals("pc"))
                   custID = cookies[i].getValue();
                   break;
    One more thing I would like to let you know, that i access this from the same PC on which the Web Server is installed. Means the Server and the client are both one and the same PC.

  • Right problem with apache and tomcat

    Bonjour;
    I use a user login "apache" to stop/start Apache and tomcat. Because never launching apache et tomcat as root.
    But I have the following problem with apache (file error.log) :
    [Tue May  6 17:26:22 2003] [error] Connection "warpConnection" cannot connect
    [Tue May  6 17:26:22 2003] [error] Cannot open connection "warpConnection"
    [Tue May  6 17:27:01 2003] [error] Re-Trying to deploy connections
    As root the error msg does'nt exists (lost)
    Best regards;
    A+;

    Run it from the shell to see whats wrong:
    # httpd

  • Authentication problem with JWS and TOMCAT

    Hi everyone !
    I have a problem with Java Web Start (1.0.1) and Tomcat (4.0.4).
    I'm trying to call my application via Web server Tomcat with restricting access.
    My configuration is the following :
    The deployment descriptor web.xml is:
    <?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/dtd/web-app_2_3.dtd">
    <web-app>
    <mime-mapping>
    <extension>jar</extension>
    <mime-type>application/java-archive</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>java</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jnlp</extension>
    <mime-type>application/x-java-jnlp-file</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>JNLP</extension>
    <mime-type>application/x-java-jnlp-file</mime-type>
    </mime-mapping>
    <!-- Define a Security Constraint on this Application -->
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Entire Application</web-resource-name>
    <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <!-- NOTE: This role is not present in the default users file -->
    <role-name>standard</role-name>
    </auth-constraint>
    </security-constraint>
    <!-- Define the Login Configuration for this Application -->
    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>MY APPL</realm-name>
    </login-config>
    </web-app>
    And jnlp File is:
    <jnlp
    spec="1.0+"
    codebase="http://host:8080/Official/"
    href="Application.jnlp">
    <information>
    <title>Application release 0.10</title>
    <vendor> XXXX </vendor>
    <homepage href="/"/>
    <description>Application</description>
    <description kind="short">My Application</description>
    <icon href="Icon.gif"/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.3"/>
    <jar href="Jar1.jar"/>
    <jar href="Jar2.jar"/>
    <jar href="Jar3.jar"/>
    <jar href="Jar4.jar"/>
    <jar href="Jar5.jar"/>
    <jar href="Jar6.jar"/>
    <jar href="Jar7.jar"/>
    <jar href="Jar8.jar"/>
    <jar href="Jar9.jar"/>
    <jar href="Jar10.jar"/>
    <jar href="MyApplication.jar"/>
    </resources>
    <application-desc main-class="com.xxxx.tool.cm.MyApplication"/>
    </jnlp>
    With the above configuration the Java Web Start not work.
    I'm expecting the message box for insert username and password instead it returns the messagge error :
    An error occurred while launching/running the application.
    Vendor: XXXX
    Category: Download Error
    Unable to load resource: http://host:8080/Official/Application.jnlp
    The Exception error is:
    JNLPException[category: Download Error : Exception: java.lang.NullPointerException : LaunchDesc: null ]
         at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol.isLaunchFileUpdateAvailable(Unknown Source)
         at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source)
         at com.sun.javaws.Launcher.downloadResources(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I have tried to remove the restrict access in the deployment descriptor (web.xml) and java Web Start WORKS !!!!!!
    I'll appreciate any idea or hint!
    Thanks in advance

    Check this out
    http://forum.java.sun.com/thread.jsp?forum=38&thread=456250
    Mad Einstein

  • Problems with jdbc and .jar files.

    I am having a problem with connecting to my database when running my .jar file as an executable.
    It connects correctly when I use the java command in command prompt and it also runs correctly when using my IDE.
    Is there something that needs to be added to the manifest or in the code it self inorder for the program to find the JDBC driver correctly?

    This is the error message that I get:
    java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at AboutFrame2$Connect.getConnection(AboutFrame2.java:109)
    at AboutFrame2$Connect.displayDbProperties(AboutFrame2.java:127)
    at AboutFrame2.<init>(AboutFrame2.java:72)
    at MainStartFile2.main(MainStartFile2.java:7)
    Error Trace in getConnection() : net.sourceforge.jtds.jdbc.Driver
    Error: No active Connection
    I think that it is because it cannot find the driver. I am going to add the path to the manifest and see if that works thank you for all the help.

  • Simple setup problems with JSTL and Tomcat

    Hi all, I'm having some problems getting JSTL to work the 1st time. JSTL setup seems to be a common problem for relative newbies, but having read previous threads, I still haven't been able to solve my problem so hopefully someone can help:
    the jstl.jar and standard.jar are in my WEB-INF/lib directory, so I don't think it's a classpath problem.
    My jsp page has the following at the top:
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>Later, I reference a bean var with :
    <c:out value="My var is : ${var.property}"/>In my web.xml I have:
      <taglib>
       <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
       <taglib-location>/WEB-INF/lib/jstl.jar</taglib-location>
      </taglib>And I've placed the actual tld (c.tld) in the WEB-INF directory.
    On startup I get the error when compiling the JSP:
    No such tag out in the tag library imported with prefix c
    Can anyone help here?
    Thanks in advance,
    Mike

    I think this note from the JSTL mailing list by Shawn Bayern, one of the lead developers of Jakarta JSTL and the author of "JSTL In Action", will clarify it:
    http://www.mail-archive.com/[email protected]/msg04587.html
    Don't put that <taglib> in your web.xml. All the books tell you to do it, but Shawn Bayern has the right answer. The URI should be the one that's in the TLD JAR .tld files.
    I use JSTL and Tomcat 4.1.24 without the <taglib>, and it works fine. - MOD

  • Problem with JNI and Tomcat in windows

    Hello guys...
    I have the following problem.
    I used Tomcat 4 and I have following ApiEncriptacion class, in package com.servipag.sts;
    package com.servipag.sts;
    class ApiEncriptacion
         public native String encripta(String texto, String ubicacionLlavePublica, String semilla);
         static
              System.loadLibrary("apisdark");
         public native String desencripta(String texto, String ubicacionLlavePrivada);
         static
              System.loadLibrary("apisdark");
    the LD_LIBRARY_PATH is set in following dir c:\tomcat\bice
    the dll this in the following path = c:\tomcat\bice\apisdark.dll
    I run Tomcat at the following way..
    C:\jdk1.4\bin\java.exe -jar -Djava.library.path="c:\tomcat\bice" -Duser.dir="C:\Tomcat" "C:\Tomcat\bin\bootstrap.jar" start
    but, still appear the error:
    java.lang.UnsatisfiedLinkError: encripta
         at com.servipag.sts.ApiEncriptacion.encripta(Native Method)
         at com.servipag.sts.ServiciosServiPagImpl.rescatarFirma(ServiciosServiPagImpl.java:2143)
         at com.servipag.sts.ServiciosServiPagImpl.pagarCuenta(ServiciosServiPagImpl.java:310)
         at org.apache.jsp.SBCO_0005flogin_0005fbice_0005f4$jsp._jspService(SBCO_0005flogin_0005fbice_0005f4$jsp.java:265)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
         at java.lang.Thread.run(Thread.java:536)
    please help me
    Luis Navarro.
    Chile

    ApiEncripatcion.h
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class ApiEncriptacion */
    #ifndef IncludedApiEncriptacion
    #define IncludedApiEncriptacion
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class: ApiEncriptacion
    * Method: encripta
    * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    JNIEXPORT jstring JNICALL Java_ApiEncriptacion_encripta
    (JNIEnv *, jobject, jstring, jstring, jstring);
    * Class: ApiEncriptacion
    * Method: desencripta
    * Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    JNIEXPORT jstring JNICALL Java_ApiEncriptacion_desencripta
    (JNIEnv *, jobject, jstring, jstring);
    #ifdef __cplusplus
    #endif
    #endif
    ApiEncriptacion.c
    #include "jni.h"
    #include <stdio.h>
    #include "files.h"
    #include "hex.h"
    #include "rsa.h"
    #include "randpool.h"
    USING_NAMESPACE(CryptoPP)
    USING_NAMESPACE(std)
    void GenerateRSAKey(unsigned int keyLength, const char privFilename, const char pubFilename, const char *seed);
    char RSAEncryptString(const char pubFilename, const char seed, const char message);
    char RSADecryptString(const char privFilename, const char *ciphertext);
    JNIEXPORT jstring JNICALL
    Java_ApiEncriptacion_encripta(JNIEnv *env, jobject obj, jstring texto, jstring ubicacionLlavePublica, jstring semilla)
         try
              char *ciphertext = RSAEncryptString(ubicacionLlavePublica, semilla, texto);
              delete [] ciphertext;
              return(ciphertext);
         catch(CryptoPP::Exception &e)
              return ("");
         catch(std::exception &e)
              return ("");
         catch(...)
              return ("");
    JNIEXPORT jstring JNICALL
    Java_ApiEncriptacion_desencripta(JNIEnv *env, jobject obj, jstring texto, jstring ubicacionLlavePrivada)
         try
              char *decrypted = RSADecryptString(ubicacionLlavePrivada, texto);
              return(decrypted);
         catch(CryptoPP::Exception &e)
              return ("");
         catch(std::exception &e)
              return ("");
         catch(...)
              return ("");
    int main()
         return(0);     
    void GenerateRSAKey(unsigned int keyLength, const char privFilename, const char pubFilename, const char *seed)
         RandomPool randPool;
         randPool.Put((byte *)seed, strlen(seed));
         RSAES_OAEP_SHA_Decryptor priv(randPool, keyLength);
         HexEncoder privFile(new FileSink(privFilename));
         priv.DEREncode(privFile);
         privFile.MessageEnd();
         RSAES_OAEP_SHA_Encryptor pub(priv);
         HexEncoder pubFile(new FileSink(pubFilename));
         pub.DEREncode(pubFile);
         pubFile.MessageEnd();
    char RSAEncryptString(const char pubFilename, const char seed, const char message)
         FileSource pubFile(pubFilename, true, new HexDecoder);
         RSAES_OAEP_SHA_Encryptor pub(pubFile);
         if (strlen(message) > pub.MaxPlainTextLength())
              cerr << "message too long for this key\n";
              abort();
         RandomPool randPool;
         randPool.Put((byte *)seed, strlen(seed));
         char outstr = new char[2pub.CipherTextLength()+1];
         pub.Encrypt(randPool, (byte *)message, strlen(message), (byte *)outstr);
         HexEncoder hexEncoder;
         hexEncoder.Put((byte *)outstr, pub.CipherTextLength());
         hexEncoder.MessageEnd();
         hexEncoder.Get((byte *)outstr, 2*pub.CipherTextLength());
         outstr[2*pub.CipherTextLength()] = 0;
         return outstr;
    char RSADecryptString(const char privFilename, const char *ciphertext)
         FileSource privFile(privFilename, true, new HexDecoder);
         RSAES_OAEP_SHA_Decryptor priv(privFile);
         HexDecoder hexDecoder;
         hexDecoder.Put((byte *)ciphertext, strlen(ciphertext));
         hexDecoder.MessageEnd();
         SecByteBlock buf(priv.CipherTextLength());
         hexDecoder.Get(buf, priv.CipherTextLength());
         char *outstr = new char[priv.MaxPlainTextLength()+1];
         unsigned messageLength = priv.Decrypt(buf, (byte *)outstr);
         outstr[messageLength] = 0;
         return outstr;

  • Problem with JDBC and VARCHAR-Columns

    Hi,
    i have a problem handling VARCHAR-Columns via JDBC.
    I.e. by using the JDBC-components of <SunONE Community Edition Update 1> any attempt to store any other then numeric values (like "0", "01", "999" etc.) in a column of type VARCHAR results in an error.
    After entering the string "test" in a JTextArea or JTextField (which is linked by its document to the  VARCHAR-column) i will receive:
    "java.lang.NumberFormatException: For input string: "st"/For input string: "st". I also tried the javax.sql. rowSet methods like updateString() with the same result.
    Are there any knwon issues corresponding to this behaviour?
    <b>Configuration details:</b>
    <i>JDBC-Driver:</i>
    package com.sap.dbtech.jdbc, MaxDB JDBC Driver, MySQL MaxDB, 7.5.1 Build 000-000-002-750 on Java 1.4.2
    <i>Database-version:</i>
    7.5.00.16 on WindowsXP Pro SP1
    <i>JRE:</i>
    1.4.1_02
    The <i>trace-file</i> only show this statements:
    [email protected] (UPDATE NOTARZTEINSATZPROTOKOLL_1 SET NEUROLOGISCHER_ERSTBEFUND = ? WHERE NAP_ID = ? AND EP_ID = ? AND BEMERKUNG IS NULL AND SOZ_ID IS NULL AND PSYZ_ID IS NULL AND ERSTBEFUND_ZEITPUNKT IS NULL AND GCSAO_ID_EB IS NULL AND GCSBVR_ID_EB IS NULL AND GCSBMR_ID_ARMLINKS_EB IS NULL AND GCSBMR_ID_ARMRECHTS_EB IS NULL AND GCSBMR_ID_BEINLINKS_EB IS NULL AND GCSBMR_ID_BEINRECHTS_EB IS NULL AND BWSL_ID_EB IS NULL AND EXTB_ID_ARMLINKS_EB IS NULL AND EXTB_ID_ARMRECHTS_EB IS NULL AND EXTB_ID_BEINLINKS_EB IS NULL AND EXTB_ID_BEINRECHTS_EB IS NULL AND PUPW_ID_LINKS_EB IS NULL AND PUPW_ID_RECHTS_EB IS NULL AND EJN_ID_FEHLTLICHTR_LI_EB IS NULL AND EJN_ID_FEHLTLICHTR_RE_EB IS NULL AND EJN_ID_MENINGISMUS_EB IS NULL AND NEUROLOGISCHER_ERSTBEFUND IS NULL AND TEMPERATUR_EB IS NULL AND RR_SYSTOLISCH_EB IS NULL AND RR_DIASTOLISCH_EB IS NULL AND HERZFREQUENZ_EB IS NULL AND EJN_ID_HF_REGELM_EB IS NULL AND BLUTZUCKER_EB IS NULL AND ATEMFREQUENZ_EB IS NULL AND SPO2_EB IS NULL AND CO2_EB IS NULL AND SCHM_ID_EB IS NULL AND ERH_ID_COR_EB IS NULL AND EELS_ID_COR_EB IS NULL AND EJN_ID_EKG_EMENTKOPPEL_EB IS NULL AND EERBST_ID_COR_EB IS NULL AND EHA_ID_COR_EB IS NULL AND ESVES_ID_COR_EB IS NULL AND EVES_ID_COR_EB IS NULL AND EKG_BEMERKUNG_EB IS NULL AND ATRH_ID_EB IS NULL AND EJN_ID_ZYANOSE_EB IS NULL AND EJN_ID_SPASTIK_EB IS NULL AND EJN_ID_RASSELGER_EB IS NULL AND EJN_ID_STRIDOR_EB IS NULL AND EJN_ID_VERLEGATEMW_EB IS NULL AND BEAM_ID_UEBERNAHME IS NULL AND ATMUNG_FREITEXT_EB IS NULL AND VERLM_ID IS NULL AND SCHWV_ID_SCHAEDELHIRN IS NULL AND SCHWV_ID_GESICHT IS NULL AND SCHWV_ID_HWS IS NULL AND SCHWV_ID_THORAX IS NULL AND SCHWV_ID_ABDOMEN IS NULL AND SCHWV_ID_BWSLWS IS NULL AND SCHWV_ID_BECKEN IS NULL AND SCHWV_ID_OEXTREMITAET IS NULL AND SCHWV_ID_UEXTREMITAET IS NULL AND SCHWV_ID_WEICHTEILE IS NULL AND VBRT_ID IS NULL AND TRT_ID IS NULL AND UHG_ID IS NULL AND SICHTK_ID IS NULL AND UNFALLZEITPUNKT IS NULL AND SAPS_2 IS NULL AND TISS_28 IS NULL AND NACA_ID IS NULL AND ZBV IS NULL )
    => com.sap.dbtech.jdbc.CallableStatementSapDB@11daf60
    <at this position the trace-file ends?!; "NEUROLOGISCHER_ERSTBEFUND ist defined as
    "NEUROLOGISCHER_ERSTBEFUND" Varchar (1000) ASCII; i also encountered this problem while handling shorter VARCHAR-columns with JComboBox-components...>
    Any information would be very helpfully!!!
    Greetings,
    Arnd
    Message was edited by: Arnd Benninghoff
    Message was edited by: Arnd Benninghoff

    Hi Arnd,
    if I understand right you are trying to insert/update value into a Varchar(1000) column. And if you set a non numeric value you get an exception "java.lang.NumberFormatException", Right?
    Of course this should work with MaxDB. The exception you get doesn't come from MaxDB's JDBC driver. The driver will only throw exceptions that are derived from java.sql.Exception.
    So, I guess the error comes from a layer above the JDBC layer, possibly from the JDBC-components of <SunONE Community Edition Update 1>. This would also explain why you don't see any exception in the JDBC trace.
    Did you have defined any constraints for the input field (JTextArea or JTextField)?
    Hope that helps.
    regards,
    Marco

  • $200 reward to solve problem with JDBC and CLOB.getCharacterOutputStream

    I'm trying to update CLOB with the getCharacterOutputStream as suggested in the example code. It works with US7ASCII DB instance but not instances in UTF8.
    I've been browsing through all the Oracle doc's and found some rather confusing statements:
    In the page at http://oradoc.photo.net/ora816/java.816/a81354/oralob2.htm#1043220
    it says: [When writing to or reading from a CLOB, the JDBC drivers perform all character set conversions for you.]
    also: [The oracle.sql.CLOB class supports all the character sets that the Oracle data server supports for CLOB types.]
    So far so good.
    In the page at http://oradoc.photo.net/ora816/java.816/a81354/oraint3.htm#1012518
    it says [The oracle.sql package supports these datatypes in several ways: CLOBs point to large fixed-width character data items (that is, characters that require a fixed number of bytes per character) and are supported by the oracle.sql.CLOB class.]
    Ooh no! Is this for real? UTF8 is variable width and does this mean it is not supported?
    Any way to get around this?
    In the page at http://oradoc.photo.net/ora816/java.816/a81358/03_pub2.htm#36009
    says [6.The mappings to oracle.sql classes are optimal because they preserve data formats and require no character-set conversions (apart from the usual network conversions). Those classes are especially useful in applications that "shovel" data between SQL and Java.]
    "No character set conversion"? Very confusing!
    I've been hammering on this CLOB/JDBC/UTF8 problem for more than a week now and I really appreciate some solutions, workarounds, or whatever help I can get. I'm running java stored procedure in 8.1.6 on Linux RH6.2.
    For your trouble, I'd pay $200 for the first guy who come up with a verifiable solution.

    This is just findings based upon your comments:
    Please refer to document Oracle8i National Language Support Guide
    Release 2 (8.1.6) from Oracle Documentation Library, Release 8.1.7
    Chapter 6 Java,
    There its clearly mention that:
    "Oracle JDBC drivers provide globalization support by allowing users to retrieve data from or insert data into a database in any character set that Oracle supports. Because Java strings are UCS2 encoded (16-bit Unicode) for JDBC programs, the target character set on the client is always UCS2. Character set conversion is required to convert data from the database character set (Db Charset) to UCS2. This applies to CHAR, LONG, CLOB, and VARCHAR2 data types; RAW data is not converted. "
    Also..please refer this...
    "oracle.sql.CLOB's method getCharacterStream() returns the contents of a CLOB as a Unicode stream."
    "The techniques that Oracle's drivers use to perform character set conversion for Java applications depend on the character set the database uses. The simplest case is where the database uses a US7ASCII or WE8ISO8859P1 character set. In this case, the driver converts the data directly from the database character set to UCS2,which is used in Java applications. "
    "If you are working with databases that employ a non-US7ASCII or non-WE8ISO8859P1 character set (for example, Japanese or Korean), then the driver converts the data, first to UTF8, then to UCS2. "
    In my case the characte-set of the database is WE8ISO8859P1 and for security reason i can't change the character set but my feeling is that if you are updating the CLob from the java client you are forming a reference of a clob in the client which is UCS2 at the Java side. Now when you are populating the clob through java.io.Writer and call the procedure to pass the reference of the clob to the procedure then I believe the JDBC will convert the UCS2 datatype of Clob to UTF8 in the database.
    You can try out the code snippet:
    package ServletGDC;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import oracle.sql.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import ClassesGDC.*;
    public class testUpload extends HttpServlet {
    private String m_strMessage="";//It stores the message to be uploaded along with the Document
    Connection conn=null;
    public void doPost(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException {
    String strContent="";
    //res.setContentType("application/msword");
    res.setContentType("text/html");
    PrintWriter out = res.getWriter();
    try {
    CallableStatement cmt=null;
    OutputStream output=null;
    ByteArrayOutputStream byteoutput=null;
    String strDocString="";
    oracle.sql.CLOB tempClob = null;
    String strPassedFileName="";     // the file name passed in the request object
    String strStdFilename="";//the file name to be given to the best practice
    String strSaveDirectory="";     //the directory in which the bp is to be saved
    String strParamName="";//name of parameters
    String strParamValue="";//value of parameters
    int intTempVariable=0; // temporaty variable
    long lngSizeOfFileUploaded=0;//stores the size of the file which had been uploaded in the file system
    File filePathOfFileUploaded=null;//stores the path of the file uploaded to the file system
    String strQuery="";
    //ST------------checks if the user has logged in or not-----------------------
    HttpSession session=req.getSession(true);
    if(req.getContentLength()>20*1024*1024)
    throw new skip("The size of the posted content is more than 10 MB . If you have a best practice whose size is more than 1 MB please mail it to Us.");
    byteoutput = new ByteArrayOutputStream();
    MultipartParser mp = new MultipartParser(req, 20*1024*1024); // 10MB is the limit of the file to be uploaded
    Part part;//Its an abstact part which helps in retrieving information about the file and the parameters
    while ((part = mp.readNextPart()) != null) {//Reads the next part
    strParamName = part.getName();
    // the following if is executed if the part is for a parameter rather than a file
    if (part.isParam()) {
    }else if (part.isFile()) {
    // it's a file part
    m_strMessage="inside file part";
    FilePart filePart = (FilePart) part;
    strPassedFileName = filePart.getFileName();
    strContent= filePart.getContentType();
    out.println("<BR><font color=red>strPassedFileName is "+strPassedFileName+"</font>");
    if(strPassedFileName != null || !(strPassedFileName.trim().equals("")) ) {
    // the part actually contained a file
    out.println("<BR><font color=red> before forming long</font>");
    //lngSizeOfFileUploaded = filePart.writeTo(filePathOfFileUploaded);      //the statement upload the bestpractice in the
    lngSizeOfFileUploaded = filePart.writeTo(byteoutput);     //specified file path filePathOfFileUploaded.
    out.println("<BR><font color=red> after file is written into the outputstream</font>");
    else {
    throw new skip("The file name is null or it is empty space. Files in such Format are not accepted");
    }//end of else if
    }//end of while loop
    if(     lngSizeOfFileUploaded==0)     {// the size of the file uploaded is zero then the file supplied was not proper and hence exception is to be thrown
    //if(filePathOfFileUploaded.exists())
    //     filePathOfFileUploaded.delete();
    throw new skip("The File could not be uploaded,Possible reasons may be that the file is sent null or the file is corrupted");
    //END---------------the file is uploaded in the proper directory--------------------
    //res.setContentType(strContent);
    out.println("<BR><font color=red>long value is : "+lngSizeOfFileUploaded+" and content is "+strContent+"</font>");
    String strbyte= byteoutput.toString();
    byteoutput.flush();
    Class.forName("oracle.jdbc.driver.OracleDriver");
    // Establish network connection to database
    conn = DriverManager.getConnection("jdbc:oracle:thin:@pc-p32670:1521:GDCDBI","gdc_user","myuser");
    //if(conn!=null)
    out.println("<BR><font color=red>Connection formed"+conn);
    //els
    //out.println("<BR><font color=red>long value is : "+strbyte+"</font>");
    try{
    tempClob = oracle.sql.CLOB.createTemporary(conn,true, oracle.sql.CLOB.DURATION_SESSION);
    out.println("<BR><font color=red>tempClob : "+tempClob);
    tempClob.open( oracle.sql.CLOB.MODE_READWRITE);
    java.io.Writer tempClobWriter = tempClob.getCharacterOutputStream();
    // writing the string formed from the multipart file to the clob
    tempClobWriter.write(strbyte);
    if(tempClob!=null){}
    out.println("<BR><font color=red>CLOB value is : "+tempClob+"</font>");
    strQuery="{call INSERT_CLOB(?,?)}";
    cmt=conn.prepareCall(strQuery);
    cmt.setString(1,strPassedFileName);
    cmt.setClob(2,tempClob);
    cmt.registerOutParameter(2,java.sql.Types.CLOB);
    cmt.execute();
    tempClobWriter.flush();
    tempClobWriter.close();
    tempClob.freeTemporary();
    //res.setContentType(strContent);
    //strDocString.toString();
    out.println("<BR><font color=red>bob is "+strbyte+"</font>");
    tempClob.close();
    }catch(Exception e){
    tempClob.close();
    out.println("<font color=blue> Error is :"+e.getMessage()+"</font>");
    //e.printStackTrace(out);
    cmt.close();
    //out.println("<BR><font color=red><h2><b>SUCCESS</h2></font>");
    //res.sendRedirect("../test/showfile.jsp?contentype="+strContent.trim()+"");
    }catch(Exception e){
    java.util.Date d = new java.util.Date();
    String s =d.toString();
    out.println("<font color=blue> Error is :"+e.getMessage()+"</font>");
    //e.printStackTrace(out);
    }finally{
    try{
    if(conn!=null)
    conn.close();
    }catch(Exception e){
    out.println("<font color=blue> Error is :"+e.getMessage()+"</font>");
    }// end of finally
    } //end of doPost
    } //end of class
    in the Procedure you will be inserting/updating the clob in a table with the reference clob in the out parameter of the procedure
    Thanks.

  • Connection Problem with Oracle and Tomcat.

    I was able to enter Oracle using scott/tiger when I did not connect Tomcat.But when I connect tomcat I am unable to log onto Oracle.
    When I logged to the database then I tried to start the Tomcat but it gave an exception.So I went to the task manager and ended the running processes like isqlplus.exe, oracle.exe, tomcat.exe, apache.exe.When I ended all the processes except oracle.exe, tomcat gave an exception. But when I ended oracle.exe Tomcat started working but Oracle stopped working. I don't know what the problem is.
    Can anyone help me out?
    Thanks,
    Sravanthi.

    > Can anyone help me out?
    Yeah sure. Is there a SQL or PL/SQL related question in there.. somewhere.. hiding away?
    After all, you do realise that the name of this forum is SQL and PL/SQL and that it deals with the SQL and PL/SQL languages in the Oracle server.. right?

  • Problem with jsp and tomcat

    Hi ,
    I am trying to retrieve data from mysql server using Tomcat webserver of java web services developers pack. i wrote an html page that sends the account_no and password of my program to a JSP page which retrieve data from MySQL server to check whether the account no and password is valid or not . but when i start tomcat and run the html page and submit the onformation the Tomcat gives an error. i am attaching my full programs here. please someone help me.
    mybank.html:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> My Bank </TITLE>
    </HEAD>
    <BODY>
    <h1>Please Enter Your Account Number and Password</h1>
    <form action="mybank.jsp" method="post">
    <h2>Account Number:</h2>
    <input type="text" name="accno" maxlength="10" size="10"></br>
    <h2>Password:</h2>
    <input type="text" name="pass" maxlength="8" size="8"></br>
    <input type="submit" value="SUBMIT YOUR INFO">
    </form>
    </body>
    </html>
    mybank.jsp:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <%@ page import="java.sql.*" %>
    <HTML>
    <HEAD>
    <TITLE> My Bank JSP </TITLE>
    </HEAD>
    <BODY>
    <% int acc_no = request.getParameter("accno");
    String password=request.getParameter("pass");
    class.forName(com.mysql.jdbc.Driver);
    Connection con= DriveManager.getConnection("jdbc:mysql:///password","root", "firehouse" );
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT account_no, password FROM pass WHERE password ='password' && account_no='acc_no' ");
    while(rs.next())
    int account=rs.getInt(1);
              String passw=rs.getString(2);
    if(rs!=null)
    rs.close();
    if(stmt!=null)
    stmt.close();
    if(con!=null)
    con.close();
    %>
    <h2>Accountno:<%= account %></h2>
    <h2>Password:<%= passw %></h2>
    </BODY>
    </HTML>
    i am getting this error:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    No Java compiler was found to compile the generated source for the JSP.
    This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK
    to the common/lib directory of the Tomcat server, followed by a Tomcat restart.
    If using an alternate Java compiler, please check its installation and access path.
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:128)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:348)
    org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:455)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    but i already set up the java compiler though i m getting this error. please help me.

    You say you have set up the environment variables, but it is not working. You may have them set to the wrong thing. One common mistake is to point JAVA_HOME at the java/bin directory rather than just the /java directory.
    Another set of eyes finds small mistakes in the variables that you might not spot yourself.
    So please, post:
    The values of these environment variables
    The path to where the products are installed on your system (ie is it c:\java or c:\j2se1_4_2 or c:\program files?
    I would take another close look at that JAVA_HOME variable to make sure of it :-)
    Good luck,
    evnafets

  • Problem with ssl and tomcat

    Hi to all, I'm trying to do ssl in a intranet. I have tomcat 4.1 and JDK 4.1_02. I have following all steps thats indicate the tomcat ssl documentation, I have copied the jcert.jar jnet.jar and jsse.jar to the directorie jre\lib\ext I have generated the keystore and verisign have sent me the keys. I have modified the server.xml where I have put the new port and the factory tag but I cannot see a page through https.
    I have port 8080 that redirects to 8443, which have the scheme=https.
    if I put http:\\localhost:8080 appear the tomcat home page.
    if I put https:\\localhost:8443 not appear nothing.
    if I put http:\\localhost:8443 not appear error but don't show nothing.
    I have seen the log of tomcat and appear an exception:
    org.apache.commons.digester.Digester error
    Parse Error al line 89 column 11: the content element type "web-app" must match (icon?,display-name?....
    this exception don't appear previously,it seems that is a problem of xerces.
    Any idea or help it is welcome.
    THANKS.

    Obviously you have a syntax error in your one of your .xml files. Most likely in either the global web.xml or the application specific one.

  • Again problem with servlet and Tomcat

    My files are:
    webapps\greeting\src\GreetingServlet.java
    ................\index.html
    ................\WEB-INF\classes\GreetingServlet.class
    ........................\web.xml
    Url:http//:localhost:8080/greeting/ shows index.html but when i submit
    it showing
    HTTP Status 404 - /greeting/servlet/GreetingServlet
    type: Status report
    message: /greeting/servlet/GreetingServlet
    description: The requested resource (/greeting/servlet/GreetingServlet) is not available.
    Source code:
    1.index.html:
    <HTML>
         <HEAD>
              <TITLE>ProJava Registration</TITLE>
         </HEAD>
         <BODY>
              <H1>Welcome</H1>
              <FORM ACTION ="/greeting/servlet/GreetingServlet" METHOD= "POST">
                   <p>Your Name <INPUT TYPE= "text" SIZE= "40" NAME= "name" ></p>
                   <p>Your Email <INPUT TYPE= "text" SIZE= "40" NAME="email">
                   <INPUT TYPE= "submit" VALUE= "Submit" ></p>
              </FORM>
         </BODY>
    </HTML>
    2.GreetingServlet.java:
    import javax.servlet.* ;
    import javax.servlet.http.* ;
    import java.io.* ;
    import java.util.* ;
    public class GreetingServlet extends HttpServlet{
    protected void doPost (HttpServletRequest request,
                   HttpServletResponse response)
                        throws ServletException, IOException {
         String name = request.getParameter ("name");
         String email = request.getParameter ("email");
         String message = null;
         GregorianCalendar calendar = new GregorianCalendar();
         if (calendar.get(Calendar.AM_PM) == Calendar.AM) {
              message =" Good Morning";
         else {
              message = " Good Afternoon";
         response.setContentType("text/html");
         PrintWriter out = response.getWriter();
         out .println("<HTML>");
         out .println("<BODY>");
         out .println("<p>"+message +","+name+"</p>");
         out .println("<p> Thanks ("+email+")</p>");
         out .println("<p> -The Pro Java Team.</p>");
         out .println("</BODY>");
         out .println("</HTML>");
         out .close();
    Please help me
    Thanks in advance Also thanks to st.

    Hi,
    I think you have to change server.xml, which is in conf directory of your tomcat root directory.
    search context in server.xml
    and alter like this
    <Context path="/greetings" docBase="greetings" debug="0"
    reloadable="true" crossContext="true">
    Hope this will help
    Regards
    Sekhar

Maybe you are looking for

  • Oracle v7 and Oracle 9i Release 2

    Hi, Does anyone know a way to allow both database to communicate with each other? Assuming that both of time are residing in a separate machine and Oracle v7 is hosted in HP-UX and Oracle 9i is hosted in Windows 2003. thanks.

  • How to read embeded Timecodes

    Hello, i'm not sure if i should post this here or in the ActionScript 3.0 subforum but i hope it's alright we're enconding a livestream from a webcam with FMLE 3.0. for our project we need to embed the system time as a timecode into the stream (no de

  • What is an MDD worth these days?

    I'm considering an upgrade, but don't know if it's worth trying to sell my MDD 1.25. I took a quick look on ebay and I see one posted for 450 in a buy it now. Anyone sell or buy one recently? I think I'd be packaging it with the MOTU 2408 audio recor

  • Downloaded photoshop elements 12 it is giving me the option to open with... what do i do

    I HAVE HAD LOTS OF PROBLEMS. I HAVE BEEN TRYING TO DOWNLOAD PHOTOSHOP ELEMENTS 12 BACK ON TO MY LAPTOP AS IT WAS BROKEN AND NOW HAS BEEN FIXED. WHILE DOING THIS THE FIRST 2 TIMES I HAD A MESSAGE APEAR AT TEH END OF TEH DOWNLOADING SAYING ADOBE READER

  • How to discover java 1.1.4 incompatible code

    Hi all! I tried to make an applet java 1.1.4 compatible (for M$ VM) but I get a NoSuchMethodError exceptions. I thought that pass -target 1.1 parameter to compiler I solved de problem, but not. How can I discover the java 1.1.4 code incompatible? tha