RSS

Apache -The system cannot find the registry key for service ‘tomcat7’ error and solution

After the installation of tomcat7, when i click on “tomcat7w”, apache tomcat service is not started and it display following error:

Solution to these error is below :
1) go to the bin folder of your tomcat and run the following command through command line :

service.bat install
you will see the message “tomcat7 service installed”

2) Now run tomcat7w.exe through the command line and it should run successfully.

and

1)Use tomcat7w.exe to always start as an administrator.

2)Right click on the tomcat7w.exe which is in ‘bin’ folder of the tomcat installation.

3)Select ‘Properties’, then in ‘Compatibility’ tab under ‘Privilege Level’.

4)Select ‘Run this program as an administrator’.

Hope this helps thanks.

 
Leave a comment

Posted by on June 15, 2017 in Example

 

Solution of program asked in elluminati

class Program 
{
	public static void main(String args[])
	{
		int n=Integer.parseInt(args[0]);
		int s=0;
		for(int i=1;i<=n;i++)
		{
			s=s+i;
		}
		int d=n-1;
		
		int t=0;
		for(int i=1;i<=n;i++)
		{
			for(int j=1;j<=i;j++)
			{
				if(j==1)
				{
					t=s;
					s--;
				}
				else
				{
					t=t-d;
					d=d-1;
				}
				System.out.print(t + " ");
			}
			System.out.println("\n");
			d=n-1;
		}
	}
}

program

 
Leave a comment

Posted by on September 28, 2016 in Example

 

Resume making Website

Here are some good resume making website
https://www.canva.com/create/resumes/
https://www.visualcv.com/
https://www.kickresume.com/
https://enhancv.com/

 
Leave a comment

Posted by on August 17, 2016 in Material

 

WTAD Practical Sample Paper -3

WTAD Practical Sample Paper3

 
Leave a comment

Posted by on May 5, 2016 in Assignment

 

WTAD Practical Sample Paper -2

WTAD Practical Sample Paper2

 
Leave a comment

Posted by on May 5, 2016 in Assignment

 

WTAD Practical Sample Paper -1

WTAD Practical Sample Paper1

 
Leave a comment

Posted by on May 5, 2016 in Assignment

 

Example to generate JPG image

<%@ page import="java.awt.image.*,java.io.*,java.awt.*,javax.imageio.*" %>
<%
try
{
	response.setContentType("image/jpeg");
	OutputStream o=response.getOutputStream();
	BufferedImage obj =new BufferedImage(200,200,BufferedImage.TYPE_INT_RGB);
	Graphics2D g=(Graphics2D)obj.getGraphics();
	g.drawString("test",50,50);
	ImageIO.write(obj,"jpg",o);
	
}
catch(Exception e)
{
	System.out.println(e);
}

%>
 
Leave a comment

Posted by on April 6, 2016 in Example

 

Example of Programatic Security

<%@ page import="sun.misc.*" %>
<%! 
public void m1(HttpServletResponse res)
{
	res.setStatus(401);
	res.setHeader("WWW-Authenticate","BASIC realmname=enter username and password");
}
%>
<% 
	String s=request.getHeader("Authorization");
	if(s !=null)
	{
		String encodeddata =s.substring(6);

		BASE64Decoder obj=new BASE64Decoder();
		String up=new String(obj.decodeBuffer(encodeddata));

		String [] arr=up.split(":");
		if(arr[0].equals("ad") && arr[1].equals("ad") ) 
		{
			out.println("Welcome to the page" );
		}
		else
		{
			m1(response);
		}
	}
	else
	{
			m1(response);
	}
%>

 
Leave a comment

Posted by on April 5, 2016 in Example

 
Image

EL implicit Object

implicit Objects of EL

 
Leave a comment

Posted by on March 28, 2016 in Example

 

JSP EL – access to request parameters, cookies, and other request data

inputdemo.html

<html>
<body>
<form action="collection.jsp">
Enter your Name: 
<input type="text" name="nm" />
<select name="hobby" multiple >
	<option value="dance" > Dance </option>
	<option value="reading" > Reading </option>
	<option value="music" > Music  </option>
</select>
<input type="submit" value="ok"/>
</form>
</body>
</html>

collection.jsp

<body bgcolor="${(10>8)? 'pink' : 'YELLOW'}" >
EL implicit Object : <br>
==================
<br>Your name is : 
${param.nm} <br>
your hobbies are : 
${paramValues.hobby[0]}
${paramValues.hobby[1]}
${paramValues.hobby[2]} <br>

pageContext object :  <br>

Session : ${pageContext.session.id}  <br>
Method : ${pageContext.request.method} <br>

initParam : 
<!-- 
in web.xml 
<context-param>
  <param-name>AppID</param-name>
  <param-value>123</param-value>
  </context-param>
-->
${initParam.AppID}


<br>
Header : 
${header.Accept} <br> OR <br>
${header["Accept"]}  <br>
Cookie : 
${cookie.JSESSIONID.value}

<%
 pageContext.setAttribute("name", "mca");
 %>
 <br> Page Scope : 
 ${pageScope.name}

 
Leave a comment

Posted by on March 28, 2016 in Example