<% // ID of text to edit String text_id = request.getParameter("text_id"); // Find which page it belongs to templates.textfield T = new templates.textfield(text_id); String page_id = T.getPage_id(); %>