Urgent: Parameter problem for jsp
Following jsp when run with portal 9.0.2 displays value of Name and Age but value of Telephone parameter is displayed as Null. Can anybody tell me the reason?
Running this jsp on IBM WebSphere.
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="java.util.*, oracle.portal.provider.v2.*" %>
<%@page import="oracle.portal.provider.v2.http.HttpCommonConstants" %>
<%@page import="oracle.portal.provider.v2.render.PortletRendererUtil" %>
<%@page import="oracle.portal.provider.v2.render.PortletRenderRequest" %>
<%@page import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil" %>
<%@page import="oracle.portal.provider.v2.url.UrlUtils" %>
<%
// The form submit URL refers to the current Portal page. All portlets
// on this page share this URL. This means that the per portlet parameters
// are in the same request. Portlets must ensure that its paramerters don't
// collide either with other portlets or other instances of itself. This
// is generally accomplished by using "fully-qualified" parameter names. A
// fully-qualified parameter name prepends the (unique) portlet reference to
// the parameter. The JPDK provides a utility to accomplish this.
String portletParamName = "mName";
String portletParamAge = "mAge";
String portletParamSubmit = "mSubmit";
String fName = HttpPortletRendererUtil.portletParameter(request, portletParamName);
String fAge = HttpPortletRendererUtil.portletParameter(request, portletParamAge);
String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);
// These are the session attribute names used to store the current values.
// Because all instances of this portlet share the same user session we must
// also fully-qualify these names to avoid collisions.
String sName = HttpPortletRendererUtil.portletParameter(request, "sName");
String sAge = HttpPortletRendererUtil.portletParameter(request, "sAge");
String sTelephone = request.getParameter("TELEPHONE");
PortletRenderRequest pRequest = (PortletRenderRequest)
request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
String formName = UrlUtils.htmlFormName(pRequest,null);
ProviderUser user = pRequest.getUser();
ProviderSession providerSession = user.getSession();
if (providerSession == null)
%>
Your provider session has been terminated or has timed out
and you need to logout and then login to re-establish the session.
<%
else
// Record, in session storage, the last values submitted.
if (pRequest.getQualifiedParameter(portletParamSubmit) != null)
providerSession.setAttribute(sName, pRequest.getQualifiedParameter(portletParamName));
providerSession.setAttribute(sAge, pRequest.getQualifiedParameter(portletParamAge));
%>
<!-- Output the HTML content -->
<center>
<table width="70%">
<tr>
<td>
<b>This portlet shows how to post and process information from HTML forms.</b>
</td>
</tr>
</table>
<form name="<%= formName %>" method="POST"
action="<%= UrlUtils.htmlFormActionLink(pRequest,UrlUtils.PAGE_LINK) %>">
<%= UrlUtils.htmlFormHiddenFields(pRequest,UrlUtils.PAGE_LINK, formName) %>
<table>
<tr>
<td>
<b>Name :</b>
</td>
<td>
<input type="text" size="20" name="<%= fName %>" value="">
</td>
</tr>
<tr>
<td>
<b>Age : </b>
</td>
<td>
<input type="text" size="3" name="<%= fAge %>" value="">
</td>
</tr>
<tr>
<td>
<b>Telephone : </b>
</td>
<td>
<input type="text" size="3" name="TELEPHONE" value="">
</td>
</tr>
</table>
<br>
<INPUT TYPE=submit name="<%= fSubmit %>" Value="Submit">
</form>
<%
if ((providerSession.getAttribute(sName) == null)&& (providerSession.getAttribute(sAge) == null)) {
%>
<b>No values have been submitted yet.</b>
<%
} else {
%>
<b> Last submitted values:</b><br>
<table>
<tr>
<td>
<b>Name: </b>
</td>
<td>
<b><%= providerSession.getAttribute(sName) %></b>
</td>
</tr>
<tr>
<td>
<b>Age: </b>
</td>
<td>
<b><%= providerSession.getAttribute(sAge) %></b>
</td>
</tr>
<tr>
<td>
<b>Telephone: </b>
</td>
<td>
<b><%= sTelephone %></b>
</td>
</tr>
</table>
<%
%>
</center>
<%
%>
<!-- End output the HTML content -->
Hello,
Let me know if the answer that I made Help needed: JSP and portal parameter problem.
Regards
Tugdual Grall
Similar Messages
-
Urgent: Parameter problem for portlet displaying jsp running inside tomcat
Following jsp when run with portal 9.0.2 displays value of Name and Age but value of Telephone parameter is displayed as Null. Can anybody tell me the reason?
Running this jsp on IBM WebSphere.
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="java.util.*, oracle.portal.provider.v2.*" %>
<%@page import="oracle.portal.provider.v2.http.HttpCommonConstants" %>
<%@page import="oracle.portal.provider.v2.render.PortletRendererUtil" %>
<%@page import="oracle.portal.provider.v2.render.PortletRenderRequest" %>
<%@page import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil" %>
<%@page import="oracle.portal.provider.v2.url.UrlUtils" %>
<%
// The form submit URL refers to the current Portal page. All portlets
// on this page share this URL. This means that the per portlet parameters
// are in the same request. Portlets must ensure that its paramerters don't
// collide either with other portlets or other instances of itself. This
// is generally accomplished by using "fully-qualified" parameter names. A
// fully-qualified parameter name prepends the (unique) portlet reference to
// the parameter. The JPDK provides a utility to accomplish this.
String portletParamName = "mName";
String portletParamAge = "mAge";
String portletParamSubmit = "mSubmit";
String fName = HttpPortletRendererUtil.portletParameter(request, portletParamName);
String fAge = HttpPortletRendererUtil.portletParameter(request, portletParamAge);
String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);
// These are the session attribute names used to store the current values.
// Because all instances of this portlet share the same user session we must
// also fully-qualify these names to avoid collisions.
String sName = HttpPortletRendererUtil.portletParameter(request, "sName");
String sAge = HttpPortletRendererUtil.portletParameter(request, "sAge");
String sTelephone = request.getParameter("TELEPHONE");
PortletRenderRequest pRequest = (PortletRenderRequest)
request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
String formName = UrlUtils.htmlFormName(pRequest,null);
ProviderUser user = pRequest.getUser();
ProviderSession providerSession = user.getSession();
if (providerSession == null)
%>
Your provider session has been terminated or has timed out
and you need to logout and then login to re-establish the session.
<%
else
// Record, in session storage, the last values submitted.
if (pRequest.getQualifiedParameter(portletParamSubmit) != null)
providerSession.setAttribute(sName, pRequest.getQualifiedParameter(portletParamName));
providerSession.setAttribute(sAge, pRequest.getQualifiedParameter(portletParamAge));
%>
<!-- Output the HTML content -->
<center>
<table width="70%">
<tr>
<td>
<b>This portlet shows how to post and process information from HTML forms.</b>
</td>
</tr>
</table>
<form name="<%= formName %>" method="POST"
action="<%= UrlUtils.htmlFormActionLink(pRequest,UrlUtils.PAGE_LINK) %>">
<%= UrlUtils.htmlFormHiddenFields(pRequest,UrlUtils.PAGE_LINK, formName) %>
<table>
<tr>
<td>
<b>Name :</b>
</td>
<td>
<input type="text" size="20" name="<%= fName %>" value="">
</td>
</tr>
<tr>
<td>
<b>Age : </b>
</td>
<td>
<input type="text" size="3" name="<%= fAge %>" value="">
</td>
</tr>
<tr>
<td>
<b>Telephone : </b>
</td>
<td>
<input type="text" size="3" name="TELEPHONE" value="">
</td>
</tr>
</table>
<br>
<INPUT TYPE=submit name="<%= fSubmit %>" Value="Submit">
</form>
<%
if ((providerSession.getAttribute(sName) == null)&& (providerSession.getAttribute(sAge) == null)) {
%>
<b>No values have been submitted yet.</b>
<%
} else {
%>
<b> Last submitted values:</b><br>
<table>
<tr>
<td>
<b>Name: </b>
</td>
<td>
<b><%= providerSession.getAttribute(sName) %></b>
</td>
</tr>
<tr>
<td>
<b>Age: </b>
</td>
<td>
<b><%= providerSession.getAttribute(sAge) %></b>
</td>
</tr>
<tr>
<td>
<b>Telephone: </b>
</td>
<td>
<b><%= sTelephone %></b>
</td>
</tr>
</table>
<%
%>
</center>
<%
%>
<!-- End output the HTML content -->
Can somebody please help me on this?
ThanksHello,
Let me know if the answer that I made Help needed: JSP and portal parameter problem.
Regards
Tugdual Grall -
Catch problem for JSPs, can't i use Oracle9iAS for our Application ?
Hi,
I have deployed .ear file by using OC4J. I am facing catch problem, in defferent situations.
1. We used pager tag library for search nagivation, it is not working proper.
2. 'Creation of new object(in my case enterprise,certificate,role etc.)' is not working
properly. What ever i try to create it is giving Error in
TrainiumPKCallBean :javax.ejb.DuplicateKeyException: Entity already exists
3. And some of my pages not giving proper results, but if i edit that .jsp file, then it
gives correct request for that time. If i want correct result, then again i have to edit and
save that page.
I belive all the above problems are coming due to catch.
If this problem continues, we can't use Oralce9iAs.
please give me solution..
thanks in advance
srinivas.Hi Srinivas,
I must admit, I had difficulty understanding your question. With your
permission, I'll try and rephrase it. Hopefully I have understood it
correctly, and can offer something constructive.
I assume that "TrainiumPKCallBean" is a CMP entity bean. You are invoking
the "create()" method in that bean's home interface from your JSP, correct?
When you invoke the "create()" method of a CMP entity bean's home interface,
OC4J will try and insert a row into the relevant database table(s).
A "DuplicateKeyException" means that OC4J is trying to insert a row
that has a primary key of an already existing row in the database
table. The only way to avoid the "DuplicateKeyException" is either
try to use a different primary key value, or delete the row from the
database table with the primary key that you are trying to insert.
So I suppose that by editing the JSP, you are changing the primary
key value to something that doesn't already exist in the database.
Unfortunately, based on the (lack of) information you have supplied,
I can't offer anything else -- sorry {:-(
If you wouldn't mind supplying the following information -- it may
help me to help you solve your problem(s).
1. Version of OC4J
2. JDK version
3. Operating system
4. Complete error message and stack trace
5. Part(s) of the code that are causing the problem
Good Luck,
Avi. -
Urgent Solution needed--Problem in JSP compilation with JDK 1.5 and JDK 1.6
Hi,
I m using JDK 1.5 and Tomcat 5.0 the problem is that after starting server when I m going to access my application at that time instead of displaying HomePage it directly display the blank page on screen.
After analyzing tomcat log I have found that there was a problem with JSP page compilation.
The exception logged in Tomcat Log is given below
An error occurred at line: 1 in the generated java file
The type Collection is not generic; it cannot be parameterized with arguments <? extends E>
Stacktrace:
* at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)*
* at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)*
* at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)*
* at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)*
* at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)*
* at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)*
* at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)*
* at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)*
* at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)*
* at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)*
* at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)*
* at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)*
* at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)*
* at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)*
* at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:447)*
* at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)*
* at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)*
* at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:424)*
* at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:343)*
* at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)*
* at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)*
* at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)*
* at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)*
* at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)*
* at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)*
* at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)*
* at java.lang.Thread.run(Thread.java:619)*
After getting this kind of error I have analyzed my code furhter then I came to know that there was problem with static include tag.
In my jsp page I have used following line which is the main cause of error
<%@ include file="top.jsp" %>If I ommit this line then it is working properly.
Instead of static include I have used jsp:include also.
Still I m getting same problem.
We have to migrated from JDK 1.5 to 1.6 and Tomcat 5.0.28 to 6.0.14, still same problem is there.
We have tried a lot but didnt get success to overcome this problem.
If anybody having any solution then ur each reply will be appreciated.
Thanks in advance..........!!!!!!!
Edited by: JBOSS2000 on Jan 15, 2008 9:29 AMHi "mshanu" and "amit" Thanks for ur replies Here I m posting the code of "top.jsp"........!!!!
<%@ page errorPage="errordisplay.jsp"%>
<table cellpadding="0"
cellspacing="0" height=50 width=780>
<tbody>
<tr class="header">
<td class="logo"><IMG SRC="assets/Logo.gif" BORDER=0 ALIGN=top></td>
<td align="right"><span class="applicationtitle"><%@ include file="/contents/logo.htm" %></span><br>
<span class="companyname"><%@ include file="/contents/companyname.htm" %></span></td>
</tr>
</tbody>
</table>To include top.jsp I have tried
<jsp:include page="top.jsp" flush="true">
</jsp:include>
AND
<%@ include file="top.jsp"%>but none of this worked.
If I remove the include then It is working properly.
But I need inluded file too so that I am wondoring for the solution.
This problem seems very wiered to me. I dont know why it is happening.
This problem is started only when I used the TOMCAT 6.14.
Is it the bug of TOMCAT 6.14 or What somebody Plz help.
I got stuck here.........!!!!!!!!!!
It doesn't seem any problem with top.jsp. As per my thinking the problem is there in include due to that it doesn't compile the JSP page in Tomcat 6.0.
Earlier I am having same code running on the Tomcat 5.0.28 and JDK 1.5.0.
But problem occured when I have used Tomcat 6.x...!! -
Problem on open Preference in CMC: Unable to compile class for JSP
Hi all,
I meet problem when opening Preference in CMC.
When I click "Web Intelligence" or "Desktop Intelligence", the following message will be display:
An error has occurred:
Unable to compile class for JSP
I have check for catalina.out in tomcat, following error comes out:
java.io.FileNotFoundException: /opt/boe/bobje/tomcat/work/Catalina/localhost/AnalyticalReporting/org/apache/jsp/jsp/User_005fWebiPreferences/user_005fwebipreferences_jsp.java (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:140)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1759)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1596)
at com.businessobjects.webutil.struts.CrystalUTF8InputActionServlet.process(CrystalUTF8InputActionServlet.java:32)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Please help to indicate where is the problem. Many thanks.
Regards,
MayHi all,
I meet problem when opening Preference in CMC.
When I click "Web Intelligence" or "Desktop Intelligence", the following message will be display:
An error has occurred:
Unable to compile class for JSP
I have check for catalina.out in tomcat, following error comes out:
java.io.FileNotFoundException: /opt/boe/bobje/tomcat/work/Catalina/localhost/AnalyticalReporting/org/apache/jsp/jsp/User_005fWebiPreferences/user_005fwebipreferences_jsp.java (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:140)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1759)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1596)
at com.businessobjects.webutil.struts.CrystalUTF8InputActionServlet.process(CrystalUTF8InputActionServlet.java:32)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Please help to indicate where is the problem. Many thanks.
Regards,
May -
Problem installing BEA Workshop for jsp
Hi,
I am trying to install the BEA Workshop for JSP. Though when I satisfy min jdk version as shown, I still into installation problems.
C:\Profiles\sys1mi\Desktop\temp>java -version
java version "1.4.2_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.
Java HotSpot(TM) Client VM (build 1.4.2_11-b06, mixed mode)
I had multiple JDK versions which I deleted but still unable to install. Below is the attached log. Please let me know if this helps.
Thanks,
Prateek
looking in C:\Program Files\Java\j2re1.4.2_11\bin
Found: C:\Program Files\Java\j2re1.4.2_11\bin\java.exe
Found: C:\Program Files\Java\j2re1.4.2_11\bin\javaw.exe
looking in C:\Program Files\JavaSoft\JRE\1.3.1_02\bin
looking in C:\Program Files\JavaSoft\JRE\1.3.1_02\bin
looking in C:\Program Files\Java\j2re1.4.2_11\bin
Found: C:\Program Files\Java\j2re1.4.2_11\bin\java.exe
Found: C:\Program Files\Java\j2re1.4.2_11\bin\javaw.exe
looking in C:\Program Files\Java\j2re1.4.2_03\bin
Found: C:\Program Files\Java\j2re1.4.2_03\bin\java.exe
Found: C:\Program Files\Java\j2re1.4.2_03\bin\javaw.exe
looking in C:\Program Files\Java\j2re1.4.2_11\bin
Found: C:\Program Files\Java\j2re1.4.2_11\bin\java.exe
Found: C:\Program Files\Java\j2re1.4.2_11\bin\javaw.exe
...Finished searching through the registry for VMs
Searching through the path for VMs...
Looking in C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\bin
Found: C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\bin\java.exe
Found: C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\bin\javaw.exe
Looking in C:\PROGRA~1\FileNet\IDM
Looking in C:\PROGRA~1\FileNet\Shared
Looking in C:\Program Files\CA\SharedComponents\PEC\bin
Looking in C:\WINNT\system32
Ignoring 'C:\WINNT\system32\java.exe' because it is in a Windows System Dire
ctory.
Ignoring 'C:\WINNT\system32\javaw.exe' because it is in a Windows System Dir
ectory.
Ignoring 'C:\WINNT\system32\jre.exe' because it is in a Windows System Direc
tory.
Ignoring 'C:\WINNT\system32\jrew.exe' because it is in a Windows System Dire
ctory.
Found: C:\WINNT\system32\jview.exe
Found: C:\WINNT\system32\wjview.exe
Looking in C:\WINNT
Ignoring 'C:\WINNT\java.exe' because it is in a Windows System Directory.
Ignoring 'C:\WINNT\javaw.exe' because it is in a Windows System Directory.
Ignoring 'C:\WINNT\jre.exe' because it is in a Windows System Directory.
Ignoring 'C:\WINNT\jrew.exe' because it is in a Windows System Directory.
Looking in C:\WINNT\System32\Wbem
Looking in c:\Fusa\DLL
Looking in C:\TD
Looking in C:\Program Files\CA\AllFusion Harvest Change Manager
Looking in C:\Progra~1\OraNT\9i\bin
Looking in C:\Program Files\IBM\Trace Facility\
Looking in C:\Program Files\IBM\Personal Communications\
Looking in C:\Program Files\F-Secure\Ssh\program
Looking in C:\PROGRAM FILES\ULTRAEDIT
Looking in C:\Program Files\FileNet\FNSW\CLIENT\BIN
Looking in C:\Program Files\FileNet\FNSW\CLIENT\SHOBJ
Looking in C:\Program Files\IONA\Orbix_2.3c\BIN
Looking in C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\bin
Found: C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\bin\java.exe
Found: C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\bin\javaw.exe
Looking in C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\bin
Found: C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\bin\java.exe
Found: C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\bin\javaw.exe
Looking in C:\PROGRA~1\FileNet\IDM
Looking in C:\PROGRA~1\FileNet\Shared
Looking in C:\Program Files\CA\SharedComponents\PEC\bin
Looking in C:\WINNT\system32
Ignoring 'C:\WINNT\system32\java.exe' because it is in a Windows System Dire
ctory.
Ignoring 'C:\WINNT\system32\javaw.exe' because it is in a Windows System Dir
ectory.
Ignoring 'C:\WINNT\system32\jre.exe' because it is in a Windows System Direc
tory.
Ignoring 'C:\WINNT\system32\jrew.exe' because it is in a Windows System Dire
ctory.
Found: C:\WINNT\system32\jview.exe
Found: C:\WINNT\system32\wjview.exe
Looking in C:\WINNT
Ignoring 'C:\WINNT\java.exe' because it is in a Windows System Directory.
Ignoring 'C:\WINNT\javaw.exe' because it is in a Windows System Directory.
Ignoring 'C:\WINNT\jre.exe' because it is in a Windows System Directory.
Ignoring 'C:\WINNT\jrew.exe' because it is in a Windows System Directory.
Looking in C:\WINNT\System32\Wbem
Looking in c:\Fusa\DLL
Looking in C:\TD
Looking in C:\Program Files\CA\AllFusion Harvest Change Manager
Looking in C:\Progra~1\OraNT\9i\bin
Looking in C:\Program Files\IBM\Trace Facility\
Looking in C:\Program Files\IBM\Personal Communications\
Looking in C:\Program Files\F-Secure\Ssh\program
Looking in C:\PROGRAM FILES\ULTRAEDIT
Looking in C:\Program Files\FileNet\FNSW\CLIENT\BIN
Looking in C:\Program Files\FileNet\FNSW\CLIENT\SHOBJ
Looking in C:\Program Files\IONA\Orbix_2.3c\BIN
Looking in C:\LOGS\user\temp_installs\apache-ant-1.7.0\bin
Looking in C:\Program Files\GnuWin32\bin
...Finished searching through the path for VMs
ORDERING VMS
1: C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\bin\java.exe (in path)
2: C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\bin\javaw.exe (in path)
3: C:\WINNT\system32\jview.exe (in path)
4: C:\WINNT\system32\wjview.exe (in path)
5: C:\Program Files\Java\j2re1.4.2_03\bin\java.exe (in registry at HKEY_LOCAL_MA
CHINE\SOFTWARE\JavaSoft\Java Plug-in\1.4.2_03)
6: C:\Program Files\Java\j2re1.4.2_03\bin\javaw.exe (in registry at HKEY_LOCAL_M
ACHINE\SOFTWARE\JavaSoft\Java Plug-in\1.4.2_03)
7: C:\Program Files\Java\j2re1.4.2_11\bin\java.exe (in registry at HKEY_LOCAL_MA
CHINE\SOFTWARE\JavaSoft\Java Plug-in\1.4.2_11)
8: C:\Program Files\Java\j2re1.4.2_11\bin\javaw.exe (in registry at HKEY_LOCAL_M
ACHINE\SOFTWARE\JavaSoft\Java Plug-in\1.4.2_11)
9: C:\Program Files\Java\j2re1.4.2_11\bin\java.exe (in registry at HKEY_LOCAL_MA
CHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.4)
10: C:\Program Files\Java\j2re1.4.2_11\bin\javaw.exe (in registry at HKEY_LOCAL_
MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.4)
11: C:\Program Files\Java\j2re1.4.2_03\bin\java.exe (in registry at HKEY_LOCAL_M
ACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.4.2_03)
12: C:\Program Files\Java\j2re1.4.2_03\bin\javaw.exe (in registry at HKEY_LOCAL_
MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.4.2_03)
13: C:\Program Files\Java\j2re1.4.2_11\bin\java.exe (in registry at HKEY_LOCAL_M
ACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.4.2_11)
14: C:\Program Files\Java\j2re1.4.2_11\bin\javaw.exe (in registry at HKEY_LOCAL_
MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.4.2_11)
Searching for console vm.
lax.nl.valid.vm.list=J2 J1 MSJ
lax.nl.current.vm=.
was not a valid Win32 executable.
SUCCESS! C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\bin\java.exe
Using JNI INVOCATION to simulate the following batch script:
BATCH SCRIPT
cd "C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\Windows"
set CLASSPATH=C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\InstallerData\IAClass
es.zip;C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\Windows\resource\jdglue.zip;
C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\InstallerData\Execute.zip;C:\Profil
es\sys1mi\LOCALS~1\Temp\I1180638584\Windows\InstallerData\Execute.zip;C:\Profile
s\sys1mi\LOCALS~1\Temp\I1180638584\InstallerData\Resource1.zip;C:\Profiles\sys1m
i\LOCALS~1\Temp\I1180638584\Windows\InstallerData\Resource1.zip;C:\Profiles\sys1
mi\LOCALS~1\Temp\I1180638584\InstallerData;C:\Profiles\sys1mi\LOCALS~1\Temp\I118
0638584\Windows\InstallerData;
C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\bin\java.exe -Xms16777216 -Xmx503
31648 -noverify com.zerog.lax.LAX C:\\Profiles\\sys1mi\\LOCALS~1\\Temp\\I1180638
584\\Windows\\WorkshopInstaller.lax C:\\Profiles\\sys1mi\\LOCALS~1\\Temp\\env.pr
op
executing java...
LAX Version = 5.5
IAResourceBundle: create resource bundle: en
LOADING Resource path: i18nresources\custom_en
LOADING Resource path: locales\custom_en
seaFilename = WorkshopInstaller
Default properties location = C:\Profiles\sys1mi\Desktop\temp\
Installer PropertiesFile = C:\Profiles\sys1mi\Desktop\temp\installer.properties
UI Mode set to Default - SWING.
InstallAnywhere 6.0 Enterprise
Thu May 31 15:10:23 EDT 2007
Free memory = 14953 kB
Total memory = 16320 kB
No arguments.
java.class.path:
C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\InstallerData\IAClasses.zip
C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\Windows\resource\jdglue.zip
C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\InstallerData\Execute.zip
C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\Windows\InstallerData\Execute.z
ip
C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\InstallerData\Resource1.zip
C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\Windows\InstallerData\Resource1
.zip
C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\InstallerData
C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\Windows\InstallerData
C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\lib\dt.jar
C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\lib\htmlconverter.jar
C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\lib\tools.jar
ZGUtil.CLASS_PATH:
C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\InstallerData\IAClasses.zip
C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\Windows\resource\jdglue.zip
C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\InstallerData\Execute.zip
C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\InstallerData
C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\lib\htmlconverter.jar
sun.boot.class.path:
C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\jre\lib\rt.jar
C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\jre\lib\i18n.jar
C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\jre\lib\sunrsasign.jar
C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\jre\lib\jsse.jar
C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\jre\lib\jce.jar
C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\jre\lib\charsets.jar
C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\jre\classes
java.ext.dirs:
C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\jre\lib\ext
java.version == 1.4.2_11 (Java 2+)
java.vm.name == Java HotSpot(TM) Client VM
java.vm.vendor == Sun Microsystems Inc.
java.vm.version == 1.4.2_11-b06
java.vm.specification.name == Java Virtual Machine Specification
java.vm.specification.vendor == Sun Microsystems Inc.
java.vm.specification.version == 1.0
java.specification.name == Java Platform API Specification
java.specification.vendor == Sun Microsystems Inc.
java.specification.version == 1.4
java.vendor == Sun Microsystems Inc.
java.vendor.url == http://java.sun.com/
java.class.version == 48.0
java.compiler == null
java.home == C:\Profiles\sys1mi\temp_installs\j2sdk1.4.2_11\
jre
java.io.tmpdir == C:\Profiles\sys1mi\LOCALS~1\Temp\
os.name == Windows XP
os.arch == x86
os.version == 5.1
path.separator == ;
file.separator == \
file.encoding == Cp1252
user.name == sys1mi
user.home == C:\Profiles\sys1mi
user.dir == C:\Profiles\sys1mi\LOCALS~1\Temp\I1180638584\Wi
ndows
user.language == en
user.region == null
Installer: InstallAnywhere 6.0 Enterprise Build 2262
System's temporary directory = C:\Profiles\sys1mi\Local Settings\Temp
Installer: looking for Win32 DLLs in C:\Profiles\sys1mi\LOCALS~1\Temp\I118063858
4\InstallerData\..\Windows\resource
allocating more
allocating more
allocating more
allocating more
RepositoryManager: lock acquired on: C:\Program Files\Zero G Registry\.com.zerog
.registry.lock
allocating more
allocating more
allocating more
allocating more
IAVariables: Converting property: prop, to: 0000-trial
Searching for Resources - C:\Profiles\sys1mi\Local Settings\Temp\I1180638584\In
stallerData\Disk1\InstData\Resource1.zip
launchDir: C:\Profiles\sys1mi\Desktop\temp
installer.properties exists? true
version: IS_TRIAL_VERSION
prod: 0000
build id=608
versionInfo: major: 3 minor: 3 micro: 0 buildNumber: 608 release name:
java.io.IOException: CreateProcess: $USER_INSTALL_DIR$$/$jre\jre\bin\java.exe -v
ersion error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:66)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)
at com.m7.installer.InstallerUtil.getVersion(InstallerUtil.java:154)
at com.m7.installer.InstallerUtil.checkVersion(InstallerUtil.java:101)
at com.m7.installer.CheckInstallerVM.install(CheckInstallerVM.java:33)
at com.zerog.ia.installer.actions.CustomAction.installSelf(DashoA8113)
at com.zerog.ia.installer.AAMgr.a(DashoA8113)
at com.zerog.ia.installer.AAMgr.a(DashoA8113)
at com.zerog.ia.installer.AAMgr.b(DashoA8113)
at com.zerog.ia.installer.AAMgr.c(DashoA8113)
at com.zerog.ia.installer.AAMgr.a(DashoA8113)
at com.zerog.ia.installer.AAMgr.b(DashoA8113)
at com.zerog.ia.installer.AAMgr.c(DashoA8113)
at com.zerog.ia.installer.AAMgr.a(DashoA8113)
at com.zerog.ia.installer.AAMgr.b(DashoA8113)
at com.zerog.ia.installer.AAMgr.c(DashoA8113)
at com.zerog.ia.installer.AAMgr.a(DashoA8113)
at com.zerog.ia.installer.AAMgr.b(DashoA8113)
at com.zerog.ia.installer.AAMgr.c(DashoA8113)
at com.zerog.ia.installer.AAMgr.a(DashoA8113)
at com.zerog.ia.installer.AAMgr.a(DashoA8113)
at com.zerog.ia.installer.Main.b(DashoA8113)
at com.zerog.ia.installer.Main.d(DashoA8113)
at com.zerog.ia.installer.Main.a(DashoA8113)
at com.zerog.ia.installer.Main.main(DashoA8113)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.zerog.lax.LAX.launch(DashoA8113)
at com.zerog.lax.LAX.main(DashoA8113)
JRE command: $USER_INSTALL_DIR$$/$jre\jre\bin\java.exe -version
JRE version: nullDo you have multiple versions of Java installed? I had a weird problem a
while back with a messed up registry and multiple Java installations.
br
Jessica Gaudette wrote:
Hi,
I am having the identical problem, but with BEA Workshop Studio. I've followed the instructions provided to resolve it, but I still get the same error, What am I doing wrong? Below is my variable:
PATH=C:\Program Files\Java\jdk1.5.0\bin
When I hold down the control button to get the error log it APPEARS to locate the JDK, but at the very end, when it looks for the JRE it is null. -
Revision: 863
Author: [email protected]
Date: 2008-03-19 11:39:05 -0700 (Wed, 19 Mar 2008)
Log Message:
Cleanup the jsp for some space issue that causes problem for proxy test on WAS. Update both trunk and 3.0.x branch.
Modified Paths:
blazeds/branches/3.0.x/qa/apps/qa-regress/remote/HttpXmlEchoService.jsp
blazeds/trunk/qa/apps/qa-regress/remote/HttpXmlEchoService.jspRevision: 863
Author: [email protected]
Date: 2008-03-19 11:39:05 -0700 (Wed, 19 Mar 2008)
Log Message:
Cleanup the jsp for some space issue that causes problem for proxy test on WAS. Update both trunk and 3.0.x branch.
Modified Paths:
blazeds/branches/3.0.x/qa/apps/qa-regress/remote/HttpXmlEchoService.jsp
blazeds/trunk/qa/apps/qa-regress/remote/HttpXmlEchoService.jsp -
I have been on the same problem for 2 days now.... it has become URGENT
==================
CLIENT SIDE
==================
try
srvIntrface = (MyServerInterface) Naming.lookup("rmi://"+server+":1099/Interface");
}catch(Exception e){System.out.println("clientForm, lookup: Error getting the remote service");}
byte[] fileData = srvIntrface.getFile();
This is how i connect to the interface on the client side... AND then get the file
server variable - is the ip of the remote machine
==================
SERVER SIDE
==================
MyServer mySrvr = new MyServer();
Naming.rebind("//localhost:1099/Interface",mySrvr);
this is how i bind the interface to the server
================
PROBLEM
================
i am working on a LAN.... when i run the above codes on one of the machines e.g. machine1.... the machine1 works fine and can get the file from machine 2. but when i run it on machine 2 and try to get the file from machine 1 following exception occurs
Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect
Please helpThank you for your responses....
i do run the registry on both machines...
as such
"start rmiregistry 1099"
plus i system.out the variable "server" with your suggestion.... it gives out the correct ip of the machines to be looked up!
e.g.
if i want to connect to 192.168.1.2.... the server variable is gives out the correct ip...
i have been trying to solve this problem for a very long time... but can't seem to find a way around it...
this is how i run my server and client
java -Djava.rmi.server.codebase=file:/C:j2sdk1.4.2_04\bin/ -Djava.rmi.server.hostname=localhost
-Djava.security.policy=java.policy MyServer
java -Djava.rmi.server.codebase=file:/C:j2sdk1.4.2_04\bin/ -Djava.security.policy=java.policy MyClient
my policy file is: just wanted to be very relaxed
grant {
permission java.net.SocketPermission "*:*","connect,accept,resolve";
permission java.net.SocketPermission.AllPermission;
permission java.security.AllPermission;
permission java.io.FilePermission "c:\\j2sdk1.4.2_04/bin\\-","read,write,delete";
Plz help -
DropDown List Problem for Dynamic Store Proc Parameter in SAP B1 8.8
I am working with the crystal report 2008 in SAP B1 8.8 and the report is used the Store Proc for retrieving data. As i need to show a list of Documnet No (DOCNUM) from Sales Order (ORDR) and Purchase Order (OPOR) for the users to select, i use the Dynamic Parameter as for the Store Proc parameter (@Contno), However, the drop down list can be shown fine in Crystal Report, but cant be shown in "Report Selection Criteria" while opening the Crystal Report through SAP B1.
Therefore, can anyone tell me how to add the dynamic drop down list (cause the documnet no list will be changed very frequently) in the SAP B1 8.8 "Report Selection Criteria" screen.
Thanks!!Classic Crystal Reports and Classic SAP connectivity questions
Classic Crystal Reports and Classic SAP connectivity questions -
Problems for displaying values
Hi,
Iam using struts and hibernate, am inserting values into database successfully. But am facing some problem for displaying values in VIEW page.. Am maintainig Session in action servlet..In jsp page only first row displayed numbertimes(depends on number rows in DB) ex i have 4 rows different values. But in View page only first row displayed 4 times. How can i displyed properly .plz help me its urgent?
in advance thanks?Hi Amol,
in the iview property is the isolation method set to url or to embeded(it should be url)because this might cause the problems described here.
hope it helps,
Yoav -
Hi,
Iam using struts and hibernate, am inserting values into database successfully. But am facing some problem for displaying values in VIEW page.. Am maintainig Session in action servlet..In jsp page only first row displayed numbertimes(depends on number rows in DB) ex i have 4 rows different values. But in View page only first row displayed 4 times. How can i displyed properly .plz help me its urgent?
in advance thanks?Babu,
This has been discussed in many old threads, try to find them. Also u can refer to article "Dependent Dynamic message choicelists ", at my blog
http://www.mukx.blogspot.com/
--Mukul -
Repeating parameter names in jsp:include
Hi,
I have this jsp code fragment:
<div>
<jsp:include page="fragment_1.jsp">
<jsp:param name="param" value="hello world!"/>
</jsp:include>
<jsp:include page="fragment_2.jsp">
<jsp:param name="param" value="good morning!"/>
</jsp:include>
</div>
When this code executes, the value for param, as the fragment_2 is included, is "hello world!" and not "good morning!".
How can I use the same name for a param in fragment_2 ?
PietroThe problem is that nothing in the servlet specifications prohibits a requests from having more that one parameter with the same name. It looks that when you set a parameter with the jsp:param tag that it is appending another parameter with that name.
-
Parameter passing from jsp to jsp in diffrent domain
Hi All,
I need to pass parameter from one jsp to other in diffrent domain.
I am using
<form name ="menuForm" method="post" action="http://xxx/vijay.jsp">
<input type="text" name="userid" value="<%=mySession.getAttribute("userid")%>">
</form>
The problem i am facing I can't really use this because on the view soure people can see easily what i am passing .Is there any other way i can pass the parameter without exposing them.
VijayThat's an nice suggestion ,I have already have JCE for db password.
but by using
<input type="text" name="userid" value="<%=mySession.getAttribute("userid")%>">
people can still see the contains in the html source.
This is all because they removed
request.setParameter() method
Vijay -
Unable to compile class for JSP
Please can anyone help me to solve this.
Actually,this is the condition.
In my db,there is a table called UserPassword, which has 4
fields(empNo,UserName,password,level). Now I want to do these things:
When the user submits the data to create a new account via HTML form, it submits the data to the file called CreateAcc.jsp. In this file it perform some logic,here are they.
1)To check the empNo,if it is already exist in the DB,
if empNo =exist then display error.(record already exist)
if empNo =notexist then do task 2).
2)check the UserName,if it is already exist in the db,
if UserName=exist then display error.(because it's a primary key)
if UserName=notexist then do task 3).
3)Create a new user account and save it to the db.
To do these tasks,I never create a new objects for the tasks 1) and 2).
only for task 3)create an object.
Is it the right way?
Here is the file CreateAcc.jsp
<%@ page language="java" %>
<%@ page import="core.UserAccManager" %>
<%@ page import="data.UserPassword" %>
<jsp:useBean id="UserAccManager" class="core.UserAccManager" scope="session"/>
<jsp:setProperty name="UserAccManager" property="*"/>
<jsp:useBean id="UserPassword" class="data.UserPassword" scope="session"/>
<jsp:setProperty name="UserPassword" property="*"/>
<%
String nextPage ="MainForm.jsp";
if(UserPassword.verifyEmpno()){
if(UserPassword.verifyUsername()){
if(UserPassword.createAcc()) nextPage ="MsgAcc.jsp";
}else{
nextPage="UserNameExist.jsp";
else{
nextPage="UserAccError.jsp";
%>
<jsp:forward page="<%=nextPage%>"/>The directory structure:
UserPassword.java- F:/Project/core/data/UserPassword.java
UserAccManager.java - F:/Project/core/UserAccManager.java
Now both are compiling.I put the class files into the TOMCAT,as follows.
UserAccManager.class - webapps/mySystemName/WEB-INF/classes/core/
UserPassword.class - webapps/mySystemName/WEB-INF/classes/core/data/
Here is the full code of the file UserAccManager.java.
package core; //Is this right?
import data.UserPassword; //Is this right?
import java.io.*;
import java.sql.*;
import java.util.*;
import javax.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public final class UserAccManager{
private static final String DRIVER = "com.mysql.jdbc.Driver";
private static final String URL = "jdbc:mysql://localhost:3306/superfine";
private static Connection connection;
private static PreparedStatement pstmt1;
private static PreparedStatement pstmt2;
private static PreparedStatement pstmt3;
private UserAccManager(){
// Initializes the connection and statements
public static void initConnection() {
if (connection == null) {
try {
String sql;
// Open the database
Class.forName(DRIVER).newInstance();
connection = DriverManager.getConnection(URL);
// Prepare the statements
sql = "SELECT * FROM UserPassword where empNo= ?";
pstmt1 = connection.prepareStatement(sql);
sql = "SELECT UserName FROM UserPassword where UserName= ?";
pstmt2 = connection.prepareStatement(sql);
sql ="INSERT INTO UserPassword VALUES(?,?,?,?)";
pstmt3 = connection.prepareStatement(sql);
catch (Exception ex) {
System.err.println(ex.getMessage());
// Closes the connection and statements
// Method to be called by main class when finished with DB
public void closeConnection() {
//same as previous
public static boolean verifyEmpno(int empno) {
boolean emp_no_select_ok = false;
int emp = -1;
initConnection();
try {
pstmt1.setInt(1, empno);
ResultSet rs1 = pstmt1.executeQuery();
while(rs1.next()){
emp=rs1.getInt("empNo");
if(emp>0)
emp_no_select_ok = false;
} else{
emp_no_select_ok = true;
rs1.close();
pstmt1.close();
catch (Exception ex) {
System.err.println(ex.getMessage());
return emp_no_select_ok;
public static boolean verifyUsername(String username) {
boolean user_name_select_ok = false;
String user = "xxxx";
initConnection();
try {
pstmt2.setString(1, username);
ResultSet rs2 = pstmt2.executeQuery();
while(rs2.next()){
user=rs2.getString("UserName");
if(!user.equals("xxxx"))
user_name_select_ok = false;
} else{
user_name_select_ok = true;
rs2.close();
catch (Exception ex) {
System.err.println(ex.getMessage());
return user_name_select_ok;
public static boolean createAcc(int empno, String username, String password, int
level){
boolean create_acc_ok = false;
initConnection();
try{
//create a new object,from the UserPassword table.
UserPassword useraccount = new UserPassword();
useraccount.setEmpno(empno);
useraccount.setUsername(username);
useraccount.setPassword(password);
useraccount.setLevel(level);
//assign value for ???
pstmt3.setInt(1, useraccount.getEmpno());
pstmt3.setString(2, useraccount.getUsername());
pstmt3.setString(3, useraccount.getPassword());
pstmt3.setInt(4, useraccount.getLevel());
if(pstmt3.executeUpdate()==1) create_acc_ok=true;
pstmt3.close();
//con.close();
catch(SQLException e2){
System.err.println(e2.getMessage());
return create_acc_ok;
}here is the bean (part of it)
package data; //is it right?
import java.io.*;
import java.sql.*;
import java.util.*;
import javax.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class UserPassword
private int empno;
private String username;
private String password;
private int level;
// Constructor
public UserPassword()
this.empno = empno;
this.username = username;
this.password = password;
this.level = level;
// setters and getters are here.
// public boolean verifyEmpno() {
// return UserAccManager.verifyEmpno(empno);
// public boolean verifyUsername(String username) {
// return UserAccManager.verifyUsername(username);
// These 2 methods not compile with or without para's.So I leave that job for the
//controll class UserAccManager.java.
Now my problem is this: When I submit data, there is an error;org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Compiling 1 source file
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:8:
cannot access core.data.UserPassword
bad class file: C:\Program Files\Apache Group\Tomcat
4.1\webapps\HRM\WEB-INF\classes\core\data\UserPassword.class
class file contains wrong class: data.UserPassword
Please remove or make sure it appears in the correct subdirectory of the classpath.
import core.data.UserPassword;
^
1 error
Are there any mistakes? If so tell me where is it and how to change them.Please help.I try it that way, but it don't compile.
Error:core\data\UserPassword.java:package javax.servlet does not exist
import javax.servlet.*;
core\data\UserPassword.java:package javax.servlet.http does not exist
import javax.servlet.http.*;
So,I comment them only in the UserPassword.java file,and compile it again.
Then it compile well.I goto the directory to get the .class files.
But there is only UserPassword.class inside the data folder. There is not
UserAccManager.class in the core folder.
Then I try this way,I put my 2 java files in to a new folder,
F:\SystemName\com
When I try it that way, but it don't compile.
javac -classpath . -d . com\*.javaError:com\UserPassword.java:package javax.servlet does not exist
import javax.servlet.*;
com\UserPassword.java:package javax.servlet.http does not exist
import javax.servlet.http.*;
So,I comment them only in the UserPassword.java file,and compile it again.
Now both are compiling well.There was 2 class files.
I put them in to the WEB-INF/classes/com directory.
Start the server.But it gave errors:
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:68: cannot resolve symbol
symbol : variable empno
location: class org.apache.jsp.CreateAcc_jsp
if(UserPassword.verifyEmpno(empno)){
^
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:69: cannot resolve symbol
symbol : variable username
location: class org.apache.jsp.CreateAcc_jsp
if(UserAccManager.verifyUsername(username)){
^
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:69: non-static method
verifyUsername(java.lang.String) cannot be referenced from a static context
if(UserAccManager.verifyUsername(username)){
^
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: cannot resolve symbol
symbol : variable empno
location: class org.apache.jsp.CreateAcc_jsp
if(UserAccManager.createAcc(empno, username,password,level)) nextPage
="MsgAcc.jsp";
^
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: cannot resolve symbol
symbol : variable username
location: class org.apache.jsp.CreateAcc_jsp
if(UserAccManager.createAcc(empno, username,password,level)) nextPage
="MsgAcc.jsp";
^
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: cannot resolve symbol
symbol : variable password
location: class org.apache.jsp.CreateAcc_jsp
if(UserAccManager.createAcc(empno, username,password,level)) nextPage
="MsgAcc.jsp";
^
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: cannot resolve symbol
symbol : variable level
location: class org.apache.jsp.CreateAcc_jsp
if(UserAccManager.createAcc(empno, username,password,level)) nextPage
="MsgAcc.jsp";
^
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: non-static method
createAcc(int,java.lang.String,java.lang.String,int) cannot be referenced from a static
context
if(UserAccManager.createAcc(empno, username,password,level)) nextPage
="MsgAcc.jsp";
^
8 errorsTo solve the problem non-static method,I goto the UserAccManager.java file and do these
things.
package com;
import java.io.*;
import java.sql.*;
import java.util.*;
import javax.sql.*;
//import javax.servlet.*; //otherwise it tells an error.(package
//javax.servlet does not exist)
//import javax.servlet.http.*;
public class UserAccManager {
private static final String DRIVER = "com.mysql.jdbc.Driver";
private static final String URL = "jdbc:mysql://localhost:3306/superfine";
private static Connection connection;
private static PreparedStatement pstmt1;
private static PreparedStatement pstmt2;
private static PreparedStatement pstmt3;
private UserAccManager() {
// Initializes the connection and statements
private static void initConnection() {
//same
// Closes the connection and statements
// Method to be called by main class when finished with DB
public static void closeConnection() {
//same
public static boolean verifyEmpno(int empno) {
// same.
public static boolean verifyUsername(String username) {
//same.
public static boolean createAcc(int empno, String username, String password, int
level){
//same
package com;
import java.io.*;
import java.sql.*;
import java.util.*;
import javax.sql.*;
//import javax.servlet.*;
//import javax.servlet.http.*;
public class UserPassword {
// same
Again compile those files and put .class filses into the WEB-INF/classes/com directory.
When i submits the data via the form it generates an error:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 9 in the jsp file: /CreateAcc.jsp
Generated servlet error:
[javac] Compiling 1 source file
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:68: cannot resolve symbol
symbol : variable empno
location: class org.apache.jsp.CreateAcc_jsp
if(UserAccManager.verifyEmpno(empno)){
^
An error occurred at line: 9 in the jsp file: /CreateAcc.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:69: cannot resolve symbol
symbol : variable username
location: class org.apache.jsp.CreateAcc_jsp
if(UserAccManager.verifyUsername(username)){
^
An error occurred at line: 9 in the jsp file: /CreateAcc.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: cannot resolve symbol
symbol : variable empno
location: class org.apache.jsp.CreateAcc_jsp
if(UserAccManager.createAcc(empno, username,password,level)) nextPage
="MsgAcc.jsp";
^
An error occurred at line: 9 in the jsp file: /CreateAcc.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: cannot resolve symbol
symbol : variable username
location: class org.apache.jsp.CreateAcc_jsp
if(UserAccManager.createAcc(empno, username,password,level)) nextPage
="MsgAcc.jsp";
^
An error occurred at line: 9 in the jsp file: /CreateAcc.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: cannot resolve symbol
symbol : variable password
location: class org.apache.jsp.CreateAcc_jsp
if(UserAccManager.createAcc(empno, username,password,level)) nextPage
="MsgAcc.jsp";
^
An error occurred at line: 9 in the jsp file: /CreateAcc.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\HRM\CreateAcc_jsp.java:70: cannot resolve symbol
symbol : variable level
location: class org.apache.jsp.CreateAcc_jsp
if(UserAccManager.createAcc(empno, username,password,level)) nextPage
="MsgAcc.jsp";
^
6 errorshere is the CreateAcc.jsp file
<%@ page language="java" %>
<%@ page import="com.UserAccManager" %>
<%@ page import="com.UserPassword" %>
<jsp:useBean id="userPassword" class="com.UserPassword" scope="request"/>
<jsp:setProperty name="userPassword" property="*" />
<%
String nextPage ="MainForm.jsp";
if(UserAccManager.verifyEmpno(empno)){
if(UserAccManager.verifyUsername(username)){
if(UserAccManager.createAcc(empno, username,password,level)) nextPage
="MsgAcc.jsp";
}else{
nextPage="UserNameExist.jsp";
else{
nextPage="UserAccError.jsp";
%>
<jsp:forward page="<%=nextPage%>"/>Please, anyone know how to send these parameters to the java file.
Thanks. -
Problem for creation of PO for different company code
I have problem for creation of PO using ME21 for different company code.Order is not created.
Please give reply it is urgent.Hi Mansih,
I don´t understand what is your exact problem, as I don´t see any company code being specified. But maybe you should check in XK03 that the vendor master data is created for this company code/purchasing organisation!
Have a nice day!
Maybe you are looking for
-
How can I keep Lightroom 5 from taking up space on my local hard drive?
I have a relatively large photo catalog (200k photos +) that I am in the process of paring down with the help of Lightroom 5. Along the way I have kept certain groups of photos published to Flickr using Smart Photosets so that if I eliminate a dupli
-
IPhone can no longer connect to AT&T network, just says No Service1
Ever since I returned from a trip to Canada my iPhone has been unable to connect to the AT&T network. It worked fine before I crossed re boarder into Canada last week and while in Canada it was able to connect to the Rogers network. Since I crossed b
-
Mapping Logical Systems sap-wd-arfc-useSys
Hi all, I saw many many threads about this issue because sometimes seems to work but it doesn´t works for me. So far I did the following: Configure 4 JCO´s: SAP_R3_HumanResources SAP_R3_HumanResources_Metadata These two points to my Dev environment S
-
Hi, Could any one please post me the certification matrix for Oracle Database 11g for all platforms include the type of installation such as EE,SE1 or SE. RDBMS 11g Standard Edition supported as metadata repository for Oracle Application server 10gR2
-
I am not capable any more of deleting elements of my list of itunes wishes
I am not capable any more of deleting elements of my list of itunes wishes What can i do???