<%@page contentType="text/html" import="pc.*,WebManager.*,java.io.*,java.util.*,javax.jdo.*"%> Recommendations page

Welcome to recommendation form

<% PersistenceManager pm = WebAppMngr.getPersistenceManager(); String btnDetails = request.getParameter("pDetails"); String btnURL = request.getParameter("url"); String ID = request.getParameter("categoryID"); try{ if ("submit details".equals(btnDetails)) { String pName = request.getParameter("sName").trim(); String pDesc = request.getParameter("sDesc").trim(); String pURL = request.getParameter("sURL").trim(); if ("".equals(pName)==false && "".equals(pDesc)==false && "".equals(pURL) == false) { if(pURL.indexOf("http://")!=0) pURL = "http://" + pURL; Object id = pm.newObjectIdInstance(Category.class,ID); Category category = (Category)pm.getObjectById(id, true); pm.currentTransaction().begin(); category.addItem(new Item(pName,pDesc,pURL)); pm.currentTransaction().commit(); %>success !<% } else { %>

All fields are required !

<% } } if ("submit URL".equals(btnURL)) { String url = request.getParameter("padURL").trim(); if ("".equals(url) == false) { if(url.indexOf("http://")!=0) url = "http://" + url; Object id = pm.newObjectIdInstance(Category.class,ID); Category category = (Category)pm.getObjectById(id, true); try{ System.setProperty("proxySet", "true"); System.setProperty("proxyHost", "10.0.1.254"); System.setProperty("proxyPort", "8080"); Item item = new Item(url); pm.currentTransaction().begin(); category.addItem(item); pm.currentTransaction().commit(); %>success !<% } catch(Exception x){ %>

Invalid pad file !

<% } } else { %>

you must input pad file URL !

<% } } Extent e = pm.getExtent(Category.class, false); Iterator itr = e.iterator();%>
Choose category :


Program name :
Website url :
Description :
* All the fields are required


You can use Pad file URL :   

<%if (ID == null){%>
<%}%> Home page <% itr = e.iterator(); while(itr.hasNext()) { Category cat = (Category)itr.next(); %> | <%= cat %> <%} e.closeAll(); %> | Contact me
<%} catch(Exception x){ %>SYSTEM IS BUSY , TRY LATER ....
Home page , refresh <%} finally{ if(pm.currentTransaction().isActive()) { pm.currentTransaction().rollback(); } pm.close(); }%>