Stackoverflow

Friday, August 17, 2012

Installing Subversion on Apache server in Windows 7

Installing Apache Server

Download and Install the latest version of Apache server from http://httpd.apache.org/download.cgi. Choose the installer that includes OpenSSL (httpd-2.2.22-win32-x86-openssl-0.9.x.msi). Once downloaded, Run the installer with the admin privileges and chose the default options. It is recommended to install for all users on Port 80.





Now test if the Apache web server is running correctly by pointing your web browser to http://localhost/ - a pre-configured Website should show up.



Installing the Subversion
Download the latest Subversion Win32 binaries for Apache at http://subversion.apache.org/packages.html#windows. Run the subversion installer and follow the instructions. Allow the default options to be checked for installation. After the installation check if the bin path of the Subversion is added to the ‘Path’ system variable. If not, add them manually. After adding the path, go to the command prompt and check if the installation is success by typing ‘svn’ and press enter. The below message should be displayed if the installation is successful.


After checking the installation, copy the files ‘mod_dav_svn.so’ and ‘mod_authz_svn.so’ from Subversion’s bin directory (Usually C:\Program Files (x86)\Subversion\bin) to Apache’s module directory (Usually C:\Program Files (x86)\Apache Software Foundation\Apache2.2\modules).
Then Copy the file libdb*.dll and intl3_svn.dll from the Subversion bin directory to the Apache bin directory.

Edit the Apache's configuration file (usually C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\httpd.conf) with a text editor such as Notepad/Editplus and make the following changes:
We will admin privileges to make changes to this file. Right click on Notepad and select ‘Run as administrator’ and then open the httpd.conf file.

Uncomment the following lines:

#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule dav_module modules/mod_dav.so

Add the following two lines to the end of the LoadModule section.

LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

Create a repository using svnadmin

Use the svnadmin command to create the svn repository.
 

Configuration
After setting up the Apache and Subversion, we need to configure the Apache to make the Apache understand which URL will be used for repositories. To do this we need to edit the Apache configuration file (we will require administrator privileges).
The configuration file is usually located in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\httpd.conf.

At the end of the config file add the following lines:

<Location /svn>
  DAV svn
  SVNListParentPath on
  SVNParentPath D:\Repositories
  AuthType Basic
  AuthName "Subversion repositories"
  AuthUserFile passwd
  #AuthzSVNAccessFile svnaccessfile
  Require valid-user
</Location>

The above changes configure the Apache server so that all the Subversion repositories are physically located below D:\Repositories. The repositories are served to the outside world from the URL http://MyIp/svn/ Access is restricted to known users/passwords listed in the passwd file. To create the passwd file, open the command prompt and change to the Apache server folder (C:\Program Files (x86)\Apache Software Foundation\Apache2.2) and create the passwd file using the below command.
C:\Program Files (x86)\Apache Software Foundation\Apache2.2>bin\htpasswd -c passwd <your user name>
It will prompt for the user to enter the password and on entering the password, press enter and then retype the password and then again press enter. Now the user credential will be created. And  this can be used to access the svn.


After creating the user, restart the Apache server.


Try accessing the url http://localhost/svn/  from the browser, the browser will prompt for the user name and password, enter the user name and password you created




If the login is success then use the repository is displayed below


Use any of the svn clients like TortoiseSVN to access the repository and checkout in to a folder.

PS:
  • If the port 80 is already being used by some other application, you may get an error. So make sure that no application is using the port 80. To be more on the safer side, modify the ‘Listen 80’ line in the httpd.conf file to Listen 81 and restart the server. Now the link can be accessed from http://localhost:81/svn/
  • The system may be behind the proxy, so check if entry http-proxy-host and http-proxy-port in the file C:\Users\<User>\AppData<hidden folder>\Roaming\Subversion\servers is uncommented and the appropriate IP is configured.




Friday, August 12, 2011

Sticky Footer on Popup using javascript

There are many articles on the Internet about the sticky footer which can be implemented in a Html page. But i did not find any information about the sticky footer which can be implemented on a pop up window.

Here is how to that can be done.

create a javascript function that can be called on a event like onclick, onload etc.

function launchPopup(){
var width = 500; //Width of popup
var height = 400; //Height of popup

/* popup positioning based on height and width*/
var left = parseInt((screen.availWidth/2) - (width/2));
var top = parseInt((screen.availHeight/2) - (height/2));

var windowFeatures = "width=" + width + ",height=" + height + ",status=no,toolbar=no,resizable=no,scrollbars=yes,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top;

var actionURL = "Popup.jsp"; // Create a jsp or html file with the name
popWindow =window.open(actionURL,"", windowFeatures);
popWindow.document.write("<html>");
popWindow.document.write("<style type ='text/css'>");
popWindow.document.write(".containers { height : 340px;}");
popWindow.document.write("</style>");

popWindow.document.write("<body>");
popWindow.document.write("<div class = 'containers'>");
popWindow.document.write("// content for popup");
popWindow.document.write("</div>");
popWindow.document.write("<div align='center'>");
popWindow.document.write("//Footer Content Goes here");
popWindow.document.write("</div>");
popWindow.document.write("</body>");
popWindow.document.write("</html>");
popWindow.document.title="My Popup";

}



Wednesday, September 29, 2010

Cannot find bean: xxx in scope: xxx

Hi,


Few days back, i came across this error 'Cannot find bean: "myList" in scope: "session" ' while using a struts application. After hours of digging the code, i finally found the cause of the error. It was due to the value "myList" being set null in session.

According to HttpSession API,
If the value passed in is null, this has the same effect as calling removeAttribute()

To avoid the value null being set to the sessionAttributes, use the following snippet.

myList = myLogic.getList();
if(myList==null)
{
session.setAttribute("myList",new ArrayList());
}
else
{
session.setAttribute("myList",myList);
}

Thursday, August 27, 2009

Installation instructions for SOA 11g on Windows


SOA 11G Installation Procedures
The following are the list of files that are needed for installing SOA 11G
server103_win32.exe (WebLogic 10.3.1)
• OracleXEUniv.exe (Oracle XE 10.2.0.1)
• rcuHome.zip (For Creating Database schema )
• ofm_soa_generic_11.1.1.1.0_disk1_1of1.zip
• jdevstudio11111install.jar

The browsers supported are Firefox 3 or IE 7.
The Java JDK 1.6 update 11 must be used for using SOA 11G
The database can be any of the following versions 10.2.0.1 or 10g database version 10.2.0.4+ or 11g database version 11.1.0.7+. Other versions are not supported.
If there is a database that is already installed in the pc, uninstall it and the install the new database.
Make sure processes parameter in the database is >=200.

sqlplus sys/welcome1@XE as sysdba
SQL> show parameter session
SQL> show parameter processes
SQL> alter system reset sessions scope=spfile sid='*';
SQL> alter system set processes=200 scope=spfile;
SQL> shutdown immediate
SQL> startup
SQL> show parameter session
SQL> show parameter processes

Installing Weblogic Server 10.3.1

a) Click on the weblogic installation file and give the path where the software needs to be installed.

b) Click Next
c) Enter email to register for security alerts or deselect the checkbox and decline – whichever you prefer, click Next
d) Select Typical, click Next
e) Review installation directories

f) Click Next
g) Select “All Users” Start Menu folder, click Next
h) Review Summary

i) Click Next to start the installation process. Install takes about 3 minutes.
j) When the install is complete, deselect Quickstart checkbox and click Done.

Creating Schema for SOA

The Repository Creation Utility(RCU) can be started by opening
RCU_HOME/bin/rcu.bat command

1. Click Next


2. Select Drop
3. Click Next
4. Complete the database information

5. Click Next
6. The pre-requisites are reviewed and when completed, click OK. The utility moves to the next page – with a slight delay, just wait for it.
7. The utility finds the existing schema and offers the list. Check that the prefix is correct and review the schema.


8. Click Next.
9. The pre-requisites are reviewed and when completed, click OK.  The utility moves to the next page – with a slight delay, just wait for it.

10. The utility finds the existing schema and offers the list.  Check that the prefix is correct and review the schema.11. On the drop schema warning, click OK.
12. The pre-requisites for this step are reviewed. When completed, click OK to move to the next page – with a slight delay, just wait for it.
13. Click Drop to drop the schema. This takes about 5 minutes.
14. When it is finished, Click Done.

Configure Schema
15. Now create the new schema. Run the bat file to open the RCU.
The bat command returns to the prompt immediately and in a minute or so, the Repository Creation Utility opens.
16. On the welcome screen, click Next

17. Select Create and click Next

18. Enter the database information 


19. Click Next
20. The pre-requisites are reviewed. When complete, click OK. The utility moves to the next page – with a slight delay, just wait for it.

21. On the Select Components screen, enter SH in the field for creating a new prefix. Select the SOA Infrastruture component. Dependent schemas are selected automatically.


22. Click Next
23. The pre-requisites for this step are checked. When completed, click OK.
24. Select the radio button to Use the same password for all schemas. Enter the schema password, welcome1. If you choose instead to use a secure password or a different one for each schema, be sure to record your passwords as you will need them later.


25. Click Next
26. Review the tablespaces and schema owners for the components

27. Accepting the defaults, click Next and then click OK to create the tablespaces.
28. When the pre-requisites for this step are completed, click OK

29. Click Create to create the tablespaces. This takes about 2 minutes
30. When completed, click Close.
Install SOA
30. In a command window enter
 cd c:\stage\soa\Disk1

setup -jreLoc C:\Oracle\Middleware\home_LOAD16F\jdk160_11


When the install wizard welcome screen comes up, click Next
a) Wait for the pre-requisite check to complete
b) Click Next
c) On the Specify Installation Location screen, select the Middleware home: C:\Oracle\Middleware\
d) Enter Oracle home: Oracle_SOA1
If you use a different Oracle home then adjust accordingly when Oracle_SOA1 is referenced throughout this document.

e) Click Next
f) Review summary


g) Click Install
h) Wait for the install to complete – takes a few minutes
i) Click Finish
Create Domain
31. In a command window enter
cd C:\Oracle\Middleware\..\Oracle_SOA1\common\bin

config.cmd
a) When the install wizard welcome screen comes up, select Create a new WebLogic domain, select Next
b) Select Generate a domain and select SOA, EM, and BAM. Dependent products are selected automatically

c) Click Next
d) Enter the domain name: domain1

e) Click Next
f) Enter user name weblogic and password welcome1, confirm password. If you choose instead to use a secure password for the admin, adjust accordingly later in the document when the password is referenced.

g) Click Next
h) Select the Sun SDK 1.6_11 and leave Development Mode checked

i) Click Next
j) On the Configure JDBC Component Schema screen, with all of the components selected, enter welcome1 for the password in the Schema Password field.
k) With all of the checkboxes selected, enter the Service and Host names.


l) Review the Schema Owner field and confirm that they are the same as what you configured in the Configure Schema section when you ran the RCU. You can review the screen shots in that section of this document for the schema owners.
m) Complete the following if the schema owners need to be updated:
  1. Deselect all the component checkboxes and select BAM Schema.
  2. Enter the Schema Owner, SH_ORABAM
  3. Next, deselect BAM Schema and select the next one.
  4. Enter the schema owners one-by-one by pre-pending SH_ to the defaulted value. SH is the prefix specified in the RCU.
  5. Continue until all schema owners are entered (see screen shot).

n) Click Next.
o) The data source connections are all tested.

p) If all are successful, click Next, otherwise click Previous and correct any errors.
q) Click Next once more, accepting defaults (no optional configurations), and you reach the Configuration Summary screen.

r) Click Create.
s) Wait for the create to finish – takes just a minute

t) Click Done.

Saturday, May 23, 2009

Configuring svn server and creating Repository

SVN server setup:
• Install SVN 1.4.6 setup in to your local drive. I have installed in the following path “G:\SourceControl\Subversion”.
• Add bin path to environment variable PATH.
• PATH=“G:\SourceControl\Subversion\bin”.
























  • And add a system variable SVN_EDITOR.
  • SVN_EDITOR = “C:\Windows\notepad.exe”



  • In command prompt
  • Use svnadmin command to create a repository
svnadmin create “G:\SourceControl\svn\repodb”


Note: Before issuing the above command make sure that u create the respective folders


Use the svnserve command to start the svn service.



  • Uncomment the following lines in “G:\SourceControl\svn\repodb\conf\svnserv.conf” file and save it
anon-access = read
auth-access = write
password-db = passwd
  • Uncomment the following lines in “G:\SourceControl\svn\repodb\conf\passwd” file and save the file. We can also include our own user and password credentials
harry = harryssecret
sally = sallyssecret
  • Create a project by opening a second command window and entering this command
svn mkdir svn://localhost/cards

  • Comment in the Notepad that launches

  • Save and Exit the Notepad.
  • In the command window, give the windows password and either of the two login details.

  • If you have installed Tortoise SVN client in your machine, then right click on any folder to perform a checkout operation. Then all the files in the repository will be available in the folder which you have checked out.


Creating SVN Connection in JDeveloper 11G

In JDeveloper 11G, click on the versioning tag and select Subversion -->Check out
Give the svn location : svn://localhost/cards
Connection : sampleconncetion
Username: harry
Password: harryssecret
And test the connection.

Tuesday, April 28, 2009

Preface

From the beginning of the world to this day, mankind has always regarded prayer as an important duty and I am no different. I start of my proceedings by praying God almighty to give strength to the weak and spread peace throughout. Its hard to say Thanks to someone as it measures the amount of gratitude that one holds over the other. So I rather think about them in first place than to thank them. I have never thought of writing a blog which would lie around among the millions of worthy texts. But things which persuaded me in doing so are the thought of providing some information which one may search and end in vain.