Getting Server screenshot ... Apache Tomcat

Hi, I am using this JSP code to get Sreenshot of the server from client browser.
It works perfectly when I start the Apache tomcat using "C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.16\bin\startup.bat"
The problem is dat it WONT work wen I start tomcat as a service!!!
I am using Apache tomcat 6.0 on Windows XP SP2
please note that it works with weblogic10.0 server in developer mode
<%@ page import="java.awt.*,java.awt.image.*,java.io.*,javax.imageio.*" %><%
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension screenSize = toolkit.getScreenSize();
Rectangle screenRect = new Rectangle(screenSize);
Robot robot = new Robot();
BufferedImage image = robot.createScreenCapture(screenRect);
response.setContentType("image/png");
OutputStream os = response.getOutputStream();
ImageIO.write(image, "png", os);
os.close();
%>

When Tomcat gets run as a service, it is most probably running in the "Local System account"
When you run it from your desktop, it is in your current user account - and can take a screenshot of the Desktop which is present.
Something I guess you can try
Edit the properties of that Windows Service (right click the service in the services control panel and select "properties"
Select the "log on" tab.
Try the checkbox "Allow Service to interact with Desktop". I'm not exactly sure what that does, but its worth a try :-)
Try specifying an account for the service to log in as - maybe that will make a difference.
There is no guaruntee that this will work! I haven't done this myself, and just forwarding some ideas to try.
I am by no means an expert on Windows services, and I could be completely wrong, however it IS worth at try right?
Good luck,
evnafets

Similar Messages

  • How to integrate Apache Web Server and Apache Tomcat 4.0 ?

    <pre>
    Hi All,
    Can anyone give me a detailed description(or url that tells so) of how to install the Apache Web Server, Apache Tomcat Server4.0 and Integrate both of them.
    Still now I am using Apache Tomcat 4.0 as a standalone application and now I want to learn how to install,use Apache Web Server and integrate this with Apache Tomcat.
    Please point me to exact location,url to download the recent Apache Web Server and,
    Can I use my existing Standalone Apache Tomcat 4.0 to integrate this with Apache Web Server that I am going to download.
    A detailed explanation of how to integrate both is very helpful.
    Thanks in advance.
    <pre>

    The way to integrate Apache Web Server & Apache is very easy. The first step is download the library to connect both servers. This library can be download from http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0/bin/webapp-module-1.0-tc40-windows.zip.
    Copy the files to APACHE_HOME\modules and open httpd.conf to change any lines:
    You find the section "LoadModule" and you add the next lines:
    LoadModule webapp_module modules/mod_webapp.so
    AddModule mod_webapp.c
    And the end of the file you must add these lines:
    WebAppConnection conexion warp localhost:8008
    WebAppDeploy examples conexion /examples
    The first parameter -2nd line- (examples) is the URL name application, the second is the connection's name and the last parameter is the application's name. This name is the same which in servlet.xml.
    At last you can add one more lines to check the module's configuration:
    WebAppInfo /webapp-info
    If you visit http://<yoor_host>/webapp-info you can see the configuration.

  • Print Server with Apache Tomcat 6.0 and Cocoon 2 Problem...

    Hi,
    My company have 2 server, (9i - APEX_3.1.2.00.02) and (10g - APEX_3.1.0.00.32), both in Http server running in OEL 4.0.
    I tried the following cocoon installation in other window server,
    http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html
    and I set both APEX Instants Setting, the report printing setting according to the installation above.
    The 10g apex run perfectly, however the 9i apex cannot print pdf report. the following is the error message show when i click on the export pdf button.
    The webpage at http://server9i:7777/pls/apex_camnet/f?p=105:1:3689040380318743457:PDF: might be temporarily down or it may have moved permanently to a new web address. Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error.
    Before i add the print server to (9i), the pdf can be export, however no content inside the pdf, some corrupted detected, but when I added the report printing setting, the message above shown.
    Is this because of the version of database? or the version or APEX? or other matter i did not aware?
    Pls Help.
    ~ vincent
    Edited by: kiddoo_81 on Dec 23, 2010 2:08 PM

    Hi,
    Anybody? any suggestion?
    Thank you.
    ~vincent

  • Problem accessing exception object in jsp error page - Apache Tomcat 5.0.25

    Hi all,
    I'm thoroughly confused and need some help. I've deployed a very simple web application in Apache Tomcat 5.0.25 to test exception handling - errortest.jsp and error.jsp. errortest.jsp throws a divide by zero exception if executed with default values in text fields.
    When I put the directive IsErrorPage="true" in error.jsp i get a HTTP 500 error when error.jsp is accessed. If I remove it error.jsp is displayed but I cant access the exception object - if I try to I get an exception below:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 5 in the jsp file: /error.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    E:\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\mywebapp\org\apache\jsp\error_jsp.java:46: cannot resolve symbol
    symbol : variable exception
    location: class org.apache.jsp.error_jsp
    out.print(exception.getMessage());
    ^
    1 error
    Below is the code for the two jsp pages:
    errortest.jsp:
    <%@ page errorPage="error.jsp" %>
    <html>
    <head><title>Error test</title></head>
    <body>     
         <form action="errortest.jsp" method="post">
         Enter first number:<input type="text" name="first" value="5"/><br>
         Enter second number:<input type="text" name="second" value="0"/><br>
         <input type="submit"/>
         </form>
         <%
         if (request.getMethod().equals("POST")) {
              int first = Integer.parseInt( request.getParameter( "first" ) );
              int second = Integer.parseInt( request.getParameter( "second" ) );
              int answer = first/second;
         %>
    </body>
    </html>
    NB: I am able to catch and display the exception if I use a try/catch block around the division as shown below.
    try {
    int answer = first/second;
    } catch( Exception e) {
    e.printStackTrace( new PrintWriter(out) );
    error.jsp (first draft)
    NB: HTTP 500 error occurs when directive "isErrorPage" is added:
    <%@ page isErrorPage="true" %>
    <html>
    <head><title>Error Page</title></head>
    <body>
    </body>
    </html>
    error.jsp (second draft)
    NB: directive is removed but exception thrown when implicit exception object is accessed. error.jsp displays if exception object is not accessed:
    <%@ page %>
    <html>
    <head><title>Error Page</title></head>
    <body>
    <%=exception.getMessage()%>
    </body>
    </html>
    Web server specs:
    Apache Tomcat 5.0.25
    Machine specs:
    Windows XP Pro
    Java environments:
    j2sdk1.4.2_03
    J2EE 1.4

    This works for me:
    throwError.jsp
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <%@ page language="java" errorPage="/error.jsp"
    contentType="text/html; charset=utf-8" %>
    <html>
    <head>
         <title>Throw Exception</title>
    </head>
    <body>
    Throwing exception....
    <%
    // throw ArithmeticException
    int badInt = 12/0;
    %>
    </body>
    </html>
    error.jsp
    <%@ page language="java" isErrorPage="true" %>
    <head><title>Doh!</title></head>
    An Error has occurred in this application.
    <% if (exception != null) { %>
    <pre><% exception.printStackTrace(new java.io.PrintWriter(out)); %></pre>
    <% } else { %>
    Please check your log files for further information.
    <% } %>

  • Securite apache/tomcat

    Hi!
    I have a application written in jsp/servlets. I has some static resourses that tomcat protects when running it as standalone. But when I deploy this web-app on a server with apache/tomcat apache serves those static files that I would like to be protected.
    How can I tell apache to use tomcats security constraints and knowing when a user has logged in and not?
    Thanks in advance
    Roland Carlsson

    I just read an article about securing tomcat that is riding behind apache. Free chapter from oreilly at:
    http://www.oreilly.com/catalog/tomcat/chapter/ch06.pdf
    the pdf does a decent job of showing how to REALLY secure tomcat. the above post also shows how to do it... apache doesn't know anything about tomcat's security, nor does it know about resources that the webapp spec say are protected by the container. SO, you have to explicitly tell apache not to serve from those directories. alternatively, not having apache have access to the tomcat install location is not a bad idea either, and you then ONLY hand *.jsp requests to tomcat through the connector. then, as long as your jsps aren't in WEB-INF (which is actually used as a security protection if you set things up right for heavy included systems), apache can't get to WEB-INF.
    dukes?

  • Apache Tomcat/5.5.25 Error

    Hi While, trying to open web site from safari, google chrome or firefox I am getting the error " Apache Tomcat/5.5.25 Error "
    HTTP Status 404 - /ssssportal.war/fup_4m-8g-512k.jsp
    type Status report
    message /ssssportal.war/fup_4m-8g-512k.jsp
    description The requested resource (/ssssportal.war/fup_4m-8g-512k.jsp) is not available.
    Apache Tomcat/5.5.25
    Can you please help me to solve this ?
    Thanks,

    Hi ..
    It's the OS X, not just your browsers.
    If your Mac is running v10.6.8 as your profile suggests, you will have problems opening websites.
    You need to upgrade to a newer OS X. Apple no longer provides security updates for v10.6.8.
    See if your Mac can run Yosemite v10.10 >  Apple - OS X Yosemite - How to Upgrade

  • GPL Licence, Apache Tomcat and J2EE5

    Hello !
    I'd like to know if it is possible for a company to sell a server with apache tomcat and J2EE 5 ?
    Does this company have to pay fees to Sun ?

    Hi,
    I have same problem with B1 9.1, Version for Hana, but I cannot apply the workaround of San Xu on linux server.
    I try a clean installation of 9.1 servertools on linux server, but on windows server, when I run the Upgrade.exe for the databases, the error appears: "Could not connect to licence server; enter valid password".
    I've the italian localization.
    Can someone help me?
    Thanks & Regards
    Valerio

  • Apache Tomcat/4.0.4 - HTTP Status 500 - Internal Server Error - I get this when I try to enter a record into one of our Access databases, what do I need to do to fix it, I don't know what it means

    Apache Tomcat/4.0.4 - HTTP Status 500 - Internal Server Error - I don't know what this means or how to fix it, I get it when I try to enter a ticket into one of our custom data bases in Access

    Apache Tomcat/4.0.4 - HTTP Status 500 - Internal Server Error - I don't know what this means or how to fix it, I get it when I try to enter a ticket into one of our custom data bases in Access

  • How to protect an application running on Apache Tomcat app server with OAM 11gR2

    Gurus,
    We have an Apache Tomcat based application named "ABCD" here at client site that we want OAM 11gR2 PS1 to integrate with for SSO purposes. I have successfully configured OHS to reverse proxy requests to Apache Tomcat server whenever somebody tries to access the application URL but still, I am getting the application login page once I have successfully authenticated on OAM SSO login page. The Tomcat based application is authenticating users against a "UserDatabase realm".
    I know in terms of weblogic application, there is an OAM identity asserter provider which then populates the User Principal for the java environment with the authenticated OAM user. But there is no such OAM identity provider for Tomcat.
    So my question is, is there an provider (or Tomcat equivalent) which will entrust authentication to a header, that could be used to populate the Java User Principal from the OAM_REMOTE_USER header? Is the weblogic equivalent of authentication providers present in tomcat as well? Are those called valves?
    Please advise to the earliest.
    Thanks !!

    Aakash,
    I did follow the 4 steps that you mentioned to me. Out of the 4 that you had mentioned, I already had the webgate in place on OHS server and I was already passing the remote_user http header in oam policy as action.
    As part of Step #2: Install mod_jk plugin on OHS server that you mentioned
    1.) I downloaded the tomcat connector - tomcat-connectors-1.2.37-src
    2.) I had to run ./configure,make, make install on my OHS server which runs on RHEL 6. It created the mod_jk.so file. I pasted it in the needed folder.
    3.) I then created the httpd.conf file and workers.properties file as said in the connector docs.
    4.) Restarted OHS.
    As part of Step #3: Configure tomcat's ajp connector that you mentioned and I went through all the links pasted below but didn't find actually what needs to be in place to configure tomcat's ajp connector. I do see in the server.xml of tomcat app server that the ajp 1.3 protocol is supported:
    http://tomcat.apache.org/tomcat-4.0-doc/config/ajp.html
    http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html#s8
    http://tomcat.apache.org/tomcat-7.0-doc/config/ajp.html
    http://www.mulesoft.com/understanding-tomcat-connectors
    <!-- A "Connector" represents an endpoint by which requests are received
             and responses are returned. Documentation at :
             Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
             Java AJP  Connector: /docs/config/ajp.html
             APR (HTTP/AJP) Connector: /docs/apr.html
             Define a non-SSL HTTP/1.1 Connector on port 8080
        -->
        <Connector port="8080" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443" />
    <!-- Define an AJP 1.3 Connector on port 8009 -->
        <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
    Do we need to disable the HTTP protocol in Tomcat and keep only AJP connector enabled? If yes, how to do that?
    I am trying to connect to the application from OHS server like so I am using the http protocal right? How should I use the ajp protocol to connect to tomcat application? 
    http://ohs-host:ohs-port/abcd
    Thanks !!!!!

  • Getting error message in tomcat server

    Have a look at the following programs:
    AuthenticationFilter_
    import javax.servlet.*;
    import java.io.*;
    import java.sql.*;
    public class AuthenticationFilter implements Filter
         ServletContext sc;
         Connection con;
    public void init(FilterConfig f) throws ServletException
    System.out.println(f.getFilterName() + "Filter Initialized");
    String d = f.getInitParameter("driver");
    String url = f.getInitParameter("url");
    String user = f.getInitParameter("user");
    String pwd = f.getInitParameter("password");
    try
         Class.forName(d);
         con = DriverManager.getConnection(url,user,pwd);
         System.out.println("Connection Established");
    catch (Exception e)
         e.printStackTrace();
    sc = f.getServletContext();
    public void doFilter(ServletRequest request,ServletResponse response,FilterChain chain)throws ServletException,IOException
    Statement st = null;
    ResultSet rs = null;
    String user = request.getParameter("user");
    String pwd = request.getParameter("password");
    try
         st = con.createStatement();
         String sql = "SELECT * FROM OURUSERS WHERE usr = " + user + " and password = " + pwd + " ";
         rs = st.executeQuery(sql);
         if(rs.next())
              chain.doFilter(request,response);
         else
              sc.getRequestDispatcher("/error.html").forward(request,response);
    catch (Exception e)
         e.printStackTrace();
    finally
    try
         if(rs!=null)
              rs.close();
         if(st!=null)
              st.close();
    catch (Exception e)
         e.printStackTrace();
    }//doFilter()
    public void destroy()
    try
         if(con!=null)
              con.close();
    catch (Exception e)
         e.printStackTrace();
    *2)_HitCounterFilter__
    import javax.servlet.*;
    import java.io.*;
    public class HitCounterFilter implements Filter
         ServletContext sc;
         int count;
    public void init(FilterConfig f)throws ServletException
    System.out.println(f.getFilterName() + "Filter Initialized");
    sc = f.getServletContext();
    public void doFilter(ServletRequest request,ServletResponse response,FilterChain chain)throws ServletException,IOException
    chain.doFilter(request,response);
    count++;
    sc.log("Number of times request came to LoginServlet is " + count);
    public void destroy()
    *3) LoginServlet*
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class LoginServlet extends HttpServlet
         public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException
    response.setContentType("text/html");
    PrintWriter pw = response.getWriter();
    pw.println("<HTML> <BODY BGCOLOR=yellow>");
    pw.println("<H1> WELCOME TO OUR WEBSITE</H1>");
    pw.println("</BODY>");
    pw.println("</HTML>");
    pw.close();
    web.xml
    <web-app>
    <filter>
    <filter-name>authenticate</filter-name>
    <filter-class>AuthenticationFilter</filter-class>
    <init-param>
    <param-name>driver</param-name>
    <param-value>oracle.jdbc.driver.OracleDriver</param-value>
    </init-param>
    <init-param>
    <param-name>url</param-name>
    <param-value>jdbc:oracle:thin:@localhost:1521:orcl</param-value>
    </init-param>
    <init-param>
    <param-name>user</param-name>
    <param-value>scott</param-value>
    </init-param>
    <init-param>
    <param-name>password</param-name>
    <param-value>tiger</param-value>
    </init-param>
    </filter>
    <filter>
    <filter-name>hitcount</filter-name>
    <filter-class>HitCounterFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>authenticate</filter-name>
    <url-pattern>/nit</url-pattern>
    </filter-mapping>
    <servlet>
    <servlet-name>Login</servlet-name>
    <servlet-class>LoginServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Login</servlet-name>
    <url-pattern>/nit</url-pattern>
    </servlet-mapping>
    </web-app>
    Error_
    java.sql.SQLException: ORA-00904: "SANDY": invalid identifier
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:242)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:554)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1478)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:
    677)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.jav
    a:2371)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
    nt.java:2660)
    at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:
    777)
    at AuthenticationFilter.doFilter(AuthenticationFilter.java:37)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
    a:298)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
    :857)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
    ss(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:48
    9)
    at java.lang.Thread.run(Thread.java:619)
    The above error message i am getting in Tomcat server,i am having Oracle 11g V1..My SQL prompt is open and i have a table named "ourusers"...Can anyone kindly gimme the solution for this problem+*
    Edited by: sandy on Nov 9, 2010 8:59 AM

    java.sql.SQLException: ORA-00904: "SANDY": invalid identifier
    Looks like the sql you are submitting is invalid.
    Print out a copy of the sql you are trying to run and you will probably get:
    SELECT * FROM OURUSERS WHERE usr = Sandy and password = secretThat isn't valid sql. It is missing quotes around the values you are checking.
    This is the corrected sql query:
    SELECT * FROM OURUSERS WHERE usr = 'Sandy' and password = 'secret'so one solution would be:
    String sql = "SELECT * FROM OURUSERS WHERE usr = '" + user + "' and password = '" + pwd + "' ";However that is not optimal. It exposes your code to sql injection attack.
    The better way is to use a prepared statement:
    String sql = "SELECT * FROM OURUSERS WHERE usr = ? and password =?";
    st = con.prepareStatement(sql);
    st.setString(1, user);
    st.setString(2, password);
    rs = st.executeQuery();cheers,
    evnafets

  • ADF applicatiopn on Apache Tomcat server

    Hi all
    Iam intersted to know that can we deploy My ADF(genric applicaion) application containing task flows on my apache tomacat server .
    Thanks in advance
    Bipin

    Hi sammera
    i have add that dll in bin directory and also followed the steps in that link
    still iam getting the exception
    SEVERE: Error configuring application listener of class oracle.adf.mbean.share.config.ADFConfigLifeCycleCallBack
    java.lang.ClassNotFoundException: oracle.adf.mbean.share.config.ADFConfigLifeCycleCallBack
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4148)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:563)
         at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1397)
         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:597)
         at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
         at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1500)
         at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:252)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:186)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
         at java.lang.Thread.run(Thread.java:619)
    Jul 15, 2011 4:45:20 PM org.apache.catalina.core.StandardContext listenerStartEdited by: Bipin Patil on Jul 15, 2011 4:38 AM

  • Problem connecting oracle database to jsp pages using Apache Tomcat server 8.0

    Well...I tried too many things..googled so many times..but still could not find solution to my problem.
    I use windows 8 Enterprise Edition(if this has to do something with the problem)
    Oracle 11.2.0
    Apache Tomcat server 8.0
    JDK 1.7
    My oracle is installed in the D: drive and tomcat in c:. i copied the ojdbc6.jar file from oracle to lib directory of tomcat server.
    Then i set  CLASSPATH in environment variables as "C:\Program Files\Apache Software Foundation\Tomcat 8.0\lib\ojdbc6.jar" in system variables
    My path variable is set as "C:\Program Files\Java\jdk1.7.0_02\bin".
    My program is as follows in notepad:
    <%@ page import="java.sql.*" %>
    <html>
    <body>
    <%
    Connection conn;
    Statement st;
    ResultSet rs;
    try{
    new oracle.jdbc.driver.OracleDriver();
    String dbURL="jdbc:odbc:oracle:thin:@localhost:1521:XE";
    String userId="system";
    String pwd="moon";
    conn=DriverManager.getConnection(dbURL,userId,pwd);
    st=conn.createStatement();
    rs= st.executeQuery("SELECT * FROM login");
    while(rs.next())
    System.out.println(rs.getString(1)+""+rs.getString(2));
    catch(Exception e){}
    %>
    </body>
    </html>
    I get too many errors then
    eroors
    org.apache.jasper.JasperException: An exception occurred processing JSP page /page2.jsp at line 14
    11: String userId="system";
    12: String pwd="moon";
    13:
    14: conn=DriverManager.getConnection(dbURL,userId,pwd);
    15: st=conn.createStatement();
    16:
    17: rs= st.executeQuery("SELECT * FROM login");
    Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    root cause
    javax.servlet.ServletException: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:905)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:834)
         org.apache.jsp.page2_jsp._jspService(page2_jsp.java:102)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
         org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    Nothing solved this problem.

    >> Nothing solved this problem.
    Can't fix a problem 'till an actual problem is identified.
    >> ODBC Driver Manager ... Data source name not found
    That appears to be ODBC drivers looking for a DSN (Data Set Name). If it wants a DSN, the DSN has to be specified in the code, and the DSN has to be configured in the windows host ODBC applet. So that is at least two squirrels to get in the right tree before moving forward. A ...host:...[port:]SID|service name are some of the bits needed in a jdbc connect string, and that is in no way related to DSNs. A Whole Different Animal. If it wants a DSN that might be what needs to go in the URL bit.
    And ODBC setups can be confusing, especially if an x64 OS is in the mix- if that is the case there are two different ODBC configuration applets, one for x64 the other for x86, and if one gets as far as talking to an actual database it might toss an architecture error. Only way to fix that "problem" is *delete* the ODBC DSN and then run the correct (maybe the x86) ODBC config utility, and set up the DSN. Again.

  • Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error

    Hi all,
    I am using JBulider 8.0 and developing a web application in JSP and Access. When I run the application, i get the following error while going from an HTML page to a JSP page:
    Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Errortype Exception reportmessage Internal Server Errordescription The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.exception java.lang.NumberFormatException: null
    at java.lang.Integer.parseInt(Integer.java:394)
    at java.lang.Integer.parseInt(Integer.java:476)
    at org.apache.jsp.addJob$jsp._jspService(addJob$jsp.java:150)
    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:2347)
    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.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:1027)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
    at java.lang.Thread.run(Thread.java:536)
    Can anyone tell me what can possibly be wrong? Reply quickly as deadline of my project is not far away :(
    Regards,

    The exception is throwing when u r trying to convert null value into integer/float or double..
    Check for this

  • Problem in configuring Apache Tomcat Server

    Hi, I am facing problem in configuring Apache Tomcat server. I have downloaded its version 4.1.18 from the Internet. After unzipping and installing it, I have enabled the Root Context, enabled the Invoker Servlet, haven't changed the port to 80 from default 8080, have turned on the Servlet Reloading, have set the Java_Home variable in autoexec.bat, and have changed the DOS memory setting to 4096.
    Also, the concerned lines in my autoexec.bat file look like this:
    path c:\windows;c:\windows\command;c:\jdk1.2;c:\jsdk2.0;
    c:\JavaWebServer2.0;c:\jakarta-tomcat-4.1.18
    set java_home=c:\jdk1.2
    set tomcat_home-c:\jakarta-tomcat-4.1.18
    set classpath=.;c:\ServDevel;.;c:\jakarta-tomcat-4.1.18\common\lib\servlet.jar;.;c:\jsdk2.0\lib\servlet.jar;.;
    Still, after having done all this, when I start the server using startup.bat (which happens without any problems) and type in http://localhost:8080/ on the browser to test the server, nothing happens. It doesn't show me the Tomcat Welcome screen. I get an error page saying "This page is not available". Why? Where am I going wrong?
    Sushant

    1) Try http://127.0.0.1:8080
    2) set tomcat_home-c:\jakarta-tomcat-4.1.18
    Is the minus-sign after tomcat_home also in the autoexec.bat?
    Replace it with an equals-sign
    3) When you run startup.bat, is a new command window opened and are the following three lines displayed at the end? It should stay open, otherwise something is wrong (unless running as a service).
    INFO: Initializing Coyote HTTP/1.1 on port 8080
    Starting service Tomcat-Standalone
    Apache Tomcat/4.1.18

  • Unable to resolve Apache-Tomcat after 5.0.2 Upgrade / Content Server Install

    I recently upgraded from 5.0.1 to 5.0.2. With 5.0.1, I was able to resolve to http://<apache-tomcat.domain.com>:8080 as well as http://<apache-tomcat.domain.com>:8080/ptcsand http://<apache-tomcat.domain.com>:8080/ptcs/diagnosticsTest.jsp. However, after upgrading to 5.0.2, I am unable to resolve to any of these URLs. The 'Content Server' admin. folder shows up within the admin. ui and all necessary objects are there. Other than the upgrade, no other changes were made to the server. Any suggestions? Thanks.

    Did you upgrade to Tomcat 4.1.27LE version ?

Maybe you are looking for

  • VLD-2550 and 2551: CLOB datatype errors

    Hi All I've been trying to solve thi sproblem but have not been able to find a solution. Basically I have a Col1 (of table A) of clob datatype which is to be mapped to Col2 (table B). But when I validate the map I get the error: VLD-2550 : BLOB,CLOB

  • Multiple receivers for same message

    Hello Everyone, My requirement is where customer is sending an XML message and this gets converted into IDOC. This XML message has one node which if it has value as X and Y , then it should go to one ERP system. And if this tag is empty or other than

  • To add a new bank name in bank accounts field --AP

    Dear All In AP super user ---payments--entry--payments screen  there is Bank Accounts field --how do we add a new Bank name( to that LOV) Kindly guide thanking in advance lincy

  • Sql code for authorizing senior staff after data was inserted in the table

    Dear sirs/madams, Sub: I am using oracle9i/forms6i/reports6i and developing software for rural bank, I need sql/procedure/function code for authorizing senior staff after data was inserted in to the table by the junior staff. Thanks in advance for yo

  • [SOLVED] Xmodmap question...

    Hi, I'm trying to use 'xmodmap' so i can map 'ESCAPE' to work as ALT+F4 (close window). Google'd it a lot without success.. Anyone know if its possible ? BTW: I know i can easily do this under GNOME/KDE, but i need to use xmodmap. TIA Last edited by