snipt

Ctrl+h for KB shortcuts

Java Server Page

Servlet to jsp forward

1
2
3
String nextJSP = "/somepage.jsp";
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(nextJSP);
dispatcher.forward(request,response);
https://snipt.net/embed/db25fe78ee7e683bfd4718c49b28af6b/
/raw/db25fe78ee7e683bfd4718c49b28af6b/
db25fe78ee7e683bfd4718c49b28af6b
jsp
Java Server Page
4
2019-08-24T06:30:08
True
False
False
/api/public/snipt/13839/
servlet-to-jsp-forward
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>String nextJSP = &quot;/somepage.jsp&quot;; </span><span id="L-2"><a name="L-2"></a>RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(nextJSP); </span><span id="L-3"><a name="L-3"></a>dispatcher.forward(request,response); </span></pre></div> </td></tr></table>
forward, jsp, servlet

Java Server Page

currency conversion api

1
2
3
http://finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s=FROMTO=X

// replace FROMTO with appropriate values. ex : INRUSD will convert INR to USD
https://snipt.net/embed/bd1db8fe96b7cc912b1b4a26f1e2978a/
/raw/bd1db8fe96b7cc912b1b4a26f1e2978a/
bd1db8fe96b7cc912b1b4a26f1e2978a
jsp
Java Server Page
3
2019-08-19T01:33:06
True
False
False
/api/public/snipt/13818/
currency-conversion-api
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>http://finance.yahoo.com/d/quotes.csv?e=.csv<span class="err">&amp;</span>f=sl1d1t1<span class="err">&amp;</span>s=FROMTO=X </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>// replace FROMTO with appropriate values. ex : INRUSD will convert INR to USD </span></pre></div> </td></tr></table>
"currency conversion", api, conversion, yahoo

Java Server Page

tomcat startup shutdown

tomcatdirectory/bin/startup.sh
tomcatdirectory/bin/shutdown.sh
https://snipt.net/embed/21be09838362d7470361e1e99461da39/
/raw/21be09838362d7470361e1e99461da39/
21be09838362d7470361e1e99461da39
jsp
Java Server Page
2
2019-08-25T03:07:47
True
False
False
/api/public/snipt/13817/
tomcat-startup-shutdown
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>tomcatdirectory/bin/startup.sh </span><span id="L-2"><a name="L-2"></a>tomcatdirectory/bin/shutdown.sh </span></pre></div> </td></tr></table>
jsp, tomcat