|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.ibm.websphere.samples.i18nctx.currencyexchangewar.CurrencyServlet
public class CurrencyServlet
Field Summary | |
---|---|
protected AccInfoJBean |
accInfo
|
protected java.lang.String |
account
|
protected CustomerJBean |
customerInfo
|
protected static Exchange |
exc
|
static java.lang.String |
EXCHANGE_EJBHOME
|
protected ExchangeHome |
exchangeHome
|
protected java.util.Locale |
iLocale
|
protected com.ibm.websphere.i18n.context.InvocationInternationalization |
invI18n
|
protected java.lang.String |
name
|
protected java.lang.String |
password
|
protected com.ibm.websphere.i18n.context.UserInternationalization |
userI18n
|
static java.lang.String |
USERI18N_URL
|
Constructor Summary | |
---|---|
CurrencyServlet()
|
Method Summary | |
---|---|
protected void |
deposit(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method lets customers exchange US dollars by using other currencies. |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Process incoming HTTP GET requests. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Process incoming HTTP POST requests. |
double |
getRate(java.lang.String localeStr)
|
java.lang.String |
getServletInfo()
Return the servlet info string. |
void |
init()
Initialize this servlet. |
protected void |
moreExchange(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
verifyPrincipal(javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpServletRequest request)
Verify the customer's login and password. |
protected void |
withdraw(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method lets customers exchange other currencies by using US dollars. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected com.ibm.websphere.i18n.context.UserInternationalization userI18n
protected com.ibm.websphere.i18n.context.InvocationInternationalization invI18n
public static final java.lang.String USERI18N_URL
public static final java.lang.String EXCHANGE_EJBHOME
protected static Exchange exc
protected java.util.Locale iLocale
protected ExchangeHome exchangeHome
protected AccInfoJBean accInfo
protected CustomerJBean customerInfo
protected java.lang.String account
protected java.lang.String name
protected java.lang.String password
Constructor Detail |
---|
public CurrencyServlet()
Method Detail |
---|
public void init() throws javax.servlet.ServletException
Resolve all references enabling remote operation, including the JNDI initial context, any EJBs, and the Internationalization service API
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doGet
in class javax.servlet.http.HttpServlet
request
- Object that encapsulates the request to the servletresponse
- Object that encapsulates the response from the servlet
javax.servlet.ServletException
java.io.IOException
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doPost
in class javax.servlet.http.HttpServlet
request
- Object that encapsulates the request to the servlet.response
- Object that encapsulates the response from the servlet.
javax.servlet.ServletException
java.io.IOException
public void verifyPrincipal(javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException, java.io.IOException
response
- javax.servlet.http.HttpServletResponserequest
- javax.servlet.http.HttpServletRequest
javax.servlet.ServletException
java.io.IOException
protected void withdraw(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
request
- javax.servlet.http.HttpServletRequestresponse
- javax.servlet.http.HttpServletResponse
javax.servlet.ServletException
java.io.IOException
protected void deposit(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
request
- javax.servlet.http.HttpServletRequestresponse
- javax.servlet.http.HttpServletResponse
javax.servlet.ServletException
java.io.IOException
protected void moreExchange(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
public double getRate(java.lang.String localeStr)
public java.lang.String getServletInfo()
getServletInfo
in interface javax.servlet.Servlet
getServletInfo
in class javax.servlet.GenericServlet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |