Friday 11 October 2013

Modes and Options of Installation




The IS-Pro executables supports the following modes of installation.
  • GUI Mode - Interactive + GUI
  • Silent Mode - Non-Interactive + Non-GUI

Let us assume that the name of the executable file is Setup.exe

1.1 GUI Mode


By default, all our product installers are configured to run in GUI mode. To run the installer in GUI mode, execute the command

Setup.exe

in commmand prompt (or) click on the exe file in the explorer.


1.2 Silent Mode


Steps to be followed to install IS-Pro installer in Silent Mode.

Create a response file using GUI mode for both Installer and Uninstaller.
Invoke the installer in silent mode with required options and supply the created response file as an argument.

1.2.1 Creating Response File


A normal(GUI) setup receives the necessary input from the user in the form of responses to dialog boxes. However, a silent setup does not prompt the user for input. A silent setup must gets its user input from a different source, which is nothing but the InstallShield Silent response file(.iss).

To create a response file, execute the following command.

Setup.exe -a -r
This command will create a response file named Setup.iss in WINDIR (C:\WINNT).

Setup.exe -a -r -f1<response file path>
 
Where <response file path> is the path of the response file, such that the directory of the mentioned path should exist.
Please note that there should be no space char in between the option -f1 and the <responsefilepath>.
Ex: Setup.exe -a -r -f1C:\ISdemo\install.iss
Please ensure that the directory C:\ISdemo is exists.


1.2.2 Response File Usage


Steps to use the response file to run the installer in silent mode.
Create the response file as said in section 1.2.1
Edit the response file to specify the installlocation and other responses.
run the following command

Setup.exe -s -a -s -f1<response file path>

Ex: Setup.exe -s -a -s -f1C:\ISdemo\install.iss

 

Friday 20 September 2013

Troubleshooting silent installation

 InstallShield uses result codes to indicate the status of a silent installation process. A result code of 0 indicates success. Any other result code indicates that the silent installation failed.

To determine the status of your silent installation process, check the setup.log file. The [ResponseResult] contains one of the below given result codes.

0 Success.

-1 General error.

-2 Invalid mode.

-3 Required data not found in the Setup.iss file.

-4 Not enough memory available.

-5 File does not exist.

-6 Cannot write to the response file.

-7 Unable to write to the log file.

-8 Invalid path to the InstallShield Silent response file.

-9 Not a valid list type (string or number).

-10 Data type is invalid.

-11 Unknown error during setup.

-12 Dialog boxes are out of order.

-51 Cannot create the specified folder.

-52 Cannot access the specified file or folder.

-53 Invalid option selected.


Command to create the log file during the silent installation:-

/f2<path\LogFile> or -f2<path\LogFile>

Specifies an alternate location and name of the log file created by InstallShield Silent. By default, Setup.log log file is created and stored in the same directory as that of Setup.iss.

Get Absolute path of a url in JAVA or JSP



We can use ServletContext.getRealPath(), to get the absolute path of the given URL.

Example:-

<% String path = request.getRealPath("/");

out.println("Real path: " + path);

%>

Result:-

Real path: C:\Program Files (x86)\Apache Software Foundation\Tomcat 5.5\webapps\ROOT



Note that it does not necessarily work in all situations. For example, if your Tomcat is configured to deploy the .war file without unpacking it, then this will return null.

Thursday 19 September 2013

Define Java mehtods in JSP pages

  Each JSP compiles to a separate class, so there are classes involved. If you are reusing the code chunks in the same JSP, then you can declare a method to appear in the JSP class. The JSP Declarations are used to declare variables and methods in the scripting language used in a JSP page. A declaration should be a complete declarative statement, or sequence thereof according to the syntax of the scripting language specified. The JSP declaration syntax is:

<%! declaration(s) %>
  • Declarations do not produce any output into the current out stream.
  • Declarations are initialized when the JSP page is initialized and are made available to other declarations, scriptlets, and expressions.
  • Declarations declare methods global to the page.
Example:-

<%!

public String getMsg(String name){
String msg="Hi";
msg=msg+" "+name;
return msg;
}

%>

You can then invoke the function within scriptlets or expressions:
<%= getMsg("Ram") %>

Thursday 7 April 2011

In Windows 2008 server some of the process are not killed properly

I installed my product in Windows 2008 server. Even though   my product's service was stopped , some of   process are not killed properly. so I tried to kill the process with help of task-manager, on that time I got the Access denied error.
So I tried with the command taskkill to kill the process.

In command prompt type taskkill /? ,It will give the usage of the command 

I tired to kill the process using process ID so I used the option /PID

>taskkill /PID  18684

Here 18684 is a process ID of the process.
After executing the command,I got the message like

 "ERROR: The process with PID 18684 could not be terminated.
Reason: This process can only be terminated forcefully ( with /F option ).
"

So I tried the option with /F
>taskkill /PID  18684 /F /T

/T used to kill the child process of the specified process  ID

Now the processes are killed successfully.and I got the success message.

"SUCCESS: The process with PID 18684 has been terminated. "



Wednesday 16 February 2011

sun.tools.javac.Main has been deprecated.

 Today I faced the error "Note: sun.tools.javac.Main has been deprecated." while call one java method from jsp file.

It is not an error but only a warning. I thought this warning was occur due to that version mismatch.
I compiled the java file with jdk1.5 but in the apche server use jdk1.4 for execute java class file for that reason  I faced the warnings.

The warning was solved,after complied  the java with jdk1.4 version.

Tuesday 15 February 2011

java.lang.IllegalStateException: Can't sendRedirect() after data has committed to the client.

The error "java.lang.IllegalStateException: Can't sendRedirect() after data has committed to the client." was occur due to the jsp sendredirect method was called in between the html code implemention.

Example:

<html>
<body>
<%
while (result.next()) {
           if (result.wasNull()) {
               response.sendRedirect("login.jsp");
           }
           else {
               response.sendRedirect("home.jsp"); 
           }
        }
%>
</body>
</html>

To solve this problem :

  you can make is to be sure that this code(jsp redirection) occurs before any html is written.

Example :


<%
while (result.next()) {
           if (result.wasNull()) {
               response.sendRedirect("login.jsp");
           }
           else {
               response.sendRedirect("home.jsp"); 
           }
        }
%>
<html>
<body>
.......

</body>
</html>


I hope this will be help for solve the java.lang.IllegalStateException: Can't sendRedirect() after data has committed to the client exception.