Welcome

KU 5TH SEM PRACTICAL SOLUTIONS

Set 1

//1. Open an Image. And separate background using selection tool.
Step 1: run Photoshop
Step 2: go to file menu -> open 
Step 3: select image ->click open
Step 4: click on magic wand tool from tool menu
Step 5: select on background of the image using magic wand tool
Step 6: press delete on keyboard
Step 7: go to file menu -> save as
Step 8: select JPEG format
Step 9: enter file name -> click SAVE

//2. Write a JSP page to display the number of hits to this page. (Hint: use application scope of java bean).
<%@ page session="false" %>
<HTML>
<HEAD>
<TITLE>Page Counter Using URL Rewriting</TITLE>
</HEAD>
<BODY>
<H3>Page Counter Using URL Rewriting</H3>
<%
int count = 0;
String parm = request.getParameter("count");
if (parm != null)
count = Integer.parseInt(parm);
if (count == 0) {
%> This is the first time you have accessed this page. <%
}
else if (count == 1) {
%> You have accessed the page once before.<%
}
else {
%> You have accessed the page <%= count %> times before.<%
}
%>
<P> Click
<A HREF="urlrewriting.jsp?count=<%=count + 1 %>"
>here</A> to visit the page again.
</BODY>
</HTML>