import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.mxchange.jshopcore.model.receipt.ReceiptBeanRemote;
+import org.mxchange.jshopcore.model.receipt.WrapableReceipt;
/**
* A servlet for a PDF receipt (official)
/**
* Remote bean
*/
- private final ReceiptBeanRemote receipt;
+ private final ReceiptBeanRemote receiptBean;
/**
* Public constructor
Context context = new InitialContext();
// Set instance
- this.receipt = (ReceiptBeanRemote) context.lookup("ejb/pdf-receipt");
+ this.receiptBean = (ReceiptBeanRemote) context.lookup("ejb/pdf-receipt"); //NOI18N
} catch (final NamingException e) {
// Throw again
throw new FaceletException(e);
@Override
protected void doGet (final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
// Is the key set?
- if (request.getParameter("key") == null) {
+ if (request.getParameter("key") == null) { //NOI18N
// No more processing here
super.doGet(request, response);
return;
}
// Get PDF from bean
+ WrapableReceipt receipt = this.receiptBean.createReceiptFromAccessKey(request.getParameter("key")); //NOI18N
+
+ // TODO Write it's content to response output
}
@Override