Servlet under IIS?
hi all
i'm a question:
i have a simple servlet (hi.class) that outputs "hi sandro!!!"
is it possible to make it work under Microsoft Internet Information Services without any added module?
i'm quite sure it's not possible, but i need some advice
thanx in advance
sandro
does IIS+Tomcat has really low performance? i've just installed this and tested it with examples. now i'm going to write own servlets and i want to get good performance from iis. tell me pls what should i use: iis+tomcat, standalone tomcat or some other solutions?
Similar Messages
-
Weblogic Servlet to IIS/ASP
Hello,
Big picture: We have a 3rd party IIS server with ASP behind our firewall.
We need our WebLogic server to "forward" request to it.
I implemented this with a Servlet under WL that uses HttpURLConnection to
open a connection pass on POSTed parameters, set up the cookies, read the
html back from the IIS server and then send it back to the browser.
Problem is, the IIS machine is requesting "Connection" "Keep-alive" in the
header and has timing problems with its session since HttpURLConnection
doesn't support Keep-alive.
It looks like the package weblogic.net.http provides the functionality I
need but where is a tutorial or sample code? Please help by either
suggesting another entire approach or telling me how to use
weblogic.net.http package.
Thanks!!
MWW
I think you are already using weblogic.net.* implementation
because weblogic sets 'java.protocol.handler.pkgs' system property,
which includes weblogic.net package, which contains http.Handler,
so when you create new URL and open connection it will automatically
use weblogic.net.http.HttpURLConnection.
Mark Walter <[email protected]> wrote:
> Hello,
> Big picture: We have a 3rd party IIS server with ASP behind our firewall.
> We need our WebLogic server to "forward" request to it.
> I implemented this with a Servlet under WL that uses HttpURLConnection to
> open a connection pass on POSTed parameters, set up the cookies, read the
> html back from the IIS server and then send it back to the browser.
> Problem is, the IIS machine is requesting "Connection" "Keep-alive" in the
> header and has timing problems with its session since HttpURLConnection
> doesn't support Keep-alive.
> It looks like the package weblogic.net.http provides the functionality I
> need but where is a tutorial or sample code? Please help by either
> suggesting another entire approach or telling me how to use
> weblogic.net.http package.
> Thanks!!
> MWW
Dimitri
http://dima.dhs.org
-
SSO to partner application running under IIS
Hi,
We have a complete set-up for 9iAS Release2 where some applications are running. In parallell we have an application running under IIS, and would now like to enable the IIS application as a partner application to 9iAS letting the 9iAS SSO server handle the authentication.
In the documentation of Oracle Proxy Plug-in I read that this proxy plug-in can be used to proxy requests from IIS to Oracle http server (OHS) and also in this way enable SSO.
My question is if this can be done only for applications running under 9iAS but having IIS as web server, or if it is also possible like in our case to enable SSO via the proxy plug-in to applications runnind under IIS?
If this is not supported is the only available solution to use the SSO SDK in my IIS application?
Thanks and regards,
RikardHere's a DIY answer.
See Metalink Note 269820.1 which shows you how to use Perl to overwrite the host name in the HTTP header and remove the port number. -
Global data getting reset when running under IIS?
We have a scenario using IIS with an ASP.NET web service written in VB.NET. When a call to the web service is made, the web service calls a native dll (written in C, compiled using VS2010) using platform invoke, which in turn calls into our product API:
VB.NET web service -> native library (p/invoke) -> native API ....
Web service requests are successfully completed and the system runs without problem for hours. A trace of the native API shows it is being called by multiple processes and multiple threads within those processes.
The main native API dll contains a static global variable used to detect whether it is the first time it has been called and run initialization logic if it is. This dll is itself linked to a second dll that contains a global variable used to detect if it is
the first time it has been called.
After some hours the trace shows that the native API is invoked by an existing process but that the initialization logic is being exercised again, even though the global variable was set to indicate not first time and is never reset. One theory was that
the first process has ended and a new process has started almost instantaneously using the same process ID. However this is not the case as existing thread IDs from the same process are seen to write to the trace again after the first time logic has executed
for the second time, indicating the process has not restarted. The problem occurs regularly.
It is as though the process's global data has been initialized again and malloc'ed memory freed while the processing is still running. Is there any way this is possible when running under IIS?
There is an internal thread which waits on a blocking read of a named pipe (via ReadFile), and when the problem occurs, the ReadFile call ends with ERROR_NO_ACCESS, which appears to indicate the malloc'ed buffer is no longer valid, again implying something
has happened to the memory allocated to the process.Suggestting you asking it on:
http://forums.iis.net/ -
Load Report failed when opening Report under IIS 5.1
I recently upgraded to Crystal Reports 2008 (12) from Crystal Reports Basic 2008 (10.5). I am using Visual Studio 2008 with the CrystalReportViewer. Now when I run my reports from the website under IIS 5.1 (Windows XP SP3), I get a Load Report Failed. The detailed exception follow:
Error loading report (ConfigureCrystalReports)
CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException (0x800001F5): The Report Application Server failed at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() --- End of inner exception stack trace --- at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) at ncspo.ReportViewer.ConfigureCrystalReports() in D:\Websites\NCSPO\FIS\ReportViewer.aspx.vb:line 43
If I run the report using the ASP.Net Development Server, the reports run fine. It only fails under IIS. From other posts, I understand that i need to grant the Network Service and IIS_WPG group read/write permissions to the windows\temp folder. I have done this for the Network Service, but the IIS_WPG group was not introduced until IIS 6.0. Any ideas on how I can get this working under IIS 5.1?
Here is the code behind page:
Private Sub ConfigureCrystalReports()
Try
rpt = New ReportDocument
Dim strReportFilename As String
If Len(Request.QueryString("ReportFilename")) > 0 Then
strReportFilename = Request.QueryString("ReportFilename")
Else
strReportFilename = System.Configuration.ConfigurationManager.AppSettings("cr404Page")
End If
Dim strReportPath As String = System.Configuration.ConfigurationManager.AppSettings("ReportPath")
Dim strReportFilePath As String = strReportPath & strReportFilename
Dim strReportFilePath_Full As String = Server.MapPath(strReportFilePath)
rpt.Load(strReportFilePath_Full) <--- Exception occurs on this line
Catch ex As Exception
lblStatus.Text = "Error loading report (ConfigureCrystalReports)"
lblStatus.Text &= "<BR>" & ex.ToString()
ncspo.clsMisc.LogError(ex, Me)
End Try
End SubAm I correct in reading the following 2 documents that IIS 5.1 is not supported?
If you check this document. It shows IIS6 and 7 no support on 5. See page 6
[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f05523e4-35c4-2b10-2c89-9fcf64b0dd22]
This document also on page 5
[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50a87366-da1d-2b10-e1b4-a37ab37a2dea]
Thanks. -
404 Error on Servlet under HTTPS
Hi,
This is the first time that I've had to work with SSL. I have a servlet that worked fine under regular http. I had to implement SSL and run my site over https. When I try to access my servlet under HTTPS, I get the 404 File not found error. Is there something that I need to setup for servlets to run under SSL in apache or server.xml? or Do I need to modify my JSP and Servlet code?
I call my servlet from my JSP on the action method of the form like such:
* JSP call to servlet
<form action="https://www.benefitserver.com:8081/FDFServlet" method="post">***********
* Servlet code
import javax.servlet.*;
import javax.servlet.http.*;
import javax.net.ssl.*;
import java.io.*;
import java.util.*;
import com.yoursummit.benefitserver.*;
import com.adobe.fdf.*;
import com.adobe.fdf.exceptions.*;
public class FDFServlet extends HttpServlet
private static final String CONTENT_TYPE = "text/html";
private String fileout = "";
//Initialize global variables
public void init() throws ServletException
System.setProperty("java.protocol.handler.pkgs","sun.net.ssl.internal.www.protocol");
java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
//Process the HTTP Get request
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doPost( request, response);
//Process the HTTP Post request
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
String planID = request.getParameter("planID");
String empID = request.getParameter("empID");
HttpSession session = request.getSession();
try {
FDFDoc outputFDF = null;
/* Create a new FDF. */
outputFDF = new FDFDoc();
// Set the form fields with values from the database
if ( planID.equalsIgnoreCase("31") )
formDeltaPopulation formDP = new formDeltaPopulation();
fileout = formDP.populateDeltaForm( outputFDF, planID, empID, request );
if (planID.equalsIgnoreCase("29") )
formUnicarePopulation formUC = new formUnicarePopulation();
fileout = formUC.populateUnicareForm( outputFDF, planID, empID, request );
if (planID.equalsIgnoreCase("30") || planID.equalsIgnoreCase("32") || planID.equalsIgnoreCase("33") || planID.equalsIgnoreCase("34") || planID.equalsIgnoreCase("35"))
formSunLifePopulation formSL = new formSunLifePopulation();
fileout = formSL.populateSunLifeForm( outputFDF, planID, empID, request );
response.sendRedirect(com.yoursummit.utils.urlRewrite.getServletURL(request,"emp_main.jsp?empID=" + empID));
} catch(FDFException fdfe) {
/* We handle an error by emitting an html header */
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("Caught FDF exception");
out.println(fdfe.toString());
fdfe.printStackTrace(out);
IOException e = new IOException ( fdfe.getMessage() );
throw e;
catch(IOException ioe) {
/* We handle an error by emitting an html header */
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("Caught FDF exception");
out.println(ioe.toString());
ioe.printStackTrace(out);
throw ioe;
catch(Exception e) {
/* We handle an error by emitting an html header */
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("Caught tomcatDB exception");
out.println(e.toString());
e.printStackTrace(out);
IOException ioe = new IOException ( e.getMessage() );
throw ioe;
//Clean up resources
public void destroy()
}I have been told that there is problem with my configuration of Tomcat. I have followed the documentation found at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html
and it doesn't work. I have been working on this for a week now and can't seem to get it to work. Can someone please take a look at it and tell me what I am doing wrong? THANKS!
I get "HTTP 404 - File not Found" with the URL https://www.benefitserver.com/FDFServlet
I get "Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request" with the URL https://www.benefitserver.com/servlet/FDFServlet
I've looked at the log files for Apache and I don't see any errors listed. No errors logged in the Tomcat log file either.
* httpd.conf
## Include line for mod_jk.so (Jakarta-Tomcat installation)
#Include /usr/home/summimps/usr/local/jakarta/jakarta-tomcat-3.2.3/conf/mod_jk.conf-auto
LoadModule jk_module libexec/mod_jk.so
AddModule mod_jk.c
JkWorkersFile /usr/home/summimps/usr/tomcat4.1.24/conf/worker.properties
JkLogFile /usr/home/summimps/var/log/mod_jk.log
JkLogLevel info
#JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
#JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
#JkRequestLogFormat "%w %V %T"
JkMount /*.jsp benefitserver
JkMount /solarc/*.jsp benefitserver
JkMount /servlet/* ajp13
JkMount /solarc/servlet/* ajp13
# Should mod_jk send SSL information to Tomcat (default is On)
#JkExtractSSL On
# What is the indicator for SSL (default is HTTPS)
JkHTTPSIndicator HTTPS
# What is the indicator for SSL session (default is SSL_SESSION_ID)
JkSESSIONIndicator SSL_SESSION_ID
# What is the indicator for client SSL cipher suit (default is SSL_CIPHER)
JkCIPHERIndicator SSL_CIPHER
# What is the indicator for the client SSL certificated (default is SSL_CLIENT_CERT)
JkCERTSIndicator SSL_CLIENT_CERT
<Directory />
AllowOverride None
</Directory>
<Directory "/usr/tomcat4.1.24/webapps/ROOT">
Options Indexes
<IfDefine SSL>
SSLRequireSSL
SSLOptions +StdEnvVars +ExportCertData +StrictRequire
SSLVerifyClient require
SSLVerifyDepth 1
</IfDefine>
</Directory>
<VirtualHost benefitserver.com www.benefitserver.com>
SSLRequireSSL
ServerName benefitserver.com
ServerAdmin [email protected]
DocumentRoot /usr/local/etc/httpd/htdocs/benefitserver
TransferLog /usr/local/etc/httpd/logs/bsAccess_log
ErrorLog /usr/local/etc/httpd/logs/bsError_log
#DocumentRoot /usr/local/jakarta/jakarta-tomcat-3.2.3/webapps/benefitserver
</VirtualHost>
* server.xml
<?xml version='1.0' encoding='utf-8'?>
<Server className="org.apache.catalina.core.StandardServer" debug="0" port="8006" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" debug="0" jsr77Names="false"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" debug="0"/>
<GlobalNamingResources>
</GlobalNamingResources>
<Service className="org.apache.catalina.core.StandardService" debug="0" name="Tomcat-Standalone">
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
redirectPort="8443"
bufferSize="2048"
port="8081"
connectionTimeout="20000"
scheme="https"
enableLookups="true"
secure="true" protocolHandlerClassName="org.apache.coyote.http11.Http11Protocol"
debug="0"
disableUploadTimeout="true"
maxKeepAliveRequests="100"
proxyPort="0"
tcpNoDelay="true"
minProcessors="5"
maxProcessors="75"
acceptCount="100"
useURIValidationHack="false"
connectionLinger="-1"
compression="off">
<Factory className="org.apache.catalina.net.SSLServerSocketFactory" keystoreFile="//.keystore" keystoreType="JKS" algorithm="SunX509" clientAuth="false" protocol="TLS"/>
</Connector>
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector" redirectPort="8443" bufferSize="2048" port="8010" connectionTimeout="0" scheme="http" enableLookups="true" secure="false" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" debug="0" disableUploadTimeout="false" maxKeepAliveRequests="100" proxyPort="0" tcpNoDelay="true" minProcessors="5" maxProcessors="75" acceptCount="10" useURIValidationHack="false" connectionLinger="-1" compression="off">
<Factory className="org.apache.catalina.net.DefaultServerSocketFactory"/>
</Connector>
<Engine className="org.apache.catalina.core.StandardEngine" mapperClass="org.apache.catalina.core.StandardEngineMapper" debug="0" defaultHost="localhost" name="Standalone">
<Host className="org.apache.catalina.core.StandardHost"
appBase="webapps"
liveDeploy="true"
mapperClass="org.apache.catalina.core.StandardHostMapper"
autoDeploy="true"
configClass="org.apache.catalina.startup.ContextConfig"
errorReportValveClass="org.apache.catalina.valves.ErrorReportValve"
debug="9"
deployXML="true"
contextClass="org.apache.catalina.core.StandardContext"
unpackWARs="true"
name="localhost">
<Context className="org.apache.catalina.core.StandardContext"
crossContext="false"
reloadable="true"
mapperClass="org.apache.catalina.core.StandardContextMapper"
useNaming="true"
debug="0"
swallowOutput="false"
privileged="false"
displayName="Welcome to BenefitServer"
wrapperClass="org.apache.catalina.core.StandardWrapper"
docBase="/usr/tomcat4.1.24/webapps/ROOT"
cookies="true"
path=""
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper">
<Environment name="uploadUrl" override="true" type="java.lang.String" description="URL to display uploaded file in Benefit Server" value="http://www.benefitserver.com:8081/bsup"/>
<Environment name="exportPath" override="true" type="java.lang.String" description="Export Path for Benefit Server Export Utility" value="/usr/tomcat4.1.24/webapps/ROOT/bsex"/>
<Environment name="uploadPath" override="true" type="java.lang.String" description="Upload Path for Benefit Server" value="/usr/tomcat4.1.24/webapps/ROOT/bsup/"/>
<Environment name="tempPath" override="true" type="java.lang.String" description="Temporary Directory for File Upload in Benefit Server - Developm" value="/usr/home/summimps/tmp/benefitserver"/>
<Resource name="BS_Data" type="javax.sql.DataSource" scope="Shareable"/>
<ResourceParams name="BS_Mail">
<parameter>
<name>mail.smtp.host</name>
<value>localhost</value>
</parameter>
</ResourceParams>
<ResourceParams name="BS_Data">
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost/BS_Data</value>
</parameter>
<parameter>
<name>password</name>
<value>kdsusa1350</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>50</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>username</name>
<value>summimps</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>5</value>
</parameter>
</ResourceParams>
</Context>
</Host>
<Logger className="org.apache.catalina.logger.FileLogger" debug="0" verbosity="1" prefix="catalina_log." directory="logs" timestamp="true" suffix=".txt"/>
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" debug="0" resourceName="UserDatabase" validate="true"/>
</Engine>
</Service>
* web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!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>
<servlet>
<servlet-name>FDFServlet</servlet-name>
<servlet-class>FDFServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>FDFServlet</servlet-name>
<url-pattern>/FDFServlet</url-pattern>
</servlet-mapping>
</web-app> -
Can i deploy servlet to iis server..?
Can i deploy servlet to iis server..?
if yes.. how..?to deploy servlets into IIS you need to use some connector which connects IIS to tomcat. Still you have to use servlet contrainer from tomcat only (as IIS serves you only web server functionality but not servlet contrainer ). use JK Connector for this bride.
-
How to run servlets under Tomcat 6 in java1.5
hi all
i am unable to run servlets under tomcat 6,i checked environment variables ....all are correct..im getting http 503 error....A 503 response says
503 Service Unavailable
The server is currently unable to handle the request due to a
temporary overloading or maintenance of the server
You apparently have the server mis-configured. Recheck the configuration (or reinstall Tomcat per its instructions.) -
404 File not Found error trying servlet under https
Hi,
This is the first time that I've had to work with SSL. I have a servlet that worked fine under regular http. I had to implement SSL and run my site over https. When I try to access my servlet under HTTPS, I get the 404 File not found error. Is there something that I need to setup for servlets to run under SSL in apache or server.xml? or Do I need to modify my JSP and Servlet code?
I call my servlet from my JSP on the action method of the form like such:
* JSP call to servlet
<form action="https://www.benefitserver.com:8081/FDFServlet" method="post">
* Servlet code
import javax.servlet.*;
import javax.servlet.http.*;
import javax.net.ssl.*;
import java.io.*;
import java.util.*;
import com.yoursummit.benefitserver.*;
import com.adobe.fdf.*;
import com.adobe.fdf.exceptions.*;
public class FDFServlet extends HttpServlet
private static final String CONTENT_TYPE = "text/html";
private String fileout = "";
//Initialize global variables
public void init() throws ServletException
System.setProperty("java.protocol.handler.pkgs","sun.net.ssl.internal.www.protocol");
java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
//Process the HTTP Get request
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doPost( request, response);
//Process the HTTP Post request
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
String planID = request.getParameter("planID");
String empID = request.getParameter("empID");
HttpSession session = request.getSession();
try {
FDFDoc outputFDF = null;
/* Create a new FDF. */
outputFDF = new FDFDoc();
// Set the form fields with values from the database
if ( planID.equalsIgnoreCase("31") )
formDeltaPopulation formDP = new formDeltaPopulation();
fileout = formDP.populateDeltaForm( outputFDF, planID, empID, request );
if (planID.equalsIgnoreCase("29") )
formUnicarePopulation formUC = new formUnicarePopulation();
fileout = formUC.populateUnicareForm( outputFDF, planID, empID, request );
if (planID.equalsIgnoreCase("30") || planID.equalsIgnoreCase("32") || planID.equalsIgnoreCase("33") || planID.equalsIgnoreCase("34") || planID.equalsIgnoreCase("35"))
formSunLifePopulation formSL = new formSunLifePopulation();
fileout = formSL.populateSunLifeForm( outputFDF, planID, empID, request );
response.sendRedirect(com.yoursummit.utils.urlRewrite.getServletURL(request,"emp_main.jsp?empID=" + empID));
} catch(FDFException fdfe) {
/* We handle an error by emitting an html header */
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("Caught FDF exception");
out.println(fdfe.toString());
fdfe.printStackTrace(out);
IOException e = new IOException ( fdfe.getMessage() );
throw e;
catch(IOException ioe) {
/* We handle an error by emitting an html header */
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("Caught FDF exception");
out.println(ioe.toString());
ioe.printStackTrace(out);
throw ioe;
catch(Exception e) {
/* We handle an error by emitting an html header */
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("Caught tomcatDB exception");
out.println(e.toString());
e.printStackTrace(out);
IOException ioe = new IOException ( e.getMessage() );
throw ioe;
//Clean up resources
public void destroy()
}I have been told that there is problem with my configuration of Tomcat. I have followed the documentation found at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html
and it doesn't work. I have been working on this for a week now and can't seem to get it to work. Can someone please take a look at it and tell me what I am doing wrong? THANKS!
I get "HTTP 404 - File not Found" with the URL https://www.benefitserver.com/FDFServlet
I get "Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request" with the URL https://www.benefitserver.com/servlet/FDFServlet
I've looked at the log files for Apache and I don't see any errors listed. No errors logged in the Tomcat log file either.
* httpd.conf
## Include line for mod_jk.so (Jakarta-Tomcat installation)
#Include /usr/home/summimps/usr/local/jakarta/jakarta-tomcat-3.2.3/conf/mod_jk.conf-auto
LoadModule jk_module libexec/mod_jk.so
AddModule mod_jk.c
JkWorkersFile /usr/home/summimps/usr/tomcat4.1.24/conf/worker.properties
JkLogFile /usr/home/summimps/var/log/mod_jk.log
JkLogLevel info
#JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
#JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
#JkRequestLogFormat "%w %V %T"
JkMount /*.jsp benefitserver
JkMount /solarc/*.jsp benefitserver
JkMount /servlet/* ajp13
JkMount /solarc/servlet/* ajp13
# Should mod_jk send SSL information to Tomcat (default is On)
#JkExtractSSL On
# What is the indicator for SSL (default is HTTPS)
JkHTTPSIndicator HTTPS
# What is the indicator for SSL session (default is SSL_SESSION_ID)
JkSESSIONIndicator SSL_SESSION_ID
# What is the indicator for client SSL cipher suit (default is SSL_CIPHER)
JkCIPHERIndicator SSL_CIPHER
# What is the indicator for the client SSL certificated (default is SSL_CLIENT_CERT)
JkCERTSIndicator SSL_CLIENT_CERT
<Directory />
AllowOverride None
</Directory>
<Directory "/usr/tomcat4.1.24/webapps/ROOT">
Options Indexes
<IfDefine SSL>
SSLRequireSSL
SSLOptions +StdEnvVars +ExportCertData +StrictRequire
SSLVerifyClient require
SSLVerifyDepth 1
</IfDefine>
</Directory>
<VirtualHost benefitserver.com www.benefitserver.com>
SSLRequireSSL
ServerName benefitserver.com
ServerAdmin [email protected]
DocumentRoot /usr/local/etc/httpd/htdocs/benefitserver
TransferLog /usr/local/etc/httpd/logs/bsAccess_log
ErrorLog /usr/local/etc/httpd/logs/bsError_log
</VirtualHost>
* server.xml
<?xml version='1.0' encoding='utf-8'?>
<Server className="org.apache.catalina.core.StandardServer" debug="0" port="8006" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" debug="0" jsr77Names="false"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" debug="0"/>
<GlobalNamingResources>
</GlobalNamingResources>
<Service className="org.apache.catalina.core.StandardService" debug="0" name="Tomcat-Standalone">
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
redirectPort="8443" bufferSize="2048" port="8081" connectionTimeout="20000" scheme="https" enableLookups="true" secure="true" protocolHandlerClassName="org.apache.coyote.http11.Http11Protocol" debug="0" disableUploadTimeout="true" maxKeepAliveRequests="100" proxyPort="0" tcpNoDelay="true" minProcessors="5" maxProcessors="75" acceptCount="100" useURIValidationHack="false" connectionLinger="-1" compression="off">
<Factory className="org.apache.catalina.net.SSLServerSocketFactory" keystoreFile="//.keystore" keystoreType="JKS" algorithm="SunX509" clientAuth="false" protocol="TLS"/>
</Connector>
<Engine className="org.apache.catalina.core.StandardEngine" mapperClass="org.apache.catalina.core.StandardEngineMapper" debug="0" defaultHost="localhost" name="Standalone">
<Host className="org.apache.catalina.core.StandardHost" appBase="webapps" liveDeploy="true" mapperClass="org.apache.catalina.core.StandardHostMapper" autoDeploy="true" configClass="org.apache.catalina.startup.ContextConfig" errorReportValveClass="org.apache.catalina.valves.ErrorReportValve" debug="9" deployXML="true" contextClass="org.apache.catalina.core.StandardContext" unpackWARs="true" name="localhost">
<Context className="org.apache.catalina.core.StandardContext" crossContext="false" reloadable="false" mapperClass="org.apache.catalina.core.StandardContextMapper" useNaming="true" debug="0" swallowOutput="false" privileged="false" displayName="Welcome to Tomcat" wrapperClass="org.apache.catalina.core.StandardWrapper" docBase="/usr/tomcat4.1.24/webapps/ROOT" cookies="true" path="" cachingAllowed="true" charsetMapperClass="org.apache.catalina.util.CharsetMapper">
<Environment name="uploadUrl" override="true" type="java.lang.String" description="URL to display uploaded file in Benefit Server" value="http://www.benefitserver.com:8081/bsup"/>
<Environment name="exportPath" override="true" type="java.lang.String" description="Export Path for Benefit Server Export Utility" value="/usr/tomcat4.1.24/webapps/ROOT/bsex"/>
<Environment name="uploadPath" override="true" type="java.lang.String" description="Upload Path for Benefit Server" value="/usr/tomcat4.1.24/webapps/ROOT/bsup/"/>
<Environment name="tempPath" override="true" type="java.lang.String" description="Temporary Directory for File Upload in Benefit Server - Developm" value="/usr/home/summimps/tmp/benefitserver"/>
<Resource name="BS_Data" type="javax.sql.DataSource" scope="Shareable"/>
<ResourceParams name="BS_Mail">
<parameter>
<name>mail.smtp.host</name>
<value>localhost</value>
</parameter>
</ResourceParams>
<ResourceParams name="BS_Data">
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost/BS_Data</value>
</parameter>
<parameter>
<name>password</name>
<value>kdsusa1350</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>50</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>username</name>
<value>summimps</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>5</value>
</parameter>
</ResourceParams>
</Context>
<Logger className="org.apache.catalina.logger.FileLogger" debug="0" verbosity="1" prefix="localhost_log." directory="logs" timestamp="true" suffix=".txt"/>
</Host>
<Logger className="org.apache.catalina.logger.FileLogger" debug="0" verbosity="1" prefix="catalina_log." directory="logs" timestamp="true" suffix=".txt"/>
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" debug="0" resourceName="UserDatabase" validate="true"/>
</Engine>
</Service>
</Server>
* web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!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>
<servlet>
<servlet-name>FDFServlet</servlet-name>
<servlet-class>FDFServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>FDFServlet</servlet-name>
<url-pattern>/FDFServlet</url-pattern>
</servlet-mapping>
</web-app> -
JDev11g : How to add java servlet under ADF security policies
I'm trying to set a same login on http servlet ( i create it trough wizard in jDev ) as it is for other .jspx pages.
I configured the jazn-data.xml and login ( user roles, realms ) is working fine.
But i can't configure http servlet to be under this authorization.
This problem occured when I was migrating from jDev 11g TP4 to production also from OC4J to WebLogic,
but if I create a new http servlet I am also unable to put it under JAZN authorization.
Thank you in advance for your help, Rok KogovšekI reproduced problem on new test application, it was working fine until I set up ADF Security by wizard.
I choose ADF Authentication and Authorization then Http Basic Authentication ( on real project is form based but probablly this doesn't matters )
then for Identy store I chose Application XML, no automatic grants and without redirect.
I also set inside web.xml this ( to put servlet under same login as other pages ).
*<security-constraint>*
*<web-resource-collection>*
*<web-resource-name>testServlet</web-resource-name>*
*<url-pattern>/test</url-pattern>*
*</web-resource-collection>*
*<auth-constraint>*
*<role-name>valid-users</role-name>*
*</auth-constraint>*
*</security-constraint>*
When I finish this i got same error as on first project.
Here is whole error:
oracle.jbo.common.ampool.ApplicationPoolException: JBO-30003: The application pool (oracle.fod.mobile.testModuleLocal) failed to checkout an application module due to the following exception:
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2262)
at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3086)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:419)
at oracle.jbo.client.Configuration.getApplicationModule(Configuration.java:1395)
at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1363)
at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1335)
at oracle.fod.mobile.testServlet.doGet(testServlet.java:22)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: oracle.adf.share.security.ADFSecurityAuthenticationException: JAAS login error.
Invalid null input: name
at oracle.adf.share.security.authentication.JAASAuthenticationService.doLogin(JAASAuthenticationService.java:120)
at oracle.adf.share.security.authentication.JAASAuthenticationService.login(JAASAuthenticationService.java:89)
at oracle.adf.share.security.authentication.JAASAuthenticationService.login(JAASAuthenticationService.java:71)
at oracle.jbo.common.UserAznUtil.authenticate(UserAznUtil.java:62)
at oracle.jbo.common.UserAznUtil.authenticateUser(UserAznUtil.java:29)
at oracle.jbo.server.ApplicationModuleImpl.prepareSession(ApplicationModuleImpl.java:6387)
at oracle.jbo.server.ApplicationModuleImpl.prepareSession(ApplicationModuleImpl.java:6356)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:171)
at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:8377)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4364)
at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2421)
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2207)
... 25 more
Caused by: javax.security.auth.login.LoginException: Invalid null input: name
at javax.security.auth.login.LoginContext.init(LoginContext.java:229)
at javax.security.auth.login.LoginContext.(LoginContext.java:367)
at javax.security.auth.login.LoginContext.(LoginContext.java:444)
at oracle.adf.share.security.authentication.JAASAuthenticationService.doLogin(JAASAuthenticationService.java:102)
... 36 more
*And here is the sample application on which i reproduced this error [http://www.k-invent.si/doc/testServlet.zip|https://marvin/exchweb/bin/redir.asp?URL=http://www.k-invent.si/doc/testServlet.zip]*
Thank you for your help, Rok Kogovšek -
Error thrown under IIS during app pool recycles with determinations-server
The user specified event 5009 has been generated by Microsoft-Windows-WAS on the computer XXXXXXX and was logged to the Windows System log. A process serving application pool DefaultAppPool terminated unexpectedly. The process id was 4132. The process exit code was 0xc0000374.
We notice that after web service calls are made to OPA determinations-server (OPA 10.4.2), the recycle of the app pools under IIS 7.5 on Windows 2008 R2 (64-bit) throws the error above. IIS usually recycles the app pools about every 27 hours. You can find this in the windows event viewer.
Has anyone else noticed this? Anyone know the cause?
The error just appears in the windows event log, and the error doesn't seem to cause any major problems, but we would like to make sure no errors or warnings appear in our event logs. We can continue to call the web service, and everything appears fine.
Thoughts?Hi Joy,
You need to ensure that the application pool identity is set to a valid account for the application pool to function.
Step by step explanation can be found at
Event ID 5057 — IIS Application Pool Availability
You can also refer similar thread as well at Use Domain Account as App Pool Identity
Rachit
Please mark as answer or vote as helpful if my reply does -
hi,
In a portal project using ASP and IIS server, i need to develop an application which connect to the web and retrieve documents from it.
I choose a servlet technology to do this.
I have two question :
1) If the portal uses IIS can i use Servlets within ASP pages?
is it necessary to use the package server.jar with IIS, or we can only use IIS ?
2)Can we connect to an URL page and retrieve it with servlets
like we do with this portion of code :
target = new URL(requete);
HttpURLConnection fetch = (HttpURLConnection)target.openConnection( );
BufferedReader in = new BufferedReader(new InputStreamReader(fetch.getInputStream( )));
If yes how ?
thank youUmm, IIS runs ASP pages, which can be written either in VBScript or JScript. Servlets cannot be embedded in or called from within ASP pages. I guess they could be invoked via an HTTP redirect or by creating under-the-hood HTTP connection to the servlet, but that's nasty and circuitous. I'd really recommend finding a way to do what you want in ASP.
Servlets/JSP's require a Java-based container to run in. There are Servlet containers that work with IIS - check out Tomcat @ jakarta.apache.org
As for the second question, any Java code can be run from within a Servlet - what's stopping you from using that exact code snippet to do what you want to do? -
How to write to windows event logs from determinations-server under IIS
This is just an FYI technical bit of information I wish someone had shared with me before I started trying to write OPA errors to the windows event log... Most problems writing to the windows event log from log4net occur because of permissions. Some problems are because determinations-server does not have permissions to create some registry entries. Some problems cannot be resolved unless specific registry entry permissions are actually changed. We had very little consistency with the needed changes across our servers, but some combination of the following would always get the logging to the windows event log working.
To see log4net errors as log4net attempts to utilize the windows event log, temporarily add the following to the web.config:
<appSettings>
<!-- uncomment the following line to send diagnostic messages about the log configuration file to the debug trace.
Debug trace can be seen when attached to IIS in a debugger, or it can be redirected to a file, see
http://logging.apache.org/log4net/release/faq.html in the section "How do I enable log4net internal debugging?" -->
<add key="log4net.Internal.Debug" value="true"/>
</appSettings>
<system.diagnostics>
<trace autoflush="true">
<listeners>
<add
name="textWriterTraceListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="logs/InfoDSLog.txt" />
</listeners>
</trace>
</system.diagnostics>
To add an appender for the windows event viewer, try the following in the log4net.xml:
<appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
<param name="ApplicationName" value="OPA" />
<param name="LogName" value="OPA" />
<param name="Threshold" value="all" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<levelMin value="WARN" />
<levelMax value="FATAL" />
</filter>
</appender>
<root>
<level value="warn"/>
<appender-ref ref="EventLogAppender"/>
</root>
To put the OPA logs under the Application Event Log group, try this:
Create an event source under the Application event log in Registry Editor. To do this, follow these steps:
1. Click Start, and then click Run.
2. In the Open text box, type regedit.
3. Locate the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application
4. Right-click the Application subkey, point to New, and then click Key.
5. Type OPA for the key name.
6. Close Registry Editor.
To put the OPA logs under a custom OPA Event Log group (as in the demo appender above), try this:
Create an event log in Registry Editor. To do this, follow these steps:
1. Click Start, and then click Run.
2. In the Open text box, type regedit.
3. Locate the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog
4. Right-click the eventlog subkey, point to New, and then click Key.
5. Type OPA for the key name.
6. Right-click the new OPA key and add a new DWORD called "MaxSize" and set it to "1400000" which is about 20 Meg in order to keep the log file from getting too large.
7. The next steps either help or sometimes cause an error, but you can try these next few steps... If you get an error about a source already existing, then you can delete the key.
8. Right-click the OPA subkey, point to New, and then click Key.
9. Type OPA for the key name.
10. Close Registry Editor.
You might need to change permissions so OPA can write to the event log in Registry Editor. If you get permission errors, try following these steps:
1. Click Start, and then click Run.
2. In the Open text box, type regedit.
3. Locate the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog
4. Right-click the EventLog key, select Permissions.
5. In the dialog that pops up, click Add...
6. Click Advanced...
7. Click Locations... and select the current machine by name.
8. Click Find Now
9. Select both the Network user and IIS_IUSERS user and click OK and OK again. (We never did figure out which of those two users was the one that fixed our permission problem.)
10. Change the Network user to have Full Control
11. Click Apply and OK
To verify OPA Logging to the windows event logs from Determinations-Server:
Go to the IIS determinations-server application within Server Manager.
Under Manage Application -> Browse Application click the http link to pull up the local "Available Services" web page that show the wsdl endpoints.
Select the /determinations-server/server/soap.asmx?wsdl link
Go to the URL and remove the "?wsdl" from the end of the url and refresh. This will throw the following error into the logs:
ERROR Oracle.Determinations.Server.DSServlet [(null)] - Invalid get request: /determinations-server/server/soap.asmx
That error should show up in the windows event log, OR you can get a message explaining why security stopped you in "logs/InfoDSLog.txt" if you used the web.config settings from above.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa363648(v=vs.85).aspx
Edited by: Paul Fowler on Feb 21, 2013 9:45 AMThanks for sharing this information Paul.
-
Hello all
I am new to servlets and my particular questions deals with setup. I have xp pro (iis 5.o) and I was wondering can I just install jre and put the servlet class on the server. I guess if someone can give a thought on that then I would be real appreciativeI think IIS is a webserver only. You need to have some App Server or some servlet engine to be coupled with IIS. Try to get JRun/ Servlet Exec.
-
URL prefix under IIS for multiple sites
I'm trying to set up DW8. I webmaster a large number of sites
for clients using a variety of hosting companies and web servers. I
use IIS under Win2K Pro.
Pre-DW, my setup has been to have a test area with folders:
Inetpub\wwwroot\site1, Inetpub\wwwroot\site2, etc. To test I browse
to localhost/site1, localhost/site2, etc. Then I copy the files to
another part of the disk: websites\site1, websites\site2, editing
them to change directions to the include files (sometimes I work in
ASP, sometimes in PHP). Even with a utility we've made special for
this task, this is a ROYAL PAIN. Then I upload site1 to server1,
site2 to server2, etc.
I have to do it this way because IIS will only recognize one
website at a time, and I jump around from site to site so often
it's a real pain to turn the sites on & off via the Control
Panel.
Now I'm trying to set up site definitions on DW8. For Site1 I
say the URL is www.site1.com, the local testing spot is
Inetpub\wwwroot\site1, and it gives me this "site URL prefix for
the testing server does not match the site URL prefix specified in
the HTTP address". What do I do? What have you-all found is the
easist approach:
1. fool DW about where files are kept?
2. Do the PITA switch between which site IIS thinks is
"live"?
3. host a local multi-site server?> I have to do it this way because IIS will only recognize
one website at a
> time
Fix:
http://mnteractive.com/archive/running-multiple-sites-on-win2k-and-xp/
-Darrel
Maybe you are looking for
-
Hello experts, For debugging purposes I would like to use "createFiles" in an AS2 sender adapter. I looked through all my Seeburger documentations but could not find anything. Do you know how to use "createFiles" in the module tab? Which Seeburger co
-
HT1918 How can I be able to fix a disabled iPad of mine
My ipad is disabled
-
Obiee 11g external table authentication
Hi, I try to create external table authentication but it is not working. I have created this table CREATE TABLE OBI_SECURITY_USERS USER_NAME VARCHAR2(100 BYTE), USER_PASSWORD VARCHAR2(20 BYTE) NOT NULL and I defined Initialization Block it is below s
-
I am writing code to take a GLJPanel, buffering the image and write to a .jpg file like so, GraphicsConfiguration gc = this.getGraphicsConfiguration(); BufferedImage bimg = gc.createCompatibleImage(this.getWidth(), this.getHeight()); this.paint(b
-
My response file show a blank in a field that was ...
.... confirmed as completed, to the person who submitted the form. It's a multiple date reservation form and the selected date shows blank on some entries. How would I attach the pdf / excel file for you to see the problem? Bob Altomondo