| | |
| | | */ |
| | | package de.uhilger.transit.web; |
| | | |
| | | import de.uhilger.transit.JavaServer; |
| | | import de.uhilger.transit.JsonFlatWandler; |
| | | import de.uhilger.transit.JsonWandler; |
| | | import de.uhilger.transit.NutzerKontext; |
| | | import de.uhilger.transit.XmlWandler; |
| | | import javax.servlet.ServletException; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import de.uhilger.transit.*; |
| | | |
| | | /** |
| | | * Das TransitServlet macht beliebige Klassen und Methoden ueber HTTP |
| | |
| | | while (en.hasMoreElements()) { |
| | | String pName = en.nextElement().toString(); |
| | | String[] pWerte = req.getParameterValues(pName); |
| | | if (pName.equals(CLASS_NAME)) { |
| | | klassenName = pWerte[0]; |
| | | } else if (pName.equals(METHOD_NAME)) { |
| | | methodenName = pWerte[0]; |
| | | } else if (pName.equals(FORMAT_NAME)) { |
| | | formatName = pWerte[0]; |
| | | } else { |
| | | for (int i = 0; i < pWerte.length; i++) { |
| | | parameterListe.add(pWerte[i]); |
| | | } |
| | | switch (pName) { |
| | | case CLASS_NAME: |
| | | klassenName = pWerte[0]; |
| | | break; |
| | | case METHOD_NAME: |
| | | methodenName = pWerte[0]; |
| | | break; |
| | | case FORMAT_NAME: |
| | | formatName = pWerte[0]; |
| | | break; |
| | | default: |
| | | for (String pWerte1 : pWerte) { |
| | | parameterListe.add(pWerte1); |
| | | } break; |
| | | } |
| | | } |
| | | Object[] parameter = parameterListe.toArray(new Object[0]); |