How to manage Struts web application unavailbility ?

Hello !
I have a web application (portal) based on Struts framework. And I am wondering how is the best way to manage the portal unavailbility (for maintenance reasons for example) ?
We can deploy a new web application/page saying that "the portal is unavailable for the moment" but it is a heavy solution and not proper for people that are currently using the portal. So not good.
Maybe I should check in the init Action of the portal in a database if the portal is available or not... but how to manage people who are currently logged in ? should I check this state in each action of the portal ? it is quite repetitive...
Do you have any idea ?
Thanks for advice.

The simplest, lowest impact, lowest risk solution would be to use a filter:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class AvailabilityFilter
implements Filter
   // private member variables for connection url/user/pass or JNDI
   // resource name
   // private getters and setters
   public void init( FilterConfig config )
      // Read necessary filter init-params here, like connection parameters
      // or the JNDI resource name of a connection pool used to determine
      // availability.
   public void destroy( )
   public void doFilter( ServletRequest request, ServletResponse response, FilterChain filterChain )
      if( this.isAvailable( ) )
         filterChain.doFilter( request, response );
      else if( response instanceof HttpServletResponse )
         HttpServletResponse httpResponse = (HttpServletResponse)response;
         response.sendError( 503, "Application temporarily unavailable" );
      else
         response.getWriter( ).println( "Application temporarily unavailable" );
         response.getWriter( ).close( );
   private boolean isAvailable( )
      // Attempt to connection to the database and/or check availability status
      // Return true if available, false otherwise
}Now, as far as managing existing user sessions goes, you can also implement an HttpSessionListener to track sessions:
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class SessionTracker
implements HttpSessionListener
    private static Map activeSessions = new HashMap( );
    public void sessionCreated( HttpSessionEvent event )
        HttpSession session = event.getSession( );
        synchronized( activeSessions )
           activeSessions.put( session.getId( ), session );
    public void sessionDestroyed( HttpSessionEvent event )
        HttpSession session = event.getSession( );
        synchronized( activeSessions )
           activeSessions.remove( session.getId( ) );
    public static void closeAllSessions( )
        synchronized( activeSessions )
            for( Iterator i = activeSessions.entrySet( ).iterator( ); i.hasNext( ); )
                Map.Entry entry = (Map.Entry)i.next( );
                String sessionId = (String)entry.getKey( );
                HttpSession session = (HttpSession)entry.getValue( );
                session.invalidate( );
                i.remove( );
}Some user event could call a servlet which would set a flag in the DB marking it as down for maintenance and then call the static method SessionTracker.closeAllSessions( ), which effectively logs everyone out. Any attempts to access the app after that period would fail; the filter would try to connect and/or check the flag in the DB and would throw an HTTP 503 instead of executing the rest of the filter chain. No reconfiguration would ever be necessary, and you wouldn't be changing code, just adding these two new classes and a couple of entries in web.xml.
Hope that helps,
- Jesse

Similar Messages

  • Question about how to integrate struts web application into Weblogic Portal

    hi, I'm using Weblogic8.1 Portal and workshop to integrate my existing struts web applications. I know that the struts web application can be imported and integrated as a portlet. But I'm not sure how to integrate the corresponding EJB module into portal?
    any help appreciated!!

    should be simple...
    copy all the jpfs and other classes appropriately into a new portal app.
    Create a new Java Page Flow portlet.
    That should be it.
    The major thing to watch for is how your navigation etc change.
    Kunal Mittal

  • Send an email to all user in Oracle Test Manager for Web Applications

    I have administrator access to Oracle Test Manager for Web Applications. How can I send email to all user in the system (Oracle Test Manager for Web Applications)?
    Thanks
    Katherine
    Edited by: Katherine on 20/12/2010 16:38
    Edited by: Katherine on 20/12/2010 16:39

    Hi ,
    You can create a single dynamic distribution group with the condition to have only the mailboxes in exchange as its members . Then when a person send an email to that  Dynamic distribution group it will get distributed to all the mailboxes
    in exchange.
    Note : Most important feature in the dynamic group is that the membership of that group will be maintained automatically and also along with that we can have group membership by defining the recipient types/OU /rules.
    I agree with ED and also based on my knowledge you cannot achieve your scenario without Distribution groups or dynamic distribution groups.
    Thanks & Regards S.Nithyanandham

  • From a Technical Architect point of view, how to design a web application?

    Hi to all,
    I am writing this issue here because I this question is not related on how to program, but on how to design a web application. That is, this question is not related to how to program with the technologies in J2EE, but how to use them correctly to achieve a desired outcome.
    Basically I know how to develop a simple web application. I like to use SpringFramework with AcegiSecurity and Hibernate Framework to persist my data. I usually use JBoss to deploy my web applications, however I could easily use Tomcat or Jetty (Since I am not using EJB�s).
    However I have no idea on how to develop (or a better word would be �design�) a website which is divided into different modules.
    Usually when you develop a website, you have certain areas that are public, and other areas that are not. For example, a company would want anyone on the Internet to download information about the products they are selling, however they would only want their employees to download certain restricted information.
    Personally I try to categorise this scenario in to common words; Extranet and Intranet.
    But � (and here starts the confusion in my mind) should I treat these two as two projects, or as one project? The content to be displayed on the Extranet is much different then the content to be displayed on the Intranet and definitely clients should not be allowed to the Intranet.
    First approach would be to treat them as the same project. This would be perfect, since if the company (one day) decides to change the layout of the website, then the design would change for both the Intranet and the Extranet version. Also the system has a common login screen, that is I would only need to have employees to have a certain Role so that they have access to the intranet, while clients would not have a certain Role and thus they would not be allowed in. But what about performance and scalability? What if the Intranet and Extranet have to be deployed on the different Hardware!?
    The second approach is to threat them as two separate projects. To keep the same layout you just copy & paste the layout from one project to another. However we would not want to have two different databases to store our users, one for the employees and the other one for the clients. Therefore we would build a CAS server for authentication purposes. Both the Intranet and the Extranet would use the same CAS server to login however they could be deployed on different hardware. However what if we want to change the design. Do we really want to have to just copy and paste elements from one project to another? We all know how these things finish! �We do not have time for that � just change the Extranet and leave the Intranet as it is!�
    The third approach (and this is the one I like most) is to have a single project built into different WAR files. The common elements would be placed in all WAR files. However in development you would only need to change once and the effects would show in the different war files. The problem with this approach is that the project will be very big. Also, you will still need to define configuration files for each one of them (2 Web.config, 2 Spring-Servlet.config, 2 acegi-security.config, etc).
    Basically I would like something in the middle of approach 2 and approach 3! However I can identify what this approach is. Also I can not understand if there is even a better approach then these three! I always keep in mind that there can always be more then two modules (that is not only Intranet and Extranet).
    Anyways, it is already too long this post. Any comments are more then welcome and appreciated.
    Thanks & Regards,
    Sim085

    Hi to all,
    First of all thanks for the interest shown and for the replies. I do know what MVC or Multi-layered design is and I develop all my websites in that way.
    Basically I have read a lot of books about Domain-Driven Design. I divide my web applications into 4 layers. The first layer is the presentation layer. Then I have the Facade layer and after that I have a Service layer (Sometimes I join these two together if the web application is small enough). Finally I have the Data Access layer where lately I use Hibernate to persist my object in the database.
    I do not have problems to understand how layering a web application works and why it is required. My problem is how to design and develop web applications with different concerns that use same resources. Let me give an example:
    Imagine a Supermarket. The owner of the Supermarket want to sell products from the website, however he wants to also be able to insert new products from the website itself. This means that we have two different websites that make use of the same resources.
    The first website is for the Supermarket clients. The clients can create an account. Then they can view products and order them. From the above description we can see that in our domain model we will have definitely an object Account and an object Product (I am not mentioning all of them). In the Data Access layer we will have repository objects that will be used to persist the Account and Products.
    The second website is for the Supermarket employees. The employees still need to have an account. Also there is still a product object. This means that Account and Product objects are common to the two websites.
    Also important to mention is the style (CSS). The Supermarket owner would like to have the same style for both websites.
    Now I would not like to just copy & paste the objects and elements that are common to both websites into the two different projects since this would mean that I have to always repeat the changes I make in one website, inside the other one.
    Having a single WAR file with both websites is not an option either because I would not like to have to deploy both websites on the same server because of performance and scalability issues.
    Basically so far I have tought of putting the common elements in a Jar File which would be found on the two different servers. However I am not sure if this is the best approach.
    As you can see my problem is not about layering. I know what layering is and agree with both of you on its importance.
    My question is: What is the best approach to have the same resources available for different websites? This includes Class Files, CSS Files, JavaScript Files, etc.
    Thanks & Regards,
    Sim085

  • Deploying a STRUTS Web Application

    X-Posted to weblogic.developer.interest.jsp
              weblogic.developer.interest.servlet
              Hi,
              for those of you who are familiar with STRUTS JSP/Servlet
              framework: I'm desparately trying to deploy a web application
              that uses STRUTS on our BEA WebLogic6.1 SP1 server.
              My WAR looks like
              index.jsp
              WEB-INF/web.xml
              WEB-INF/struts-config.xml
              WEB-INF/classes/mypackage/MyForm.java
              WEB-INF/lib/struts.jar
              (and several other files). On server startup, STRUTS loads its
              configuration from struts-config.xml. This indicates that struts.jar
              is in the classpath. A HTTP request to index.jsp which uses
              a form bean define in mypackage/MyForm.java (which subclasses
              org.apache.struts.action.ActionForm) fails with a ClassNotFoundException
              for mypackage/MyForm.java:
              java.lang.ClassNotFoundException: de.adesso.premioss.process.WorklistForm
              at
              weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.
              java:178)
              at
              weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClas
              sLoader.java:65)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
              at
              weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClas
              sLoader.java:43)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:120)
              at
              org.apache.struts.action.ActionServlet.processActionForm(ActionServlet.java:
              1700)
              at
              org.apache.struts.action.ActionServlet.process(ActionServlet.java:1562)
              at
              org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
              So it looks like WEB-INF/classes is not a part of the classpath,
              at last it is not visible from org.apache.struts.action.ActionServlet.
              Has anybody encountered the same problem and found a solution?
              No f'up set. Please adjust.
              TIA
              Tobias Trelle
              adesso AG
              www.adesso.de
              

    Hi Tobias,
              are you aware of the classloading mechanisms for WebLogic and
              WebApplications? This looks like a typical classloader / wrong packaging
              issue to me, you will find lots on this on groups.google.com. If that
              does not help let me know.
              Daniel
              > -----Original Message-----
              > From: Tobias Trelle [mailto:[email protected]]
              > Posted At: Friday, January 25, 2002 9:11 AM
              > Posted To: servlet
              > Conversation: Deploying a STRUTS Web Application
              > Subject: Deploying a STRUTS Web Application
              >
              >
              > X-Posted to weblogic.developer.interest.jsp
              > weblogic.developer.interest.servlet
              > Hi,
              >
              > for those of you who are familiar with STRUTS JSP/Servlet
              > framework: I'm desparately trying to deploy a web application
              > that uses STRUTS on our BEA WebLogic6.1 SP1 server.
              >
              > My WAR looks like
              >
              > index.jsp
              > WEB-INF/web.xml
              > WEB-INF/struts-config.xml
              > WEB-INF/classes/mypackage/MyForm.java
              > WEB-INF/lib/struts.jar
              >
              > (and several other files). On server startup, STRUTS loads its
              > configuration from struts-config.xml. This indicates that struts.jar
              > is in the classpath. A HTTP request to index.jsp which uses
              > a form bean define in mypackage/MyForm.java (which subclasses
              > org.apache.struts.action.ActionForm) fails with a
              > ClassNotFoundException
              > for mypackage/MyForm.java:
              >
              > java.lang.ClassNotFoundException:
              > de.adesso.premioss.process.WorklistForm
              > at
              > weblogic.utils.classloaders.GenericClassLoader.findClass(Gener
              > icClassLoader.
              > java:178)
              > at
              > weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(C
              > hangeAwareClas
              > sLoader.java:65)
              > at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
              > at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
              > at
              > weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(C
              > hangeAwareClas
              > sLoader.java:43)
              > at
              > java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
              > at java.lang.Class.forName0(Native Method)
              > at java.lang.Class.forName(Class.java:120)
              > at
              > org.apache.struts.action.ActionServlet.processActionForm(Actio
              > nServlet.java:
              > 1700)
              > at
              > org.apache.struts.action.ActionServlet.process(ActionServlet.j
              > ava:1562)
              > at
              > org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
              >
              > So it looks like WEB-INF/classes is not a part of the classpath,
              > at last it is not visible from org.apache.struts.action.ActionServlet.
              >
              > Has anybody encountered the same problem and found a solution?
              >
              > No f'up set. Please adjust.
              >
              > TIA
              > --
              > Tobias Trelle
              > adesso AG
              > www.adesso.de
              >
              >
              

  • How i can make web application by using oracle form6i

    how i can make web application by using oracle form 6i , indetail .
    A.R

    indetail .As Andy Millman might observe, you're having a laugh. This is a big topic, far exceeding what it is reasonable to expect people to help out with in a Forum. Do you not have the 6i documentation?
    OTN has a site for upgarding to web forms. Although it is mainly focussed on moving to 9i/10g a lot of the issues and solutions apply to moving a 6i client/server app to web deployment. For further help there is a Forms.
    Cheers, APC

  • How to deploy my web application .war file into SAP netweaver Engine

    Hi All,
    I want to deploy web application which is developped using JAVA web technology into SAP netweaver Engine.
    I tried to deploy .war file through SDM but it complained the following error
    "Error loading archive
    C;\Document and Settings\cr1adm\Desktop\MyProject.war
      (server side name is: F:\usr\sap\JR1\JC01\SDM\program\temp\MyProject.war)
    com.sap.sdm.util.sduread.IIIFormattedSduFileException: The information about development component found in the manifest is either missing or incomplete!
    Manifest attributes are missing or have badly formatted value:
    attribute keylocation missing
    attribute keyname is missing
    attribute keyvendor is missing
    attribute keycounter is missing
    (F:\usr\sap\JR1\JC01\SDM\program\temp\MyProject.war)"
    Can any one please suggest how to deploy external web application into SAP netweaver engine.
    Is there any procedure to follow to do this.
    your inputs will be highly appreciated...
    Thanks in advance
    JM

    You may need to convert the .war archive to SDA/SCA file  format before deploying it to SAP Netweaver Engine.
    Check out the below SAP NOTE if it is usefull.
    Note 1223957 - Usage of NetWeaver Packaging Tool.
    Apart from SDM you can also deploy the files through telnet...
    Note 859444 - How to deploy libraries on J2EE Engine 6.40
    1)Connect to telnet as below
    Start --> Run
    telnet hostname/ip address portno
    Ex: telnet xxx.xx.xx.x 5<Instance no>08
    2)Login with administrator id:
    Use the below command to deploy the files.
    deploy <directory path to the SDAs location> version_rule=all on_prerequisite_error=stop on_deploy_error=stop
    Example: deploy E:\usr\sap\trans\EPS\in\VCBASE03_0-10006939.SCA version_rule=all on_prerequisite_error=stop on_deploy_error=stop.
    Also have a look at this note which talks about the error you are getting.
    Note 1171457 - IllFormattedSduManifest/SduFileException during deployment
    Hope it helps.
    Edited by: Khaiser Khan Mohammed on Nov 7, 2010 12:17 PM

  • ORACEL Test Manager for Web Applications' can not attach Objective document

    When attach a document in OTM (ORACEL Test Manager for Web Applications), click Attachments --> add and then click 'Add', in the 'Choose file' screen, there is an Icon with Objective, but when the Icon is selected, the error message "The current application is not compatible with WinTalk" appeared.
    We use a lot of document in Objective, can we make OTM compatible with Objective (WinTalk)

    When attach a document in OTM (ORACEL Test Manager for Web Applications), click Attachments --> add and then click 'Add', in the 'Choose file' screen, there is an Icon with Objective, but when the Icon is selected, the error message "The current application is not compatible with WinTalk" appeared.
    We use a lot of document in Objective, can we make OTM compatible with Objective (WinTalk)

  • How to set a root directory for file management in web application

    Is it possible to set a default root directory for file management for a web application ?
    We would upload some files and store them in the web server.
    When we write the uploaded files without any path, the files are written in the config directory into the jdeveloper embedded oc4j directory.
    When we write the uploaded with a relative path ("/somedir/filename"), the files are written in C:/somedir/filename.
    We would like that all file management with relative path into the web application refer automatically to a given root directory (for example defined in web.xml).
    Is it possible ?

    I'm using the standard upload in adf faces.
    The problem is not during upload. This is managed in a temporay directory defined in web.xml. The problem is for writing the file that was uploaded (upload give us an inputStream we have to write somewhere, eventually after unzipping).
    Here is an example of our current code.
    if (mimeType.equals("application/x-zip-compressed") |
    mimeType.equals("application/zip")) {
    File destZipFile =
    new File(rootDirectory + "/" + parametersDirectory +
    "/" + uploadedFile.getFilename());
    BufferedInputStream isZipFile =
    new BufferedInputStream(uploadedFile.getInputStream());
    FileOutputStream fosZipFile =
    new FileOutputStream(destZipFile);
    BufferedOutputStream bosZipFile =
    new BufferedOutputStream(fosZipFile, BUFFER);
    // read and write until last byte is encountered
    while ((currentByte = isZipFile.read(data, 0, BUFFER)) !=
    -1) {
    bosZipFile.write(data, 0, currentByte);
    }

  • How to integrate BeX Web Applications into Solution Manager

    Dear All,
    I am integrating the BeX Web Applications into Solution Manager. My Scenario is to add a button named 'Support' wherein when I click the button it should take me to the solman BSP Page. I have saved the two templates - oadhoc & 0adhoc_table by making it 'Z' and added a button in Zadhoc_table. but when I click the button it is not picking the values of an object from the first template.
    Kindly help me to get the solution.
    Best Regards,
    Priya

    Basis Team,
    Please check this document link:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ad0a4b07-0301-0010-5095-ef7615676fc0
    Hope this document link helps you.
    Thanks
    Mona

  • How to integrate custom web application within Fusion Environment?

    Hi all,
    I have created a simple custom web application with JDeveloper (11.1.1.6.2).
    From JDeveloper this application is running successfully through the IntegratedWebLogicServer connected with our Fusion Database.
    Now I want to integrate this custom web application within our our Fusion Environment (11.1.4).
    The final goal is to make it available inside the navigator menu in Fusion Applications.
    I need some guidance how to get this done.
    For example I have created an EAR-file. Where should this file be deployed?
    How can I create an entry in the navigation menu pointing to this web application?
    The web application should be handled just like seeded pages. (no additional security, login, etc.) How do I manage that?
    I have checked several Oracle Guides and forums (also blogs.oracle.com/fadevrel), but still it is not clear to me.
    Maybe I am on the wrong track, I don't know.
    Kind regards,
    Cor van Dongen

    How you deploy your EAR depends on the type of environment you have. For "OnSite" deployment you would need to contact the production system administrator to have your application deployed on the production WLS. The administrator would decide where and how the application is deployed, the process would be specific to the site.
    The security behavior depends on the configuration, e.g. when you enable security on your application various [url http://docs.oracle.com/cd/E14571_01/web.1111/b31974/adding_security.htm#BGBDEHFH]files are created / updated. When deployed to production these configurations need to be changed to suite the production instance, i.e. in development environments authentication is enforced by security constraints while in production this is achieved e.g. using OAM policies. The specific details depend on the instance.
    For Cloud environments you would need to deploy the application e.g. on [url https://cloud.oracle.com/mycloud/f?p=service:home:0]Java Cloud Service instance as applications cannot be deployed on the Cloud production instance.
    To integrate with the navigator menu refer to the [url http://docs.oracle.com/cd/E15586_01/fusionapps.1111/e16691/ext_nm.htm]Customizing the Navigator Menu documentation.
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

  • How to set up web application integration to use hotmail as my default email

    I use hotmail and/or yahoo for my email providers, but when I click on an email link on a website, nothing opens like it did with IE. The website says I can set this up through a "web application integration" but I cannot find instructions on how to do this anywhere. I checked out all the "options" under tools and can't find it. I'm sure it's simple but I can't find it, LOL

    http://support.mozilla.com/en-US/kb/Changing+the+e-mail+program+used+by+Firefox

  • How to create a Web Application when SQL is running in SQL Authentication mode ?

    Hi,
    I a have the following config:
    SQL server 2012 with mixed authentication, running in the LAN
    IIS server with SharePoint 2013 SP1, running in a DMZ --> SharePoint contacts the SQL server with a SQL login (not a Windows login, the required port has been opened in the FW)
    SharePoint is working fine but when I want to create a new Web Application, I get an error: "Could not connect to MySQLServer\MySQLInstance,MyPortnumber using integrated security: Cannot
    connect to database master at SQL server. The database might not exist, or the current user does not have permission to connect to it."
    I think, since I use SQL authentification,  I have to use PowerShell. I found a script on the Internet but this script was not made to create a Web App which a SharePoint installed with SQL authentication.
    Can you help to adapt the script ?
    Thks
    THE SCRIPT Documentation:
    New-SPWebApplication -ApplicationPool <String> -Name <String> [-AdditionalClaimProvider <SPClaimProviderPipeBind[]>] [-AllowAnonymousAccess <SwitchParameter>] [-ApplicationPoolAccount <SPProcessAccountPipeBind>]
    [-AssignmentCollection <SPAssignmentCollection>] [-AuthenticationMethod <String>] [-AuthenticationProvider <SPAuthenticationProviderPipeBind[]>] [-Confirm [<SwitchParameter>]] [-DatabaseCredentials <PSCredential>] [-DatabaseName
    <String>] [-DatabaseServer <String>] [-HostHeader <String>] [-Path <String>] [-Port <UInt32>] [-SecureSocketsLayer <SwitchParameter>] [-ServiceApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>] [-SignInRedirectProvider
    <SPTrustedIdentityTokenIssuerPipeBind>] [-SignInRedirectURL <String>] [-Url <String>] [-WhatIf [<SwitchParameter> ]] [<CommonParameters>]
    The Example:
    $siteName = “PowerShell for SharePoint”
    $port = 80
    $hostHeader = “lab.ps4sp.com”
    $url = “http://lab.ps4sp.com&#8221;
    $appPoolName = “PS4SPAppPool”
    $managedAccount = “PS4SPspservice”
    $dbServer = “PS-SQL”
    $dbName = “PS4SP_SP2010_LAB_ContentDB”
    $allowAnonymous = $true
    $authenticationMethod = “NTLM”
    $ssl = $false
    New-SPWebApplication -Name $siteName -Port $port -HostHeader $hostHeader -URL $url -ApplicationPool $appPoolName -ApplicationPoolAccount (Get-SPManagedAccount “$managedAccount”) -DatabaseName $dbName -DatabaseServer $dbServer -AllowAnonymousAccess: $allowAnonymous
    -AuthenticationMethod $authenticationMethod -SecureSocketsLayer:$ssl
    Charles

    Hi Scott,
    Based on your aticle, I changed my script by adding the credential, but I still have an error.
    Il also put the SQL specific port in the $dbServer variable.
    Any idea ?
    MY SCRIPT:
    $siteName = "TEST Site"
    $port = 80
    $hostHeader = "sharepoint.test.be"
    $url = "http://sharepoint.test.be"
    $appPoolName = "TestAppPool"
    $managedAccount = "DISNET\administrator"
    $authenticationMethod = "NTLM"
    $dbServer = "DSPORT-SQL02\DSPORTPRDEXT,50123"
    $dbName = "WSS_TEST_Content"
    $dbServer_secPassword = ConvertTo-SecureString "MySQLPassword" -AsPlaintext -Force
    $dbServer_Creds = New-Object System.Management.Automation.PsCredential "DMZSharePointLoginSQL", $dbServer_secPassword
    New-SPWebApplication -Name $siteName -Port $port -HostHeader $hostHeader -URL $url -ApplicationPool $appPoolName -ApplicationPoolAccount (Get-SPManagedAccount "$managedAccount") -AuthenticationMethod $authenticationMethod -DatabaseName
    $dbName -DatabaseServer $dbServer -DatabaseCredentials $dbServer_Creds
    Charles

  • How to get the web application root ?

    Hi,
    We are developing a JSP/Servlets web application for Weblogic 5.1, that is distributed as a WAR archive, and so far we are unable to determine the web application root dynamically (from within the code in a Servlet or class). We tryed the servletContext.getRealPath("/") method, but it is not working due to the fact that we are deploying the application as a WAR file.
    We need to have this app root at the application startup, because it is widely used inside the JSP pages and the servlets of the web application. Also we would like to avoid setting it as a static parameter in the web.xml or elsewhere.
    Does anyone know how to do that? Any hint or suggestion is very much appreciated!
    TIA
    Stefan Buynov

    Thanks for your reply.
    As I said in one of my early posts, this variable (the application root) i used widely in the application (not only in JSPs, but also in classes).
    Another problem will be including JSTL in the project - first of all, I will have to put this tag where the variable is required (it will be quite exhausting), and also the specification of the application is strict - I might not be able to add this tag library, since the client won't like it.
    Anyway, thanks for your concern.
    Regards,
    Stefan

  • MDS Configuration Manager Create Web Application = Unexpected Error, Keyset does not exist (HRESULT: 0x80090016)

    we are having Problems installing MDS on new sever.
    Server: Windows 2008 R2
    SQL Server 2012 SP1 (Developer Edition)
    In the Master Data Services Configuration Manager Wizard ...
    - DB Creation (Database Configuration) was succesfull
    - But we are stucked in the "Web Configuration", "Create Application" failes in both cases (Choose "Create new Website" or choose existing site like "Default Web Site")
    Error Message is alwasy:
    Unexpected Error - An unexpected error occurred: Keyset does not exist (Exception from HRESULT: 0x80090016)
    Any ideas? Are there any Extended logs created by Wizard activity? Windows Application Eventlog Shows nothing!

    Hi,
    Just a gut feel. The issue may lie within IIS. I base this upon the fact that your database was created. The second part, the web configuration  is related to IIS. SQL Server 2012 should be set up with IIS7 or better still IIS8.
    This said..
    Is IIS installed correctly? You can always de-install it and re-install it via the programs / windows features option off of the control panel.
    Out of curiosity, did you by any chance have a previous 'bad install' of MDS. If so this may be a registry issue. When one starts talking 'Keyset', the registry comes to mind. A orphan keyset which is being called.
    Also remember that in setting up the web application, that the installation will ask you for a User ID and password. If you are like us, our passwords change each 6 weeks and this create problems with bringing up the Master Data Manager AFTER a password
    change. In fact I have often resorted to creating a 'new web site' with each password change BEFORE I decided to opt for using a Process ID, with an non expiring password to do your web configuration.
    I do not know if I have answered your question, just a gut feel. Please do let us know if the steps that I mentioned resolve your issue.
    Sincerest regards
    Steve Simon SQL Server MVP

Maybe you are looking for