Local database reading edition

Detect no argument condition in a Servlet

Reconstructed from database records, not a captured original forum layout. Dates and display names are retained as recorded; timezone and real-world identity are not inferred. Historical advice, contact details and offers are not current. Original markup is shown as inert text.

Forum index · Java - Tips Of The Day

Opening post

Asha · 2001-07-17 12:30:45

<b>Servlet 2.3</b> <pre id=code><font face=courier size=2 id=code> int i = <b><i>req.getParameterMap().size()</i></b>; if (i = 0) { // no arguments } else { Enumeration paramNames = req.getParameterNames(); while(paramNames.hasMoreElements()) { String parm = (String)paramNames.nextElement(); // do something with this parm } } </font id=code></pre id=code> Asha Balasubramanyan http://www.ammu.org

Source notes

MyCommunity/nandighosha.org.zip!/forum/tools/snitz_forums_2000.mdb
Table: FORUM_TOPICS + FORUM_REPLY · record IDs: 229