Skip to content

Instantly share code, notes, and snippets.

View AKSarav's full-sized avatar
🎯
Focusing

AK Sarav AKSarav

🎯
Focusing
View GitHub Profile
@AKSarav
AKSarav / WeblogicREST-Examples
Created March 17, 2018 23:30
DeploymentTasks-WeblogicREST
deploy an application
---------------------
curl -v \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d "{
name: 'mwiapp',
applicationPath : '/apps/oracle-weblogic/applications/mwiapp.war',
targets: ['mwiCluster1'],
@AKSarav
AKSarav / WLPS.sh
Last active July 20, 2022 13:32
WLPS.sh
#!/bin/bash
#
#
#
BASE_DIR=`dirname $0`
SCRIPT=$0
_processinfo_()
@AKSarav
AKSarav / store.properties
Created December 29, 2017 20:58
store.properties
# set default flag to ON
# if you want to save the config & keyfile in default location
defaultflag=ON
username=weblogic
password=weblogic1
adminurl=t3://localhost:17001
# If the default flag is ON following variables will not be used
configfile=/tmp/mwidomain_configfile.secure
keyfile=/tmp/mwidomain_keyfile.secure
@AKSarav
AKSarav / storeuserconfig_v2.py
Created December 29, 2017 20:56
storeuserconfig_v2.py ( The Second One)
import sys
import os
import re
from os.path import exists
from sys import argv
def conn():
connect(USERNAME, PASSWORD, ADMINURL)
@AKSarav
AKSarav / storeuserconfig.py
Created December 29, 2017 20:55
storeuserconfig.py (The First One)
import time
import getopt
import sys
import re
def conn():
connect(USERNAME, PASSWORD, ADMINURL)
def usage():
toprint = '''
@AKSarav
AKSarav / web.xml
Created December 28, 2017 16:48
Logger-Filter-Application's web.xml file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>LoggerWebApp</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
@AKSarav
AKSarav / SnoopFilter.java
Created December 28, 2017 16:43
SnoopFilter.java
package com.logger.app;
import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
@AKSarav
AKSarav / domain.properties
Last active December 30, 2021 05:23
domain.properties
# Paths
mwhome=/apps/oracle-weblogic/wls12213
wlshome=/apps/oracle-weblogic/wls12213/wlserver
domainroot=/apps/oracle-weblogic/domains
approot=/apps/oracle-weblogic/applications
# Credentials
domain_name=mwidomain
domain_username=weblogic
domain_password=weblogic1
@AKSarav
AKSarav / wls_domain_creator.py
Last active April 24, 2019 16:56
wls_domain_creator.py
import sys
import os
from os.path import exists
from sys import argv
def get_script_path():
return os.path.dirname(os.path.realpath(sys.argv[0]))
def parsefile():
@AKSarav
AKSarav / appstate.sh
Created December 21, 2017 21:19
appstate.sh
#!/bin/bash
# Date: 12-21-2017
# Author: Sarav
# Name: appstate.sh
#
#
BASEDIR=`dirname $0`
SCRIPT_FILE=$BASEDIR"/appstate.py"
java weblogic.WLST $SCRIPT_FILE > appstate.out