JSP not executing the java code
Hello there.
my m/c: tru64 unix
Apache version: 2.0
tomcat version: 4.0.5
browser version: IE5
I have index.jsp as
=======
<HTML>
<HEAD>
<TITLE> Vimala's JSP </TITLE>
</HEAD>
<BODY>
Hello <%= request.getParameter ("name") %>
<%
for (int i=1; i < 5; i++)
out.print ("<BR> Sample JSP loop");
%>
<FORM METHOD=POST ACTION="vimala.jsp">
Enter nothing
<INPUT TYPE=TEXTAREA NAME=name>
<BR><BR><INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
=======
The above neither prints the getParameter ("name") as passed in URL nor it prints the "for loop" values.
However the html related things such as title and Form are properly displayed in the browser.
I think I'm missing something in the tomcat (server.xml) or apache (httpd.conf) configurations. Your inputs to solve my problem is very much appreciated.
Thank you,
Vimala.
Please find the web.xml here.
==============web.xml start==============
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<!-- ======================== Introduction ============================== -->
<!-- This document defines default values for all web applications -->
<!-- loaded into this instance of Tomcat. As each application is -->
<!-- deployed, this file is processed, followed by the -->
<!-- "/WEB-INF/web.xml" deployment descriptor from your own -->
<!-- applications. -->
<!-- ================== Built In Servlet Definitions ==================== -->
<!-- The default servlet for all web applications, that serves static -->
<!-- resources. It processes all requests that are not mapped to other -->
<!-- servlets with servlet mappings (defined either here or in your own -->
<!-- web.xml file. This servlet supports the following initialization -->
<!-- parameters (default values are in square brackets): -->
<!-- -->
<!-- debug Debugging detail level for messages logged -->
<!-- by this servlet. [0] -->
<!-- -->
<!-- input Input buffer size (in bytes) when reading -->
<!-- resources to be served. [2048] -->
<!-- -->
<!-- listings Should directory listings be produced if there -->
<!-- is no welcome file in this directory? [true] -->
<!-- -->
<!-- output Output buffer size (in bytes) when writing -->
<!-- resources to be served. [2048] -->
<!-- -->
<!-- readonly Is this context "read only", so HTTP -->
<!-- commands like PUT and DELETE are -->
<!-- rejected? [true] -->
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- The "invoker" servlet, which executes anonymous servlet classes -->
<!-- that have not been defined in a web.xml file. Traditionally, this -->
<!-- servlet is mapped to URL pattern "/servlet/*", but you can map it -->
<!-- to other patterns as well. The extra path info portion of such a -->
<!-- request must be the fully qualified class name of a Java class that -->
<!-- implements Servlet (or extends HttpServlet), or the servlet name -->
<!-- of an existing servlet definition. This servlet supports the -->
<!-- following initialization parameters (default values are in square -->
<!-- brackets): -->
<!-- -->
<!-- debug Debugging detail level for messages logged -->
<!-- by this servlet. [0] -->
<servlet>
<servlet-name>invoker</servlet-name>
<servlet-class>org.apache.catalina.servlets.InvokerServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- The JSP page compiler and execution servlet, which is the mechanism -->
<!-- used by Tomcat to support JSP pages. Traditionally, this servlet -->
<!-- is mapped to URL patterh "*.jsp". This servlet supports the -->
<!-- following initialization parameters (default values are in square -->
<!-- brackets): -->
<!-- -->
<!-- classpath What class path should I use while compiling -->
<!-- generated servlets? [Created dynamically -->
<!-- based on the current web application] -->
<!-- -->
<!-- classdebuginfo Should the class file be compiled with -->
<!-- debugging information? [false] -->
<!-- -->
<!-- ieClassId The class-id value to be sent to Internet -->
<!-- Explorer when using <jsp:plugin> tags. -->
<!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
<!-- -->
<!-- jspCompilerPlugin The fully qualified class name of the JSP -->
<!-- compiler plug-in to be used. See below for -->
<!-- more information. -->
<!-- [Use internal JDK compiler] -->
<!-- -->
<!-- keepgenerated Should we keep the generated Java source code -->
<!-- for each page instead of deleting it? [true] -->
<!-- -->
<!-- largefile Should we store the static content of JSP -->
<!-- pages in external data files, to reduce the -->
<!-- size of the generated servlets? [false] -->
<!-- -->
<!-- logVerbosityLevel The level of detailed messages to be produced -->
<!-- by this servlet. Increasing levels cause the -->
<!-- generation of more messages. Valid values are -->
<!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
<!-- [WARNING] -->
<!-- -->
<!-- mappedfile Should we generate static content with one -->
<!-- print statement per input line, to ease -->
<!-- debugging? [false] -->
<!-- -->
<!-- scratchdir What scratch directory should we use when -->
<!-- compiling JSP pages? [default work directory -->
<!-- for the current web application] -->
<!-- -->
<!-- If you wish to use Jikes to compile JSP pages: -->
<!-- * Set the "classpath" initialization parameter appropriately -->
<!-- for this web application. -->
<!-- * Set the "jspCompilerPlugin" initialization parameter to -->
<!-- "org.apache.jasper.compiler.JikesJavaCompiler". -->
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>logVerbosityLevel</param-name>
<param-value>WARNING</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
<!-- Server Side Includes processing servlet, which processes SSI -->
<!-- directives in HTML pages consistent with similar support in web -->
<!-- servers like Apache. Traditionally, this servlet is mapped to -->
<!-- URL pattern "*.shtml". This servlet supports the following -->
<!-- initialization parameters (default values are in square brackets): -->
<!-- -->
<!-- buffered Should output from this servlet be buffered? -->
<!-- (0=false, 1=true) [0] -->
<!-- -->
<!-- debug Debugging detail level for messages logged -->
<!-- by this servlet. [0] -->
<!-- -->
<!-- expires The number of seconds before a page with SSI -->
<!-- directives will expire. [No default] -->
<!-- -->
<!-- isVirtualWebappRelative -->
<!-- Should "virtual" paths be interpreted as -->
<!-- relative to the context root, instead of -->
<!-- the server root? (0=false, 1=true) [0] -->
<!-- -->
<!-- ignoreUnsupportedDirective -->
<!-- Should unknown or misspelled Ssi directives -->
<!-- be ignored and no errors shown? -->
<!-- (0=false, 1=true) [1] -->
<!-- IMPORTANT: To use the CGI servlet, you also need to rename the -->
<!-- $CATALINA_HOME/server/lib/servlets-ssi.renametojar file -->
<!-- to $CATALINA_HOME/server/lib/servlets-ssi.jar -->
<!--
<servlet>
<servlet-name>ssi</servlet-name>
<servlet-class>org.apache.catalina.servlets.SsiInvokerServlet</servlet-class>
<init-param>
<param-name>buffered</param-name>
<param-value>1</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>expires</param-name>
<param-value>666</param-value>
</init-param>
<init-param>
<param-name>isVirtualWebappRelative</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>ignoreUnsupportedDirective</param-name>
<param-value>1</param-value>
</init-param>
<load-on-startup>4</load-on-startup>
</servlet>
-->
<!-- Common Gateway Includes (CGI) processing servlet, which supports -->
<!-- execution of external applications that conform to the CGI spec -->
<!-- requirements. Typically, this servlet is mapped to the URL pattern -->
<!-- "/cgi-bin/*", which means that any CGI applications that are -->
<!-- executed must be present within the web application. This servlet -->
<!-- supports the following initialization parameters (default values -->
<!-- are in square brackets): -->
<!-- -->
<!-- cgiPathPrefix The CGI search path will start at -->
<!-- webAppRootDir + File.separator + this prefix. -->
<!-- [WEB-INF/cgi] -->
<!-- -->
<!-- clientInputTimeout The time (in milliseconds) to wait for input -->
<!-- from the browser before assuming that there -->
<!-- is none. [100] -->
<!-- -->
<!-- debug Debugging detail level for messages logged -->
<!-- by this servlet. [0] -->
<!-- IMPORTANT: To use the CGI servlet, you also need to rename the -->
<!-- $CATALINA_HOME/server/lib/servlets-cgi.renametojar file -->
<!-- to $CATALINA_HOME/server/lib/servlets-cgi.jar -->
<!--
<servlet>
<servlet-name>cgi</servlet-name>
<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
<init-param>
<param-name>clientInputTimeout</param-name>
<param-value>100</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>6</param-value>
</init-param>
<init-param>
<param-name>cgiPathPrefix</param-name>
<param-value>WEB-INF/cgi</param-value>
</init-param>
<load-on-startup>5</load-on-startup>
</servlet>
-->
<!-- ================ Built In Servlet Mappings ========================= -->
<!-- The servlet mappings for the built in servlets defined above. Note -->
<!-- that, by default, the CGI and SSI servlets are not mapped. You -->
<!-- must uncomment these mappings (or add them to your application's own -->
<!-- web.xml deployment descriptor) to enable these services -->
<!-- The mapping for the default servlet -->
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<!-- The mapping for the invoker servlet -->
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
<!-- The mapping for the JSP servlet -->
<servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>
<!-- The mapping for the SSI servlet -->
<!--
<servlet-mapping>
<servlet-name>ssi</servlet-name>
<url-pattern>*.shtml</url-pattern>
</servlet-mapping>
-->
<!-- The mapping for the CGI Gateway servlet -->
<!--
<servlet-mapping>
<servlet-name>cgi</servlet-name>
<url-pattern>/cgi-bin/*</url-pattern>
</servlet-mapping>
-->
<!-- ==================== Default Session Configuration ================= -->
<!-- You can set the default session timeout (in minutes) for all newly -->
<!-- created sessions by modifying the value below. -->
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<!-- ===================== Default MIME Type Mappings =================== -->
<!-- When serving static resources, Tomcat will automatically generate -->
<!-- a "Content-Type" header based on the resource's filename extension, -->
<!-- based on these mappings. Additional mappings can be added here (to -->
<!-- apply to all web applications), or in your own application's web.xml -->
<!-- deployment descriptor. -->
<mime-mapping>
<extension>abs</extension>
<mime-type>audio/x-mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ai</extension>
<mime-type>application/postscript</mime-type>
</mime-mapping>
<mime-mapping>
<extension>aif</extension>
<mime-type>audio/x-aiff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>aifc</extension>
<mime-type>audio/x-aiff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>aiff</extension>
<mime-type>audio/x-aiff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>aim</extension>
<mime-type>application/x-aim</mime-type>
</mime-mapping>
<mime-mapping>
<extension>art</extension>
<mime-type>image/x-jg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>asf</extension>
<mime-type>video/x-ms-asf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>asx</extension>
<mime-type>video/x-ms-asf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>au</extension>
<mime-type>audio/basic</mime-type>
</mime-mapping>
<mime-mapping>
<extension>avi</extension>
<mime-type>video/x-msvideo</mime-type>
</mime-mapping>
<mime-mapping>
<extension>avx</extension>
<mime-type>video/x-rad-screenplay</mime-type>
</mime-mapping>
<mime-mapping>
<extension>bcpio</extension>
<mime-type>application/x-bcpio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>bin</extension>
<mime-type>application/octet-stream</mime-type>
</mime-mapping>
<mime-mapping>
<extension>bmp</extension>
<mime-type>image/bmp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>body</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cdf</extension>
<mime-type>application/x-cdf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cer</extension>
<mime-type>application/x-x509-ca-cert</mime-type>
</mime-mapping>
<mime-mapping>
<extension>class</extension>
<mime-type>application/java</mime-type>
</mime-mapping>
<mime-mapping>
<extension>cpio</extension>
<mime-type>application/x-cpio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>csh</extension>
<mime-type>application/x-csh</mime-type>
</mime-mapping>
<mime-mapping>
<extension>css</extension>
<mime-type>text/css</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dib</extension>
<mime-type>image/bmp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>doc</extension>
<mime-type>application/msword</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dtd</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dv</extension>
<mime-type>video/x-dv</mime-type>
</mime-mapping>
<mime-mapping>
<extension>dvi</extension>
<mime-type>application/x-dvi</mime-type>
</mime-mapping>
<mime-mapping>
<extension>eps</extension>
<mime-type>application/postscript</mime-type>
</mime-mapping>
<mime-mapping>
<extension>etx</extension>
<mime-type>text/x-setext</mime-type>
</mime-mapping>
<mime-mapping>
<extension>exe</extension>
<mime-type>application/octet-stream</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gif</extension>
<mime-type>image/gif</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gtar</extension>
<mime-type>application/x-gtar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gz</extension>
<mime-type>application/x-gzip</mime-type>
</mime-mapping>
<mime-mapping>
<extension>hdf</extension>
<mime-type>application/x-hdf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>hqx</extension>
<mime-type>application/mac-binhex40</mime-type>
</mime-mapping>
<mime-mapping>
<extension>htc</extension>
<mime-type>text/x-component</mime-type>
</mime-mapping>
<mime-mapping>
<extension>htm</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>hqx</extension>
<mime-type>application/mac-binhex40</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ief</extension>
<mime-type>image/ief</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jad</extension>
<mime-type>text/vnd.sun.j2me.app-descriptor</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jar</extension>
<mime-type>application/java-archive</mime-type>
</mime-mapping>
<mime-mapping>
<extension>java</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jnlp</extension>
<mime-type>application/x-java-jnlp-file</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jpe</extension>
<mime-type>image/jpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jpeg</extension>
<mime-type>image/jpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jpg</extension>
<mime-type>image/jpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>js</extension>
<mime-type>text/javascript</mime-type>
</mime-mapping>
<mime-mapping>
<extension>kar</extension>
<mime-type>audio/x-midi</mime-type>
</mime-mapping>
<mime-mapping>
<extension>latex</extension>
<mime-type>application/x-latex</mime-type>
</mime-mapping>
<mime-mapping>
<extension>m3u</extension>
<mime-type>audio/x-mpegurl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mac</extension>
<mime-type>image/x-macpaint</mime-type>
</mime-mapping>
<mime-mapping>
<extension>man</extension>
<mime-type>application/x-troff-man</mime-type>
</mime-mapping>
<mime-mapping>
<extension>me</extension>
<mime-type>application/x-troff-me</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mid</extension>
<mime-type>audio/x-midi</mime-type>
</mime-mapping>
<mime-mapping>
<extension>midi</extension>
<mime-type>audio/x-midi</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mif</extension>
<mime-type>application/x-mif</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mov</extension>
<mime-type>video/quicktime</mime-type>
</mime-mapping>
<mime-mapping>
<extension>movie</extension>
<mime-type>video/x-sgi-movie</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mp1</extension>
<mime-type>audio/x-mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mp2</extension>
<mime-type>audio/x-mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mp3</extension>
<mime-type>audio/x-mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpa</extension>
<mime-type>audio/x-mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpe</extension>
<mime-type>video/mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpeg</extension>
<mime-type>video/mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpega</extension>
<mime-type>audio/x-mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpg</extension>
<mime-type>video/mpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mpv2</extension>
<mime-type>video/mpeg2</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ms</extension>
<mime-type>application/x-wais-source</mime-type>
</mime-mapping>
<mime-mapping>
<extension>nc</extension>
<mime-type>application/x-netcdf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>oda</extension>
<mime-type>application/oda</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pbm</extension>
<mime-type>image/x-portable-bitmap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pct</extension>
<mime-type>image/pict</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pdf</extension>
<mime-type>application/pdf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pgm</extension>
<mime-type>image/x-portable-graymap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pic</extension>
<mime-type>image/pict</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pict</extension>
<mime-type>image/pict</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pls</extension>
<mime-type>audio/x-scpls</mime-type>
</mime-mapping>
<mime-mapping>
<extension>png</extension>
<mime-type>image/png</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pnm</extension>
<mime-type>image/x-portable-anymap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pnt</extension>
<mime-type>image/x-macpaint</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ppm</extension>
<mime-type>image/x-portable-pixmap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ps</extension>
<mime-type>application/postscript</mime-type>
</mime-mapping>
<mime-mapping>
<extension>psd</extension>
<mime-type>image/x-photoshop</mime-type>
</mime-mapping>
<mime-mapping>
<extension>qt</extension>
<mime-type>video/quicktime</mime-type>
</mime-mapping>
<mime-mapping>
<extension>qti</extension>
<mime-type>image/x-quicktime</mime-type>
</mime-mapping>
<mime-mapping>
<extension>qtif</extension>
<mime-type>image/x-quicktime</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ras</extension>
<mime-type>image/x-cmu-raster</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rgb</extension>
<mime-type>image/x-rgb</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rm</extension>
<mime-type>application/vnd.rn-realmedia</mime-type>
</mime-mapping>
<mime-mapping>
<extension>roff</extension>
<mime-type>application/x-troff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rtf</extension>
<mime-type>application/rtf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rtx</extension>
<mime-type>text/richtext</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sh</extension>
<mime-type>application/x-sh</mime-type>
</mime-mapping>
<mime-mapping>
<extension>shar</extension>
<mime-type>application/x-shar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>smf</extension>
<mime-type>audio/x-midi</mime-type>
</mime-mapping>
<mime-mapping>
<extension>snd</extension>
<mime-type>audio/basic</mime-type>
</mime-mapping>
<mime-mapping>
<extension>src</extension>
<mime-type>application/x-wais-source</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sv4cpio</extension>
<mime-type>application/x-sv4cpio</mime-type>
</mime-mapping>
<mime-mapping>
<extension>sv4crc</extension>
<mime-type>application/x-sv4crc</mime-type>
</mime-mapping>
<mime-mapping>
<extension>swf</extension>
<mime-type>application/x-shockwave-flash</mime-type>
</mime-mapping>
<mime-mapping>
<extension>t</extension>
<mime-type>application/x-troff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tar</extension>
<mime-type>application/x-tar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tcl</extension>
<mime-type>application/x-tcl</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tex</extension>
<mime-type>application/x-tex</mime-type>
</mime-mapping>
<mime-mapping>
<extension>texi</extension>
<mime-type>application/x-texinfo</mime-type>
</mime-mapping>
<mime-mapping>
<extension>texinfo</extension>
<mime-type>application/x-texinfo</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tif</extension>
<mime-type>image/tiff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tiff</extension>
<mime-type>image/tiff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tr</extension>
<mime-type>application/x-troff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>tsv</extension>
<mime-type>text/tab-separated-values</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ulw</extension>
<mime-type>audio/basic</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ustar</extension>
<mime-type>application/x-ustar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xbm</extension>
<mime-type>image/x-xbitmap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xpm</extension>
<mime-type>image/x-xpixmap</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xwd</extension>
<mime-type>image/x-xwindowdump</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wav</extension>
<mime-type>audio/x-wav</mime-type>
</mime-mapping>
<mime-mapping> <!-- Wireless Bitmap -->
<extension>wbmp</extension>
<mime-type>image/vnd.wap.wbmp</mime-type>
</mime-mapping>
<mime-mapping> <!-- WML Source -->
<extension>wml</extension>
<mime-type>text/vnd.wap.wml</mime-type>
</mime-mapping>
<mime-mapping> <!-- Compiled WML -->
<extension>wmlc</extension>
<mime-type>application/vnd.wap.wmlc</mime-type>
</mime-mapping>
<mime-mapping> <!-- WML Script Source -->
<extension>wmls</extension>
<mime-type>text/vnd.wap.wmls</mime-type>
</mime-mapping>
<mime-mapping> <!-- Compiled WML Script -->
<extension>wmlscriptc</extension>
<mime-type>application/vnd.wap.wmlscriptc</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wrl</extension>
<mime-type>x-world/x-vrml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>Z</extension>
<mime-type>application/x-compress</mime-type>
</mime-mapping>
<mime-mapping>
<extension>z</extension>
<mime-type>application/x-compress</mime-type>
</mime-mapping>
<mime-mapping>
<extension>zip</extension>
<mime-type>application/zip</mime-type>
</mime-mapping>
<!-- ==================== Default Welcome File List ===================== -->
<!-- When a request URI refers to a directory, the default servlet looks -->
<!-- for a "welcome file" within that directory and, if present, -->
<!-- to the corresponding resource URI for disp
Similar Messages
-
Pass the data back from the jsp page to the java code
Hi,
I have written an iView that receives an event using EPCF and extracts data from the client data bag.
I need this iView to pass the data back from the jsp page to the java code.
I am trying to do this using a hidden input field, but I cannot get the code to work.
Here is the code on the jsp page.
<%@ taglib uri="tagLib" prefix="hbj" %>
<hbj:content id="myContext" >
<hbj:page title="PageTitle">
<hbj:form id="myFormId">
<hbj:inputField id="myInputField" type="string" maxlength="100" value="" jsObjectNeeded="true">
<% myInputField.setVisible(false);%>
</hbj:inputField>
</hbj:form>
</hbj:page>
</hbj:content>
<script language=JavaScript>
EPCM.subscribeEvent("urn:com.peter", "namedata", window, "eventReceiver");
function eventReceiver(eventObj) {
var url = eventObj.dataObject;
var funcName = htmlb_formid+"_getHtmlbElementId";
func = window[funcName];
var ipField = eval(func("myInputField"));
ipField.setValue(url);
var form = document.all(htmlb_formid);
form.submit();
</script>
Here is my java code
package com.sap.training.portal;
import com.sapportals.htmlb.InputField;
import com.sapportals.htmlb.page.DynPage;
import com.sapportals.htmlb.page.PageException;
import com.sapportals.portal.htmlb.page.JSPDynPage;
import com.sapportals.portal.htmlb.page.PageProcessorComponent;
public class ListSalesOrder extends PageProcessorComponent {
public DynPage getPage(){
return new ListSalesOrderDynPage();
public static class ListSalesOrderDynPage extends JSPDynPage{
private String merong;
public void doInitialization(){
public void doProcessAfterInput() throws PageException {
InputField reportfld = (InputField) getComponentByName("myInputField");
if (reportfld != null) merong = reportfld.getValueAsDataType().toString();
public void doProcessBeforeOutput() throws PageException {
if ( merong != null ) setJspName("merong.jsp");
else setJspName("ListSalesOrder.jsp");
Here is DD
<?xml version="1.0" encoding="utf-8"?>
<application>
<application-config>
<property name="SharingReference" value="com.sap.portal.htmlb"/>
<property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
</application-config>
<components>
<component name="SearchSalesOrder">
<component-config>
<property name="ComponentType" value="jspnative"/>
<property name="JSP" value="/pagelet/SearchSalesOrder.jsp"/>
</component-config>
<component-profile>
<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
</component-profile>
</component>
<component name="ListSalesOrder">
<component-config>
<property name="ClassName" value="com.sap.training.portal.ListSalesOrder"/>
</component-config>
<component-profile>
<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
</component-profile>
</component>
</components>
<services/>
</application>
After receive event, then call java script function "eventReceiver" and call "form.submit()".
But .. PAI Logic in Java code doesn't called ...
Where is my problme ?
Help me ...
Regards, Arnold.Hi Arnold,
you should not do a form.submit yourself. Instead you can put a component called ExternalSubmit to your page:
ExternalSubmit exSubmit = new ExternalSubmit("EX_SUBMIT"));
exSubmit.setServerEventName("MyEvent");
This results in a java script funtion on the page which is called "_htmlb_external_submit_". If you call this function the the form gets submitted and your event handler is called.
regards,
Martin -
Specifying Schema Location in XML file and not in the Java code
I have a repository of schema xsd files. When I receive my xml file, I need to validate it against the specified schema. The xml file would declare the schema location, using the following syntax:
<CERD:CERD xsi:schemaLocation = "..\CERD.xsd" xmlns:CERD = "CERD.xsd" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance">
Is it really necessary to define the schema location again in the JAVA code? Why set the schemaLocation in the xml file at all then?
Does anybody have any examples where the schema location is not set in the JAVA code? I am using Java 1.6, and at this point in time I only need to validate. Any help would be appreciated.Thank you very much for your quick reply. I have made some progress but I am still stumped.
In my code I am doing this:
SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Schema schema = factory.newSchema();
Validator validator = schema.newValidator();
validator.validate(XML_SOURCE);
I find this works if my schema does not have a target namespace. I have downloaded the following simple example from the internet that uses a target namespace and it fails:
library1.xsd:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://example.org/prod"
xmlns:prod="http://example.org/prod">
<xsd:element name="product" type="prod:ProductType"/>
<xsd:complexType name="ProductType">
<xsd:sequence>
<xsd:element name="number" type="xsd:integer"/>
<xsd:element name="size" type="prod:SizeType"/>
</xsd:sequence>
<xsd:attribute name="effDate" type="xsd:date"/>
</xsd:complexType>
<xsd:simpleType name="SizeType">
<xsd:restriction base="xsd:integer">
<xsd:minInclusive value="2"/>
<xsd:maxInclusive value="18"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
<prod:product xmlns:prod="http://example.org/prod"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="library1.xsd"
effDate="2001-04-02">
<number>557</number>
<size>10</size>
</prod:product>
I get the following SAXParseException when I validate:
[line 4, col 36|
cvc-elt.1: Cannot find the declaration of element 'prod:product'.
Am I doing something wrong with the namespace declaration?
Edited by: alfredamorrissey on Oct 31, 2007 6:34 AM -
Modified Functional module not executing the inserted Code
Hi everyone
I've modified the IW_C_CREATE_TRANSPORT_REQUEST Functional module so that it calls the GUI_EXEC FM which calles my java script which saves the transport ID with a filename specified. The code seems to work when i test it within SAP, but when i come to use STARTRFC to call the function, the added code dosen't seem to be executing, the transport still gets created but my javascript is not being called?
Anyone know why?
Thanks - Peter
Code following
FUNCTION IW_C_CREATE_TRANSPORT_REQUEST.
""Local interface:
*" IMPORTING
*" VALUE(DESCRIPTION) LIKE E07T-AS4TEXT
*" VALUE(TRANSPORT_KIND) LIKE E070-TRFUNCTION DEFAULT 'K'
*" VALUE(LANGU) LIKE SY-LANGU DEFAULT 'EN'
*" VALUE(CQ_ID) LIKE E070-TRKORR DEFAULT 'FileName'
*" EXPORTING
*" VALUE(COMMFILE) LIKE E070-TRKORR
*" VALUE(PROG_PATH) LIKE E070-TRKORR
*" VALUE(CLASSNAME) LIKE E07T-AS4TEXT
*" EXCEPTIONS
*" LANGUAGE_MISSING
*" NUMBER_RANGE_FULL
*" UNALLOWED_TRFUNCTION
*" NO_AUTHORIZATION
*" CREATE_TRANSPORT_ERROR
CLEAR COMMFILE.
CASE TRANSPORT_KIND.
WHEN 'P'.
Stücklisten für Releasewechsel
IF NOT LANGU IS INITIAL.
PERFORM CREATE_RELEASE_REQUEST
USING LANGU
DESCRIPTION
TRANSPORT_KIND
CHANGING COMMFILE.
ELSE.
keine Sprache angegeben und Transportart Stücklisten
RAISE LANGUAGE_MISSING.
ENDIF.
WHEN OTHERS.
Alle anderen Transporte
PERFORM CREATE_REQUEST
USING DESCRIPTION
TRANSPORT_KIND
CHANGING COMMFILE.
ENDCASE.
*{ INSERT SM1K900042 1
WRITE 'Entering My Pogram'.
PROG_PATH = 'java.exe'.
CLASSNAME = '-cp c: writeToFile'.
CONDENSE CLASSNAME.
CONDENSE PROG_PATH.
CONCATENATE CLASSNAME CQ_ID COMMFILE INTO CLASSNAME SEPARATED BY ' '.
CALL FUNCTION 'GUI_EXEC'
EXPORTING
PARAMETER = CLASSNAME
COMMAND = PROG_PATH.
WRITE 'Our path is'.
WRITE PROG_PATH.
WRITE CLASSNAME.
*} INSERT
ENDFUNCTION.
*************************FORMS****************************************
FORM CREATE_RELEASE_REQUEST *
Transportauftrag für Stücklisten erstellen *
FORM CREATE_RELEASE_REQUEST
USING P_LANGU LIKE SY-LANGU
P_TRANSPORT_DESCRIPT LIKE E07T-AS4TEXT
P_TRANS_KIND LIKE E070-TRFUNCTION
CHANGING P_COMMFILE LIKE E070-TRKORR.
DATA: SUBRC LIKE SY-SUBRC,
H_TMP_LANG(2) TYPE C,
H_NUMBER(3) TYPE C,
NUMBER(4) TYPE C.
Anwednungslog öffnen
PERFORM OPEN_LOG
USING P_TRANSPORT_DESCRIPT.
*Nummer ziehen
PERFORM GET_NUMBER USING P_LANGU
CHANGING H_NUMBER
SUBRC.
IF SUBRC = 12.
Fehler beim erstellen des Transportauftrags
RAISE CREATE_TRANSPORT_ERROR.
ELSEIF SUBRC = 11.
Nummernkreis voll
RAISE NUMBER_RANGE_FULL.
ELSE.
WRITE P_LANGU TO H_TMP_LANG.
P_COMMFILE = 'SAPKXXXLYY'.
REPLACE 'XXX' WITH H_NUMBER INTO P_COMMFILE.
REPLACE 'YY' WITH H_TMP_LANG INTO P_COMMFILE.
CALL FUNCTION 'SUBST_CREATE_COMMANDFILE'
EXPORTING
IV_KORRNAME = P_COMMFILE
IV_KORRTYPE = P_TRANS_KIND
IV_KORRTEXT = P_TRANSPORT_DESCRIPT
EXCEPTIONS
NAME_COLLISION = 1
CREATE_HEADER_FAILED = 2
UPDATE_HEADER_FAILED = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
CLEAR P_COMMFILE.
Fehler beim Erstellen des Transportauftrags
RAISE CREATE_TRANSPORT_ERROR.
ELSE.
Transportauftrag erstellt
Log schreiben
PERFORM WRITE_LOGFILE
USING P_COMMFILE.
ENDIF.
ENDIF.
ENDFORM. "CREATE_RELEASE_REQUEST
FORM CREATE_REQUEST *
Transportauftrag erstellen *
FORM CREATE_REQUEST
USING P_TRANSPORT_DESCRIPT LIKE E07T-AS4TEXT
P_TRANS_KIND LIKE E070-TRFUNCTION
CHANGING P_COMMFILE LIKE E070-TRKORR.
CALL FUNCTION 'TRINT_INSERT_NEW_COMM'
EXPORTING
WI_KURZTEXT = P_TRANSPORT_DESCRIPT
WI_TRFUNCTION = P_TRANS_KIND
IMPORTING
WE_TRKORR = P_COMMFILE
EXCEPTIONS
NUMBER_RANGE_FULL = 1
INVALID_INPUT = 2
NO_AUTHORIZATION = 3
OTHERS = 4.
CASE SY-SUBRC.
WHEN 0.
Auftrag erstellt
Anwednungslog öffnen
PERFORM OPEN_LOG
USING P_TRANSPORT_DESCRIPT.
Log schreiben
PERFORM WRITE_LOGFILE
USING P_COMMFILE.
WHEN 1. "Nummernkreis für Aufträge voll
CLEAR P_COMMFILE.
RAISE NUMBER_RANGE_FULL.
p_error_msg-no = '735'.
WHEN 2. "Unbekannter Auftragstyp
CLEAR P_COMMFILE.
RAISE UNALLOWED_TRFUNCTION.
p_error_msg-no = '353'.
WHEN 3. "keine Berechtigung
CLEAR P_COMMFILE.
RAISE NO_AUTHORIZATION.
p_error_msg-no = '328'.
WHEN 4. "Allgemeiner Fehler
CLEAR P_COMMFILE.
RAISE CREATE_TRANSPORT_ERROR.
p_error_msg-no = '353'.
ENDCASE.
ENDFORM. "create_request
FORM OPEN_LOG *
Anwedungslog öffnen *
FORM OPEN_LOG
USING P_TRANSPORT_DESCRIPT LIKE E07T-AS4TEXT.
*init application log
PERFORM LOG_INIT USING C_APPL_LOG_TRANSPORT.
*log header
PERFORM LOG_HEADER
USING C_APPL_LOG_TRANSPORT P_TRANSPORT_DESCRIPT.
ENDFORM. "OPEN_LOG
FORM WRITE_LOGFILE *
Logfile in den Anwendungslog schreiben *
-> P_TRANSPORT_DESCRIPT *
FORM WRITE_LOGFILE
USING P_COMMFILE LIKE E070-TRKORR.
DATA: H_ERROR_MSG LIKE IWERRORMSG.
*log message transport created
CLEAR H_ERROR_MSG.
MOVE '42' TO H_ERROR_MSG-ID.
MOVE 'I' TO H_ERROR_MSG-TYPE.
MOVE '733' TO H_ERROR_MSG-NO.
MOVE P_COMMFILE TO H_ERROR_MSG-V1.
PERFORM LOG_MSG
USING C_APPL_LOG_TRANSPORT '2' H_ERROR_MSG.
*log save
PERFORM LOG_SAVE
USING C_APPL_LOG_TRANSPORT.
ENDFORM. "WRITE_LOGFILE
FORM GET_NUMBER *
--> LANGU *
--> NUMBER *
FORM GET_NUMBER
USING LANGU LIKE SY-LANGU
CHANGING NUMBER TYPE C
SUBRC LIKE SY-SUBRC.
CONSTANTS: OBJECT LIKE INRI-OBJECT VALUE 'SIWBTRANSP'.
DATA: NR_RANGE LIKE INRI-NRRANGENR,
RETURNCODE LIKE INRI-RETURNCODE,
ERROR_MSG LIKE IWERRORMSG.
CLEAR SUBRC.
NR_RANGE = '01'.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
NR_RANGE_NR = NR_RANGE
OBJECT = OBJECT
SUBOBJECT = LANGU
IMPORTING
NUMBER = NUMBER
RETURNCODE = RETURNCODE
EXCEPTIONS
INTERVAL_NOT_FOUND = 1
NUMBER_RANGE_NOT_INTERN = 2
OBJECT_NOT_FOUND = 3
QUANTITY_IS_0 = 4
QUANTITY_IS_NOT_1 = 5
INTERVAL_OVERFLOW = 6
OTHERS = 7.
CASE SY-SUBRC.
WHEN 00.
WHEN 01.
PERFORM NUMBER_RANGE_INTERVAL_INSERT
USING NR_RANGE LANGU
CHANGING NUMBER
RETURNCODE.
WHEN OTHERS.
SUBRC = 12.
PERFORM FILL_ERROR_MSG
USING C_MESSAGE_ERROR 736 SY-SUBRC SPACE SPACE SPACE
CHANGING ERROR_MSG.
PERFORM LOG_MSG USING C_APPL_LOG_TRANSPORT 1 ERROR_MSG.
ENDCASE.
CASE RETURNCODE.
WHEN ' '.
WHEN '1'. "Nummer im kritischen Bereich
PERFORM FILL_ERROR_MSG
USING C_MESSAGE_INFO 734 SPACE SPACE SPACE SPACE
CHANGING ERROR_MSG.
PERFORM LOG_MSG USING C_APPL_LOG_TRANSPORT 2 ERROR_MSG.
WHEN '2'. "letzte Nummer vergeben
PERFORM FILL_ERROR_MSG
USING C_MESSAGE_INFO 735 SPACE SPACE SPACE SPACE
CHANGING ERROR_MSG.
PERFORM LOG_MSG USING C_APPL_LOG_TRANSPORT 1 ERROR_MSG.
SUBRC = 11.
ENDCASE.
ENDFORM. "number_get
Message was edited by:
Peter LaiHi i've tried restarting and starting the server, but it didn't help, would it have anything to do with the fact i'm callin sap which is calling JAVA from a .exe program. The .exe program is having problems connecting to the JAVA program as there is no link?
I did a trace as well and this is what it came up with:
Error in program 'startrfc': ======> Exception condition "NO_BATCH" raised.
>>>> [1] <unknown> : EXT <ac: 7> L DDSLOCTE01 >>> CLOSE abrfcrcv.c 429 (23850562)
-{F0776FA3-F1A7-4662-BF7A-D1352735C394}
*> RfcReceive
handle = 1
Data conversion On
Error in program 'startrfc': <* RfcReceive [1] : returns 3:RFC_SYS_EXCEPTION
Error in program 'startrfc': <* RfcCallReceive [1] : returns 3:RFC_SYS_EXCEPTION
>>>> [1] <unknown> : EXT <ac: 8> L DDSLOCTE01 >>> FREE abrfcio.c 3517 (23850562)
-{F0776FA3-F1A7-4662-BF7A-D1352735C394}
Trace file opened at 20070312 164006 GMT Standard T, SAP-REL 640,0,119 RFC-VER 3 818122 MT-SL
*> RfcClose called by external program ...
handle = 1
*> rfcClose called by RFC-Library in file: abrfc.c, line: 532
handle = 1
Trace file opened at 20070312 164006 GMT Standard T, SAP-REL 640,0,119 RFC-VER 3 818122 MT-SL
<* rfcClose
>* RfcClose
Any help or ideas what it could be would be great -
Test.jsp not able to display the output from the java code.
when i try to invoke http://localhost/papz/test.jsp
I dont see anything. The page is blank. And there are no error messages in any log files. When i click on view source in IE i get to see the entire source code, including the jave code.
<html>
<head>
<title>Test</title>
<body>
<%
out.println("Hello World");
%>
asdfasdfasdf
</body>
</html>
i added in the asdfasdf to see whehter it will be printed or not... It does print that stuff out.
when i try to invoke the login.jsp page, i get the dialog box "save this file to disk"
Any clues whats going on...?
I followed the instructions...over and over again... but it doesnt seem to help.
win nt 4.0
apache 1.3.12
jserv 1.1.1
Pls help. ThanksHi,
Have you solved your problem?
I4m trying to do the same, but I installed portal 30, then portal to go, and when I try to run test.jsp I get the following error:
Request URI:/papz/test.jsp
Exception:
java.lang.NoSuchMethodError: oracle.jsp.util.JspUtil: method
stripTarget(Ljava/lang/String;C)Ljava/lang/String; not found
Thanks
Pablo Lopera
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by NewBie:
when i try to invoke http://localhost/papz/test.jsp
I dont see anything. The page is blank. And there are no error messages in any log files. When i click on view source in IE i get to see the entire source code, including the jave code.
<html>
<head>
<title>Test</title>
<body>
<%
out.println("Hello World");
%>
asdfasdfasdf
</body>
</html>
i added in the asdfasdf to see whehter it will be printed or not... It does print that stuff out.
when i try to invoke the login.jsp page, i get the dialog box "save this file to disk"
Any clues whats going on...?
I followed the instructions...over and over again... but it doesnt seem to help.
win nt 4.0
apache 1.3.12
jserv 1.1.1
Pls help. Thanks<HR></BLOCKQUOTE>
null -
Class Not found Exception for invoking BPEL process through the Java code
Hi.
The JDeveloper IDE raise the Exception From the invoking the BPEL process through the java code .Class Not Found Exception (Locator,ID.......).What is process of importing these classes from API.In your code (.bpel file) import the library using the bpelx:exec tag. For example the adding the following entry in your .bpel file imports the com.oracle.bpel.client.util library.
<bpelx:exec import="com.oracle.bpel.client.util.*"/> -
JavaScript is not from the same origin as the Java code
When trying to log into my school website with Safari, I get the following error from the console:
sun.plugin.liveconnect.OriginNotAllowedException: JavaScript is not from the same origin as the Java code, caller=http://tychousa3.umuc.edu/WebTycho.nsf/setJVMCookie?OpenPage, callee=https://tychousa3.umuc.edu/sys/
This keeps me from logging in. In order to get it to work, I have to disable Java, log in, then reenable Java after logging in.
I am able to log in successfully with Firefox but I really prefer to use Safari.
Does anyone else experience this problem and do you know how to fix it? Any help would be very much appreciated. Thanks.
iBook 933 - PPC Mac OS X (10.4.5)I'm reposting. No answer.
-
Could not execute the css file
Hi,
I have this code:
named: email11.java
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.util.*;
import business.User;
import data.UserDB;
import util.MurachPool;
public class EmailServlet extends HttpServlet{
private MurachPool connectionPool;
public void init() throws ServletException{
connectionPool = MurachPool.getInstance();
public void destroy() {
connectionPool.destroy();
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException{
Connection connection = connectionPool.getConnection();
HttpSession session = request.getSession();
String message ="";
try{
Vector users = UserDB.readRecord(connection);
session.setAttribute("users", users);
RequestDispatcher dispatcher =
getServletContext().getRequestDispatcher(
"/email11/show_email_entry.jsp");
dispatcher.forward(request, response);
}catch(SQLException sqle){
message = "EmailServlet SQLException: " + sqle;
session.setAttribute("message", message);
RequestDispatcher dispatcher =
getServletContext().getRequestDispatcher(
"/email11/join_email_list.jsp");
dispatcher.forward(request, response);
connectionPool.freeConnection(connection);
and this code in jsp file:
named: show_email_entry.jsp
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ taglib uri="../WEB-INF/tlds/murach.tld" prefix="mma" %>
<html>
<head>
<link rel="stylesheet" type="text/css" href="DisplayData.css">
</head>
<body>
<h1> Test</h1>
<table cellspacing="0" cellpadding="1" border="1">
<tr valign="bottom">
<td class="headerColumn" align= "center">First Name</td>
<td class="headerColumn" align= "center">Last Name</td>
<td class="headerColumn" align= "center">Address</td>
<td class="headerColumn" align= "center">Phone Number</td>
<td class="headerColumn" align= "center">Cell Number</td>
<td class="headerColumn" align= "center">Email Address</td>
</tr>
<mma:users>
<tr>
<td><%= firstName %></td>
<td><%= lastName %></td>
<td><%= address %></td>
<td><%= phoneNumber %></td>
<td><%= cellNumber %></td>
<td><%= emailAddress %></td>
</tr>
</mma:users>
</table>
</body>
</html>
This is the css file code that I like to apply to the show_email_entry.jsp
named: Displaydata.css
This rules are for background color for data display
/*td.column{
background-color: #f0f8ff;
background-color: #fffacd;
td.headerColumn{
background-color: #daa520;
font-weight: bold;
font-family: sans-serif,Verdana, Arial, Helvetica;
font-size: 10pt;
td.column{
font-family: sans-serif,Verdana, Arial, Helvetica;
font-size: 10pt;
white-space: nowrap;
background-color: #fffacd;
a{
text-decoration: none;
h1{
color: red;
They are working fine. However, it just does not execute the css file in the show_email_entry.jsp. Another word, the headerColumn should show some color as I coded it in the css file. But it shows only white background and black text. I have the file named DisplayData.css in the same directory as the file named show_email_entry.jsp. But it still does not work.
if I create a test.jsp and use with the DisplayData.css file above then it would work fine. But when I used it with the servlet file, then it would not work.
Anyone knows why ?
Thanks
zbonzbonPls, disregard this thread. I have found my answer..
Thanks,
zbonzbon -
Runtime.exec not executing the command !
Hi all,
I'm connecting to Progress Db thru JDBC trying to execute a stored procedure
which has a statement
Runtime.exec("ksh -c aa") where aa is aunix script which i'm trying to run from java snippet .
when i run this code as a seperate java program it executes the script
"aa" but thru JDBC connection it does not execute the command
what could be the reason ???
thanx in advance,
Nagu.Hi Rick,
"aa" is the shell script which is lying in the user DIR .
It is returning a non-zero value. what kind of permissions be there for to execute the Shell command?
Regards,
Nagarathna. -
Servlet not executing the a file at server?
i am trying to execute a java file at server
using the following servlet. I am using
Process proc=runtime.exec("C:\\j2sdk1.4.1_01\\bin\\javac HelloServlet.java"); I am compiling the code succesfully
and when i call the servlet at browser it displays HELLO
but not executing the command. I am using Tomcat and winows NT.
here the servlet code ....please help.........
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Hello extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String docType =
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
"Transitional//EN\">\n";
out.println(docType +
"<HTML>\n" +
"<HEAD><TITLE>Hello</TITLE></HEAD>\n" +
"<BODY BGCOLOR=\"#FDF5E6\">\n" +
"<H1>Hello</H1>\n" +
"</BODY></HTML>");
try
Runtime runtime=Runtime.getRuntime();
Process proc=runtime.exec("C:\\j2sdk1.4.1_01 \\bin\\javac HelloServlet.java");
BufferedReader br=new BufferedReader(new InputStreamReader(proc.getInputStream()));
PrintWriter com_out=response.getWriter();
com_out.println("<pre>");
String line=null;
while((line=br.readLine())!=null)
{ com_out.println(line);
catch (Exception e)
out.println("Listener *not* started!");thanku for the cooperation. i kept as below but still it is not working.......
String path = getServletContext().getRealPath("C:\\Tomcat 4.1\\webapps\\examples\\WEB-INF\\classes\\Hello.class");
Runtime runtime=Runtime.getRuntime();
Process proc=runtime.exec("C:\\j2sdk1.4.1_01\\bin\\javac HelloServlet.java" +path ); -
Could not create the Java virtual machine error during installation
Hi,
We are doing an ERP 2005 Installation on AIX 5.2 ML08 with DB2 as the
database.During "Import ABAP" Phase of the installation we are getting
the below error.
========================================================================ERROR 2007-03-12 13:35:30
CJS-30022 Program 'Migration Monitor' exits with error code 1. For
details see log file(s) import_monitor.java.log, import_monitor.log.
ERROR 2007-03-12 13:35:30
FCO-00011 The step runMigrationMonitor with step key
|NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_ABAP_Import_Dialog|ind|ind|ind|ind|5|0|NW_ABAP_Import|ind|ind|ind|ind|0|0|runMigrationMonitor was
executed with status ERROR .
========================================================================
In "import_monitor.java.log" below entries are there
Unrecognized option: -Xj9
JVMCI119: Error parsing IBM_JAVA_OPTIONS java options - rc=-6
Could not create the Java virtual machine.
Usage: java [-options] class [args...]
(to execute a class)
or java [-jar] [-options] jarfile [args...]
(to execute a jar file)
Java Version is as below
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
Classic VM (build 1.4.2, J2RE 1.4.2 IBM AIX build ca142-20050929a (SR3)
(JIT enabled: jitc))
Regards,
SumiHi all,
I just checked the note 716927 again - it refers to note 1024539.
That one says you should use SR7 and activate J9 technology
so make sure you have the java version
"J2RE 1.4.2 IBM AIX 5L for PowerPC (64 bit JVM) build
caix64142ifx-20061222 (ifix 113727: SR7 + 112603)"
and that the environment variable
IBM_JAVA_OPTIONS=-Xj9
is set for user <sid>adm
After the installation, make sure that the JVM parameters are set as described in the note 1024539.
By the way: it doesn't work if you use any other Java SDK (e.g. from Sun), as AIX has it's own one.
Best regards,
Cornelia -
JRockit 'could not create the Java virtual machine'
I installed JRockit (build R28.1.4-7-144370-1.6.0_26-20110617-2130-linux-x86_64) on a server SLES11SP1 (x86_64), but I got the following erros when I tried to run java command:
/usr/lib64/jrockit-jdk1.6.0_26-R28.1.4-4.0.1/bin # ./java
[WARN ][codegc ] Could not acquire 64KB of code memory.
[WARN ][codegc ] 0B committed previously.
Could not create the Java virtual machine.
Any idea?When you do ./java you usually get some output such as:
[oracle@edu-wls-rh bin]$ ./java
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-jrockit to select the "jrockit" VM
-client to select the "client" VM
-server to select the "server" VM [synonym for the "jrockit" VM]
The default VM is jrockit.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified imageNote the usage, which means have to use something like: ./java -Xms1024m -Xmx1024m -Xgc:throughput package.MyMainClass -
Could not create the Java Virtual Machine. when deploy Android mobile App
Using Jdeveloper 11.1.2.3.0.... with Mobile App plugin.
I am working on deploying an Andriod mobile app to the emulator and most of the time I get the following....
Deployment failed due to one or more errors returned by 'C:\Temp\adt-bundle-windows-x86\sdk\platform-tools\dx.bat'. The following is a summary of the returned error(s):
Command-line execution failed (Return code: 1)
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Once in a great while I get it to work and the app deploys but 90% of the time I get this error.
I do start the emulator up before I even fire up JDeveloper so the emulator is up and running OK when i go to delpoy.
Any suggestions?
Thanks!Hi.
Usually, this happens when there is no JDK in the PATH system variable. JDeveloper and WLS will work, but some external tools will fail. Can you please ensure that you have a reference to the <tt>bin</tt> subfolder of a Java SE 6 JDK in it? You should get something like this when you execute <tt>java -version</tt> on the command line:
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)Best Regards,
Frédéric. -
Hello,
Scope: JVM error during initial install of SAP HANA Studio Developer Edition v1.00.80, Win86/32bit
Source: installation files pulled from HANA Studio tab at https://hanadeveditionsapicl.hana.ondemand.com/hanadevedition/, which is a link from the main HANA site of http://scn.sap.com/community/developer-center/hana. zip folder: "sap_hana_win32_studio_rev80"
Targeted O/S: Windows 7, 32-bit, local Java is SE 7, update 67. Java environment has been confirmed via checks provided at http://www.java.com/en/download/manual.jsp
Actions taken:
Attempted to update the installation's eclipse.ini file by reducing the -Xmx value; see details below.
Read thru postings such as http://scn.sap.com/thread/3390626 and the threads it recommended.
Checked OSS (ie Note 1859686 - HANA Studio does not start)
Description of installation error:
Shortly after executing "hdbinst", it fails with the error "Could not create the Java Virtual Machine". I've verified that there is nearly 3G of memory free. What I did notice, as shown in the attached files, is that Eclipse is part of this installation and it's pre-loaded with the "eclipse.ini". I firmly believe the solution could be to reduce parameter "-Xmx1024m" to "-Xmx512m" but it's a catch-22 because even after updating eclipse.ini (in installation folder C:\Program Files\SAP\hdbstudio\tmp_p2director2014.08.13_13.36.44\director), the install program requires that the "hdbstudio" folder to be empty upon restarting it.
Since the installation is basically a package with a lot of .jar files, there is no eclipse.ini file available in the source install folder; otherwise, updating it there would be the easiest solution if that option were available. The file is only available in the targeted deployment folder above.
If you have encountered this same error and were able to resolve it, I would be grateful to know of your solution. Thanks very much.
FYI: the HANA Client installed with no issues.
Jim Cleek
FYI: the images below reflect the sequence of images produced during the installation.
after clicking OK above, the screen below gets updated (see the "is not empty" msg).
Below is the eclipse.ini file located in the deployed/target folder:
Message was edited by: Jim Cleek
FYI: Using information from the SAP HANA Database - Studio Installation and Update Guide, I tried to override the installation's use of its eclipse.ini file by passing my own modified version (with "-Xmx512m") of that file that was placed in a separate folder. The cmd used via DOS window was "hdbsetup.exe -a studio --configfile=C:\Users\Admin\Downloads\eclipse.ini" and even though it successfully launched the SAP HANA Lifecycle Management gui, it failed on the first step with the same JVM create error as above because it appears to have used its own eclipse.ini file, which has "-Xmx1024m".Update: a message was opened with SAP but unfortunately they could not provide a resolution for this particular scenario. They admitted that the eclipse.ini file cannot be updated since it is bundled as part of the installation package. One point to make that I did not make before was that this was being attempted on an Oracle VirtualBox (4.3.10); the SAP HANA contact said he assumed that SAP has not tested this particular scenario, thus it could not be supported.
Resolution: the end result was to abort trying to install SAP HANA Client and Studio on the Oracle VirtualBox but to install it locally on my own desktop, which runs on Windows 7 Enterprise 64-bit with 8G of memory. The SAP HANA files below were downloaded, extracted and installed successfully in the order shown.
FYI: the Studio installation detected that a 64-bit version of Java was not installed so I installed that and then adjusted the User environmental variable JAVA_HOME to point to that new path, leaving the System variable still pointing to the pre-existing 32-bit Java path.
SAPCAR 7.20 -> Windows on x64 64bit: SAPCAR_315-20010453.EXE
IMDB_CLIENT100_80_0-10009664.SAR Revision 80 for SAP HANA CLIENT 1.00
Support Package SAP HANA CLIENT 1.00 Windows on x64 64bit
IMC_STUDIO100_80_0-20007647.SAR Revision 80 for SAP HANA STUDIO 1.00
Support Package SAP HANA STUDIO 1.00 Windows on x64 64bit
jre-7u67-windows-x64.exe - http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
Jim Cleek
HP Enterprise Services -
Provide the java code for the following scenario.
Hi Experts,
I have tried with all the combinations for this scenario. As per my understanding i require java code for the following scenario
so that it becomes easy........
I require a Message mapping for this Logic.
In the Source there are 4 fields and, the Target side, the fields should appear like this.
Source Structure- File
Record
|-> Header
Order_No
Date
|-> Item
Mat_No
Quantity
Target Structure-IDoc
IDoc
|-> Header
|-> Segment
Delivery_Order_No
Recv_Date
|-> Item
|-> Segment
Delivery_Order_No
Material_Num
Recv_Quantity.
The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
For example:-
we have
Source Structure- File
Order-no Date Mat_No Quantity
1 01/02/2011 A 10
1 01/02/2011 B 15
1 01/02/2011 A 10
2 01/02/2011 C 10
2 01/02/2011 C 10
3 01/02/2011 D 20
3 01/02/2011 D 10
3 01/02/2011 E 25
Target Structure-IDoc
Delivery_Order_No Recv_Date Material_Num Recv_Quantity
1 01/02/2011 A 20
1 01/02/2011 B 15
2 01/02/2011 C 20
3 01/02/2011 D 30
3 01/02/2011 E 25
So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field in the Target Side. ike wise the process goes on upto 3.Kindly do the needy..
Kindly provide the java code.
Thanq very much in advance..what i have understood from ur example is that u want to generate an idoc for unique combination of Order-no and Mat_No
if yes then chk the below mapping..
change the context of Order_No, Date, Mat_No and Quantity to Record (right click-> context)
1)
Order-no
----------------------concat[;]---sort----splitbyvalue(valuechanged)-----collapse context---IDoc
Mat_No
2)
Order-no
--------concat[;]---sort----splitbyvalue(value changed)---collapse context---UDF1--splitbyvalue(each value)--Delivery_Order_No
Mat_No
3)
Order-no
-----------concat[;]---sortbykey----------------------- \
Mat_No / \
Date--------------- / \
----------------------------------------------------------FormatByExample-----collapsecontext---splitbyvalue(each value)----Recv_Date
Order-no /
-----------concat[;]---sort----splitbyvalue(value changed)
Mat_No
4)
Order-no
--------concat[;]---sort----splitbyvalue(value changed)---collapse context-UDF2--splitbyvalue(each value)--Material_Num
Mat_No
5)
Order-no
-----------concat[;]---sortbykey
Mat_No /
Quantity --------------- /
----------------------------------------------------------FormatByExample-----SUM(under statistic)----Recv_Quantity
Order-no
-----------concat[;]---sort----splitbyvalue(value changed)
Mat_No
UDF1:
String [] temp= a.split(";");
return temp[0];
UDF2:
String [] temp= a.split(";");
return temp[1];
Maybe you are looking for
-
How can i retrieve my old text messages?
I synced my iphone 5s to the computer for the first time and all my personal data was wiped such as text messages, photos, emails and contacts they were then replaced with my dads information? How do i get my stuff back?
-
Having had an iPhone for some time, I recently purchased an iPad. Everthing has been set up correctly in terms of iCloud, this was checked by Apple today, the set up in iTunes relating to photos says sync all, again I think this is correct. However,
-
Unable to connect to local database
I am running 8.1.7 and iSQL*Plus on one machine (duh). I am able to login to remote databases via isqlplus but cannot seem to login to the very database that was installed in order to get the isqlplus working, the one on the same machine. Do I need t
-
How do I reset or delete settings in the Messaging...
How do I reset or delete settings in the Messaging section on a 6790? I input something that I need to delete.
-
I have a MacBook Pro 13 inch and it randomly crashed on me recently while I was looking at a Word document. Here is the log from the console: 7/21/10 7:38:20 PM [0x0-0xf00f].com.google.Chrome[126] [0721/193820:WARNING:/b/slave/chrome-official-mac/bui