<%@ page import="org.crosswire.xml.XMLRepo" %> <%@ page import="org.crosswire.community.data.User" %> <%@ page import="java.text.SimpleDateFormat" %> <% SimpleDateFormat profedit_df = new SimpleDateFormat("dd-MMM-yyyy"); User user = (User)session.getAttribute("user"); if (user == null) { out.print("Not Logged In."); return; } 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) user.setFullName(fullName); try {if (birthDate != null) user.setBirthdate(profedit_df.parse(birthDate));} catch (Exception e) {} if (country != null) user.setCountry(country); if (postalCode != null) user.setPostalCode(postalCode); if (homeURL != null) user.setHomeURL(homeURL); if (photosURL != null) user.setPhotosURL(photosURL); XMLRepo repo = XMLRepo.instance(pageContext); repo.save(user); %> Profile Saved.