<%@ page import="org.crosswire.xml.XMLRepo" %> <%@ page import="org.crosswire.community.data.User" %> <%@ page import="java.text.SimpleDateFormat" %> <% { SimpleDateFormat df = new SimpleDateFormat("dd-MMM-yyyy"); String sid=request.getParameter("sid"); XMLRepo repo = XMLRepo.instance(pageContext); User profedit_user = (User)session.getAttribute("user"); if (profedit_user == null) { out.print("Not Logged In."); return; } if (sid != null) { profedit_user = (User)repo.get(new User(profedit_user.getID(), sid)); } String fullName = request.getParameter("fullname"); String birthDate = request.getParameter("bdate"); String country = request.getParameter("country"); String postalCode = request.getParameter("postalcode"); String homeURL = request.getParameter("homeurl"); String photosURL = request.getParameter("photosurl"); if (fullName != null) profedit_user.setFullName(fullName); try {if (birthDate != null) profedit_user.setBirthdate(df.parse(birthDate));} catch (Exception e) {} if (country != null) profedit_user.setCountry(country); if (postalCode != null) profedit_user.setPostalCode(postalCode); if (homeURL != null) profedit_user.setHomeURL(homeURL); if (photosURL != null) profedit_user.setPhotosURL(photosURL); repo.save(profedit_user); } %> Profile Saved.