Jsp load Javabean contains jpanel
how do i load login ( jpaneled gui ) bean in JSP. pls give me any example code
login bean contains jpanel, jlabel, jtextfield, jpasswordfield, jbutton
Not a assignment. i have login jpanel and i want to place in jsp page. Pls let me know how can i place javax components in jsp. help on this
Similar Messages
-
Getting error while passing implicit request object from JSP to JavaBean
Hi,
I am getting error while passing implicit object ie( request object)
from within JSP to JavaBean.
Following is source for JSP, JavaBean and Error message I am getting.
vaLookup.jsp Source
<jsp:useBean id="db" class="advisorinsight.javabeans.DisplayPages"
scope="request">
<jsp:setProperty name="db" property="request" value="<%= request %>"
/>
</jsp:useBean>
<jsp:getProperty name="db" property="totalrecords" />
JAVABEAN DisplayPages.java source
package javabeans;
import java.io.Serializable;
import javax.servlet.http.HttpServletRequest;
public final class DisplayPages implements Serializable {
private String totalrecords;
private HttpServletRequest request;
public void setRequest(HttpServletRequest req){
this.request = req;
public java.lang.String getTotalrecords()
this.totalrecords =
this.request.getParameter("totalrecords");
return this.totalrecords;
public DisplayPages(){
totalrecords = "";
request = null;
error after executing vaLookup.jsp
[30/Nov/2001 11:56:04:5] info: EXTMGR-006: GXExtensionManager: Extension
service JavaExtData successfully loaded
[30/Nov/2001 11:56:04:5] info: EXTMGR-006: GXExtensionManager: Extension
service LockManager successfully loaded
[30/Nov/2001 11:56:04:5] info: EXTMGR-006: GXExtensionManager: Extension
service RLOPManager successfully loaded
[30/Nov/2001 11:56:04:5] info: REQ-012: thread add
[30/Nov/2001 11:56:04:5] info: REQ-012: thread add
[30/Nov/2001 11:56:04:5] info: REQ-012: thread add
[30/Nov/2001 11:56:04:5] info: REQ-012: thread add
[30/Nov/2001 11:56:04:5] info: REQ-012: thread add
[30/Nov/2001 11:56:04:5] info: REQ-012: thread add
[30/Nov/2001 11:56:04:5] info: REQ-012: thread add
[30/Nov/2001 11:56:04:5] info: REQ-012: thread add
[30/Nov/2001 11:56:04:7] info: ENGINE-ready: ready: 10819
[30/Nov/2001 11:56:46:0] info: --------------------------------------
[30/Nov/2001 11:56:46:0] info: JSPRunnerSticky: init
[30/Nov/2001 11:56:46:0] info: --------------------------------------
[30/Nov/2001 11:56:51:7] error: Exception: SERVLET-compile_failed:
Failed in compiling template: /va/valookup.jsp, javac error:
c:\iplanet\ias6\ias\APPS\variabl
S\va\valookup.java:76: Undefined variable: JSP_8
db.setRequest(_JSP__8);
^
1 error
Exception Stack Trace:
java.lang.Exception: javac error:
c:\iplanet\ias6\ias\APPS\variableannuity\va\WEB-INF\compiled_jsp\jsp\APPS\va\valookup.java:76:
Undefined variable: JSP_8
db.setRequest(_JSP__8);
^
1 error
at
com.netscape.server.servlet.jsp.JSPCompiler.compileJSP(Unknown Source)
at
com.netscape.server.servlet.jsp.JSPCompiler.compileOrLoadJSP(Unknown
Source)
at
com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown
Source)
at
com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown
Source)
at
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callJspCompiler(Unknown
Source)
at
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callUri(Unknown
Source)
at
com.netscape.server.servlet.platformhttp.PlatformHttpServletResponse.callUriRestrictOutput(Unknown
Source)
at
com.netscape.server.servlet.platformhttp.PlatformRequestDispatcher.forward(Unknown
Source)
at com.netscape.server.servlet.jsp.JSPRunner.service(Unknown
Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)The only thing that I see that looks funny to me is when you pass the request object into the method using <%=request%>, Im not sure whats going to happen here because that is suppose to print the results. Have you tried simply using <%request%>?
-
Date loading - Member containing comma in Point-of-View
Hi,
I tried loading date into essbase via planning. My point-of-View contains a member which has comma in it.
When loading it is considering that member as two different members.
Has anyone tried loading data into planning with members having comma.
Eg. Item No.,Start Date,Point-of-View,Data load Cube Name
30103,11-02-2011,"Actual,Version1,Dazzing Infotech, Inc,230"Capex
I have 6 dimensions say.
Dazzing Infotech, Inc is a member in dimension. It has comma which is seperating it as two members.
Error when loading is "Dazzing Infotech" doesn't exist or you do not have access to it.
Has anyone worked on this issue previously.
ThanksCross post :- Data loading - Member containing comma taken in point-of-view
Cheers
John
http://john-goodwin.blogspot.com/ -
The deployment problem in JSP using JavaBean
Hi there,
I followed the descriptions in Writing Enterprise Applications with
Java 2 SDK, Enterprise Edition tutorial to build a set of programs to run JSP with JavaBean, and I also followed the steps in creating new WAR file, but some how it wouldn't work after I deployed them. I run the JSP in IE and got a message like this:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 20 in the jsp file: /1bonus.jsp
Generated servlet error:
c:\j2sdkee1.3.1\repository\orbit\web\JSPRoot\$1bonus$jsp.java:63: Class org.apache.jsp.JBonusBean not found.
JBonusBean jbonus = null;
^
I used the deploytool to create the WAR file, and after I added the 1bonus.jsp, I also added JBonusBean into the WAR file. I found 1bonus.jsp was added into the WAR file, but there's no JBonusBean appeared under the WAR file.
Could you please tell me is there anything wrong?
Thanks for your time.
Regards,
EricI think you have not imported 'BonusBean' in your jsp. Code this line in your jsp at the top.
<%@page import="BonusBean" %>
Sudha -
Hi All,
I need UR help
Problem:
I have a javaBean and a jsp page say test.class and test.jsp respectively.
Now the problem is when i run my jsp in web browser with path
http://localhost:8080/mypackage/test.jsp and use test.class in it. It give me an error Class test.class Not Found but when i give the path http://localhost:8080/examples/jsp/parentpackage/mypackage/test.jsp
it works fine.
I am using Tomcat 3.2 and i have already made changes in server.xml for my jsp files thats why i can run my programs with the earlier path but dont know why its giving the error when i use javabean,
Also i have put my javabean class in---parentpackage/mypackage/test.class
Thanks
Amithi there,
Thanks for you time, here i have placed the source for jsp and javabean
Please excuse me if you find the code unproper
Code for JSP:
<%
response.setHeader("Pragma","No-cache");
response.setDateHeader("Expires",0);
response.setHeader("Cache-control","No-cache");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Internal Clarification-Agent View</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body background="images/c.jpg" bgproperties="fixed">
<%@ page language="java" import="java.sql.*" %>
<%@ page import="javax.servlet.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" session="true"%>
<%@ page import="java.util.Date" %>
<%@ page import="java.sql.Timestamp" %>
<%@ page import="java.text.*" %>
<%@ page import="java.lang.*" %>
<%@ page import="javax.servlet.http.*"%>
<jsp:useBean id="navi" class="arvato.interclarification.rqchunk" scope="session" />
<%
try{
Connection con = null;
PreparedStatement ps = null;
PreparedStatement ps1 = null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:interdsn","","");
String qrno = request.getParameter("qrno");
String rdb = request.getParameter("rb");
String key = request.getParameter("key");
String cname = request.getParameter("cname");
//out.print(key);
//if(st.equals("All")){
String sql="";
if(rdb!=null){
if(rdb.equals("1")){
if(qrno==null||qrno.equals("")){
sql = "SELECT * FROM crequired ORDER BY adate DESC";
else if(qrno!=null){
sql = "SELECT * FROM crequired WHERE queryno LIKE '"+qrno+"%'";
}else if(rdb.equals("2")){
if(key==null||key.equals("")){
sql = "SELECT * FROM crequired ORDER BY adate DESC";
else if(key!=null){
sql = "SELECT * FROM crequired WHERE clarification LIKE '"+key+"%'";
else if(rdb.equals("3")){
if(cname==null||cname.equals("")){
sql = "SELECT * FROM crequired ORDER BY adate DESC";
else if(cname!=null){
sql = "SELECT * FROM crequired WHERE fname LIKE '"+cname+"%'";
if(rdb==null)
sql = "SELECT * FROM crequired ORDER BY adate DESC";
ps = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
//ps.setString(1,space);
/*}else{
sql = "SELECT * FROM crequired WHERE status=? AND space=?";
ps = con.prepareStatement(sql);
ps.setString(1,st);
ps.setString(2,space);
ResultSet rs = ps.executeQuery();
%>
<table width="100%" border="0" cellspacing="0">
<tr>
<td width="50%"><strong><img src="images/microsoftlogo1.jpg" width="288" height="94"></strong></td>
<td width="50%"><div align="right"><strong><img src="images/logo2.jpg" width="177" height="77"></strong></div></td>
</tr>
</table><br>
<hr noshade color="#000000">
<div align="center"><font color="#990000" size="4" face="Verdana, Arial, Helvetica, sans-serif"><strong>CSR
VIEW</strong></font>
</div>
<form name="form" method="post" action="agentview1.jsp">
<table width="59%" border="1" align="center" cellpadding="2" cellspacing="0">
<tr>
<td width="49%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>
<input name="rb" type="radio" value="1" <%if(rdb!=null){if(rdb.equals("1")){out.print("checked");}}%>>
<font size="1">SEARCH BY QUERY NUMBER:</font></strong></font></td>
<td width="51%"><input name="qrno" type="text" id="qrno"></td>
</tr>
<tr>
<td><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<input type="radio" name="rb" value="2" <%if(rdb!=null){if(rdb.equals("2")){out.print("checked");}}%>>
<font size="1"> SEARCH BY KEY WORD:</font></font></strong></td>
<td><input name="key" type="text" id="key"></td>
</tr>
<tr>
<td><input type="radio" name="rb" value="3" <%if(rdb!=null){if(rdb.equals("3")){out.print("checked");}}%>>
<strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">SEARCH
BY CSR NAME:</font></strong></td>
<td><input name="cname" type="text" id="cname"></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="Submit" value="Submit">
</div></td>
</tr>
</table>
</form><br>
Back
<%
navi.setchunk(10);
navi.setRS(rs);
String v="";
String vv=request.getParameter("off");
if(vv==null){v="1";}
else{
v=vv;
int i=Integer.parseInt(v);
navi.setcursor(i);
ResultSet rs2=navi.getRS();
int h1=1;
if(request.getParameter("off")!=null) h1=Integer.parseInt(request.getParameter("off"));
int h2= navi.getchunk();
int h3= navi.getcount();
int offset=(h3-h1)<h2?h3:(h1+h2-1);
%>
<table width=100%><tr><td width=33%> </td><td align=center width=34%><font face="verdana, arial" size=2 color=#000000>Displaying <%=h1%> to <%=offset%> of <font size=4><%=h3 %></font></font></td><td width=33%> </td></tr></table>
<%
int c1=navi.getcount(),c2=navi.getchunk();
int c3=navi.getcursor();
int c4=c3+c2;
int c5=c3-c2;
%>
<table width=100% ><tr><td align=left width=100% >
<%
if(c3>c2 && c3<=c1){
out.print("<a href=\"agentview1.jsp?n=y&off="+c5+"\">Previous</a>");
%></td><td align=right width=100%>
<%
if(c1>c2 && (c1-c3)>=c2){
out.print("<a href=\"agentview1.jsp?n=y&off="+c4+"\">Next</a>");}
%>
</td></tr></table>
<table width="1359" border="0" cellspacing="1">
<tr bgcolor="#3C6C84">
<th width="2%"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">S.No.</font></th>
<th width="5%"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Query No</font></th>
<th width="5%"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Clarification
Posting Date & Time</font></th>
<th width="3%"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Posted
By</font></th>
<th width="6%"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Received
By</font></th>
<th width="3%"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Sub
Process </font></th>
<th width="4%"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Region</font></th>
<th width="5%"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Status</font></th>
<th width="15%"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Clarification
Required OnQuery </font></th>
<th width="18%"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Solution</font></th>
<th width="8%"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Date
& Time Visited On</font></th>
<th width="7%"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Date
& Time Closed On</font></th>
<th width="5%"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Remarks</font></th>
</tr>
<%
int m = 0;
for(int l=0;l<c2 && i<=c1;l++,i++){
//while(rs.next()){
m = m+1;
String queryno = rs.getString("queryno");
//out.print(queryno);
%>
<tr>
<td bgcolor="#FFFFCC"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><%=m%></b></font></td>
<td width="5%" bgcolor="#FFE4CA"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><%=queryno%></b></font></td>
<td bgcolor="#FFFFCC"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
<%Date d1 = rs.getDate("adate");
String dd1="";
SimpleDateFormat sddf = new SimpleDateFormat("MM/dd/yyyy");
dd1 = sddf.format(d1);
Date t1 = rs.getTime("atime");
String tt1="";
SimpleDateFormat stdf = new SimpleDateFormat("HH:mm");
tt1 = stdf.format(t1);
String ttm = dd1+" "+tt1;
out.print(ttm);
%></font>
</td>
<td bgcolor="#FFE4CA"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
<b><%String fnm = rs.getString("fname");
String lnm = rs.getString("lname");
String nm = fnm+" "+lnm;
out.print(nm);
%></b></font></td>
<td width="6%" bgcolor="#FFFFCC"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><%
String tnm = rs.getString("tname");
if(tnm.equals("null")||tnm.equals("-")){}else{out.print(tnm);}
%></font></td>
<td bgcolor="#FFE4CA"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><%=rs.getString("space")%></b></font></td>
<td bgcolor="#FFFFCC"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><%String rg = rs.getString("region");
if(rg==null||rg.equals("null")){}else{out.print(rg);}%></b></font></td>
<%String status = rs.getString("status");
if(status.equalsIgnoreCase("New")){%><td bgcolor="#FF0000"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><b><%=status%></b></font></td>
<%}else if(status.equalsIgnoreCase("Open")||status.equalsIgnoreCase("Awaiting MS Reply")){%><td bgcolor="#FFCC33"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><b><%=status%></b></font></td><%}else{%><td bgcolor="#00CC00"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><b><%=status%></b></font></td><%}%>
<td bgcolor="#FFE4CA"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#0000CC"><%=rs.getString("clarification")%></font></td>
<%
//String queryno = rs.getString("queryno");
String qry1 = "select * from csolution where queryno=?";
ps1 = con.prepareStatement(qry1);
ps1.setString(1,queryno);
ResultSet rs1 = ps1.executeQuery();
while(rs1.next()){%>
<td bgcolor="#FFFFCC"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><%=rs1.getString("solution")%></font></td>
<td bgcolor="#FFE4CA"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><%
Date dp = rs1.getDate("dateofopen");
String dp1="";
SimpleDateFormat spdf = new SimpleDateFormat("MM/dd/yyyy");
dp1 = spdf.format(dp);
Date tp = rs1.getTime("timeofopen");
String tp1="";
SimpleDateFormat stpf = new SimpleDateFormat("HH:mm");
tp1 = stpf.format(tp);
String tpm = dp1+" "+tp1;
out.print(tpm);
%></font>
</td>
<td width="5%" bgcolor="#FFFFCC"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><%
Date dc = rs1.getDate("dateofclose");
String dc1="";
SimpleDateFormat scdf = new SimpleDateFormat("MM/dd/yyyy");
dc1 = scdf.format(dc);
Date tc = rs1.getTime("timeofclose");
String tc1="";
SimpleDateFormat stcf = new SimpleDateFormat("HH:mm");
tc1 = stcf.format(tc);
String tcm = dc1+" "+tc1;
out.print(tcm);
%></font>
</td>
<td width="16%" bgcolor="#FFE4CA"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><%String remarks = rs1.getString("remarks");
if(remarks==null){}else{out.print(remarks);}
%></font></td>
<%}navi.setcursor();
}con.close();}catch(Exception e){out.print(e);}%>
</tr>
</table><br>
<font size="2" face="Verdana, Arial, Helvetica, sans-serif">Back to
Main Menu</font>
</body>
</html>
Code for javaBean:
package arvato.interclarification;
import javax.servlet.http.*;
import java.sql.*;
public class rqchunk
ResultSet rs=null;
int chunk=5;
int count=0;
int cursor=1;
public rqchunk(){}
public void setRS(ResultSet rset) throws SQLException
rs = rset;
int cnt=0;
while(rs.next())
cnt++;
rs.absolute(1);
count=cnt;
public void setcursor()throws SQLException
cursor++;
rs.absolute(cursor);
public void setcursor(int i)throws SQLException
cursor=i;
rs.absolute(cursor);
public int getcursor()
return cursor;
public int getchunk()
return chunk;
public void setchunk(int i)
chunk=i;
public void setcount(int j)
count=j;
public int getcount()
return count;
public ResultSet getRS()
return rs;
public void clearRS()
cursor=0;
rs=null;
Please excuse me if my codes are not understandable enough
Thanks
Amit -
Hi,
I have a JSPs and JavaBeans question.
There are two JSP files. One.jsp and Two.jsp.
One.jsp include code that use the JavaBeans from Two.jsp:
<%
if (bl.getDmlOperation() == NcepConstants.UPDATE) {
Two.jsp have:
<jsp:useBean id="bl" class="TestsPrivateBean" scope="session"/>
<%@ include file="One.jsp" %>
When I run this code in TOMCAT, it can run in runtime with no problem.
But the company it now moving to use an IDE (Oracle JDeveloper 9i) with require me to build this into one project. When I try to build the project, it shows error in One.jsp as "variable bl not found in class_One".
When I put the <jsp:useBean id="bl" class="TestsPrivateBean" scope="session"/> code into Two.jsp, it shows "duplicate found error".
How should I do to fix this?
Thanks
KennyIt sounds like it's compiling One.jsp independant of Two.jsp, which will cause the first error. Try renaming One.jsp to One.inc or something. That way it doesn't try compiling One.jsp at all (it won't be there).
-
Hi,
I am getting "unable to load test container error", while loading test dll. This test dll uses silverlights test framework.
The details of error is as below,
Unable to load the test container 'SLTest.dll' or one of its dependencies.
Error details:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified
System.IO.FileNotFoundException: Could not load file or assembly 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
Can any one tell why I am getting this error?
I would like to run tests which uses silverlight test frame work. One of my solution contains tests which uses silverlight test framework and NUnit or MSTest.
How to run tests which uses silverlight test framework in TFS Build?
Vivek.I'm getting the same issue:
Error details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows,
Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified
On running TeamCity with my unit tests.
On the server I have silverlight v5.0 installed. System.Windows.dll is present there.
But still I'm getting this error. What I'm doing wrong?
Viviek, have you solved your issue? -
JScrollPane containing JPanel HELP!
Hi again,
I'll try my luck again!
Ok, I have a JPanel that uses a GridBagLayout with 3 columns and many rows. Each row is of the form:
[JLabel][JTextField][JButton]
Ok. Since I have many of these rows, and my application should be a constant size, I need to somehow make you able to scroll down the list of these labels,textfields and buttons - to the one you want. I have tried making the containing JPanel the viewport of a JScrollPane, however, when I only have a couple of rows of labels, textfields, and buttons, each expands to fit the viewport size - and they turn out looking really dumb.
How can I get it so that the labels, textfields and buttons are only the height of the text in each?
Please please, please, please help me.
sincerely, Edd.Chenge the weight (x&y) in the GridBagConstraints of the components you don't want to expand to 0.0. Change the fill to GridBagConstraints.NONE.
-
Help with jsp and javaBean in eclipse/Tomcat
Hi,
I am new to JSP and JavaBean. I am going through tutorial for a jsp page that uses a javaBean. I am using eclipse to create jsp page and the java bean.
My eclipse project "Date" has five package as under:-
1. Deployment Descriptor
2. Java Resources: src
3. build
4. WebContent
I have my data.jsp page in WebContent/WEB-INF/ folder. When I just run date.jsp in a browser as: http://localhost:8080/Date/date.jsp, it gets launched into the browser correctly. But when I add a JavaBean "TimeFormatterBean.java" in the Java Resources:src folder and use it in date.jsp page, I get errors as under:-
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 5 in the jsp file: /date.jsp
TimeFormatterBean cannot be resolved to a type
2: pageEncoding="ISO-8859-1"%>
3: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
4:
5: <jsp:useBean id="formatter" class="TimeFormatterBean"/>
6:
7: <html>
8: <head>
The data.jsp page is as under:-
<jsp:useBean id="formatter" class="TimeFormatterBean"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<h1> Date JSP </h1>
<p> The current time is:
<%= new java.util.Date() %>
<jsp:getProperty name="formatter" property="name"/>
</p>
</body>
</html>I can see "TimeFormatterBean.class" in build/classes folder.
If anyone could please help me out with this, it would be very helpful
Thanks a lot!You probably should place TimeFormatterBean inside a package, or maybe you could try importing it , even if it�s in the default package, with something like this <%@ page import="TimeFormatterBean" %> at the top
-
Are there any Examples of Servlet or JSP load balancers?
Hello, If any one is aware of examples of Servlet or JSP load balancers or balancing techniques, could you please let us know. It will be much appreciated.
Regards,
Navin PathuruHello, If any one is aware of examples of Servlet or
JSP load balancers or balancing techniques, could you
please let us know. It will be much appreciated.Could you explain your question a little more? Are you looking for information about hardware, distributed caching, etc?
Cheers,
--Bill -
Any CASE tools for Java, JSP, and JavaBeans?
For Java, JSP, and JavaBeans can we find something that can help us automate certain tasks?
For example, CASE tools is an acronym for Computer Aided Software Engineering tools. I have a colleague use software to generate robust code for the database layer and with a few clicks of a button after the database is designed he can generate code that would otherwise take an hour or even hours to write and debug and test.
Thanks for your time and help in advance!
CeciliaThe ones I know are MVCase (from Brazil) and Jude (from Japan). Both are free and I haven't fully tested them yet. It may help you.
-
Could not load execution container: null
Hi,
I am trying to create GPs programatically. The Callable Object type is "Web Pages"
I am able to create a CO of the above type by using:
IGPCallableObjectType wpCoType = coTypeManager.getCallableObjectType("com.sap.gp.url");
I am setting the URL in this fashion:
pco.setConfigProperty("URL", "www.myUrl.com");
Also I am adding one Input parameteras String in this fashion:
IGPStructureInfo input = callbleObj.getInputParameters();
IGPAttributeInfo attr = null;
attr = input.addAttribute("paramName", IGPAttributeInfo.BASE_STRING);
callbleObj.setInputParameters(input);
When I try to test the CO, it throws this error:
Could not load execution container: null
Ant insight on this?
Thanks,
Apurv.I have created a CO of type Web Page (com.sap.gp.url) programatically. I am not quite sure what you mean by runtime dependency.
IGPCallableObjectTypeManager coTypeManager = GPCallableObjectTypeFactory.getCallableObjectTypeManager();
IGPCallableObjectType wpCoType = coTypeManager.getCallableObjectType("com.sap.gp.url");
IGPCallableObject callbleObj = gpDesigntimeUpdateManager.createCallableObject(wpCoType , locale, "CO: "actionCO.name, "CO: "actionCO.name +" Description", folder.ID)
IGPPhysicalCallableObject pco = callbleObj.resovlePhysicalCallableObject();
// set two result states: complete
pco.addResultState("COMPLETE", "complete");
// define an exception
pco.addProcessException("EXCEPTION", "exception");
// set configuration property
pco.setConfigProperty("URL", "http://www.myurl.com");
pco.setInputViewVisible(true, IGPPhysicalCallableObject.VIEW_VISIBILITY_PURPOSE_ALL);
// obtain copy of the input parameter structure of our object
IGPStructureInfo input = callbleObj.getInputParameters();
IGPAttributeInfo attr = null;
attr = input.addAttribute("grails", IGPAttributeInfo.BASE_STRING);
callbleObj.setInputParameters(input);
gpDesigntimeUpdateManager.save(callbleObj)
gpDesigntimeUpdateManager.release(callbleObj);
gpDesigntimeUpdateManager.activate(callbleObj) -
How to improve jsp load time?
Hi everyone --
Got a question for all of you.
I have a form in a JSP, which does a (Oracle 9i) db lookup on 13 fields and populates the drop-down boxes. The load time for the JSP is slooooww.
These are my options for speeding up the load time (I think):
1. When the web/app server starts the application, have it do all the db lookups and store the resultsets...somewhere. Maybe have some dblistener thread that periodically checks for updates to the db. Then, when someone actually requests the JSP, all the JSP has to do is read the pre-populated drop-down boxes and load.
2. Wait until someone requests the JSP and store all the resultsets as cookies for the session. The resultsets will be good for the home JSP and its sister. This doesn't really solve the problem, since the initial load will still be slow.
3. Combine all the lookup statements into one huge statement, and store the results somewhere. This method queries the db only once, and the drop-down boxes can be populated from one query (instead of 13 separate connections and queries).
All of these ideas seem mediocre to me, and they don't address the fact that the results of the queries change contantly. What I need is a
way to make the JSP load quickly and with the most current information.
Does anyone have any ideas? Which of my suggestions is rather boneheaded?
Thanks for any advice,
-KwjIt's still not perfect, but it's better at least.
I'm querying 4 different tables overall, and I have a Db class that the jsp instantiates.
from home.jsp:
Db d = new Db();
ResultSet [] all = d.getAll();
<body>
%>
<tr><td align=right>Correspondence ID: </td><td><select>
<option label=""></option>
<%
rs = all [1];
while(rs.next()){
%>
<option><%=rs.getString("sak_correspondence")%></option>
<%
%>
</select></td>
</body>
[\code]
from Db.java:public ResultSet [] getAll() throws SQLException
ResultSet [] all = new ResultSet [4];
all [0] = con.prepareStatement
("select nam_category from doco.corr_category " +
"order by nam_category asc").executeQuery();
all [1] = con.prepareStatement
("select sak_correspondence, dte_received, dte_response_due, " +
"dte_sent, file_path, id_outref, subject " +
"from doco.correspondence").executeQuery();
all [2] = con.prepareStatement
("select nam from doco.corr_type order by nam asc").executeQuery();
all [3] = con.prepareStatement
("select nam_subcategory from doco.corr_subcategory " +
"order by nam_subcategory asc").executeQuery();
return all;
}//getAll() -
JSP, JavaBeans and iPlanet 4.1- Unable to load JavaBean
I get the following error when trying to access a JavaBean from a JSP page. I have tried just about everything including using the <@page import /> in the JSP page.
I can get it to run perfectly in Tomcat 3.2 but it must run in iPlanet 4.1. I think the solution should be fairly simple I just can't find it.
Any help would be greatly appreciated.
Thanks.
The exception is as follows (thrown on running the generatePage.jsp linked from index.jsp).
[29/Nov/2001:16:50:23] info ( 1364): Internal Info: loading servlet /TechCom/generatePage.jsp
[29/Nov/2001:16:50:23] info ( 1364): JSP: JSP1x compiler threw exception
org.apache.jasper.JasperException: Unable to load class JspPageLoader
at org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:183)
at org.apache.jasper.compiler.GetPropertyGenerator.generate(GetPropertyGenerator.java:97)
at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(JspParseEventListener.java:728)
at org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEventListener.java:190)
at org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspParseEventListener.java:159)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:141)
at com.netscape.server.http.servlet.NSServletEntity.load(NSServletEntity.java:214)
at com.netscape.server.http.servlet.NSServletEntity.(NSServletEntity.java:104)
at com.netscape.server.http.servlet.NSServletRunner.loadServlet(NSServletRunner.java:607)
at com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:357)
[29/Nov/2001:16:50:23] warning ( 1364): Unable to locate class: D:\Netscape\Server4\docs\TechCom (java.lang.ClassNotFoundException: D:\Netscape\Server4\docs\TechCom)
[29/Nov/2001:16:50:23] warning ( 1364): Internal error: Failed to load servlet (servlet=/TechCom/generatePage.jsp)To solve this problem you have to:
include <@page import /> tags importing the JavaBean to be used.
In the classpath of iPlanet include the directory in which your JavaBeans are placed.
Also in the classpath of iPlanet include the root directory of you web site containing the JSP's. this should then solve the problem. -
How can I load javaBeans in jsp without restart WL?
hi,
Restart WL every time I modify my bean really drive me crazy!
Following the manual, I set up my servletclasspath and put all the beans
I use in my jsp under that directory, I find out something strange:
if my beans' scope is page and if I modify the jsp page as well every
time I modify the beans, I can autoload the fresh new beans without
restarting;
if my beans' scope is larger than page( such as session), then even I
modify the jsp, instead of the fresh new beans I get the following
exception:
java.lang.ClassCastException: com.aa.mybean at
jsp_servlet._test._classquery._jspService(_mybean.java:81) at
weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:124)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:760)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:707)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:251)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:369)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:269)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
who knows how to autoload the new session scope javabeans in a jsp page
without restarting WL?
thanks in advance...
That makes sense. If the session contains an instance of an old class, and
you cast it to the new class, then you should get a class cast exception.
One way around this is to use interfaces that are (for development) in one
of the outer class paths (system or weblogic, I can't remember which) ...
the only time you mention the class name is to new it. Then you cast the
contents of the session attributes to those interfaces. The interfaces can
not change without restarting the server, but the implementations can.
Cameron Purdy
[email protected]
http://www.tangosol.com
WebLogic Consulting Available
"Richard Wu" <[email protected]> wrote in message
news:[email protected]...
> hi,
>
> Restart WL every time I modify my bean really drive me crazy!
>
> Following the manual, I set up my servletclasspath and put all the beans
> I use in my jsp under that directory, I find out something strange:
>
> if my beans' scope is page and if I modify the jsp page as well every
> time I modify the beans, I can autoload the fresh new beans without
> restarting;
> if my beans' scope is larger than page( such as session), then even I
> modify the jsp, instead of the fresh new beans I get the following
> exception:
>
> java.lang.ClassCastException: com.aa.mybean at
> jsp_servlet._test._classquery._jspService(_mybean.java:81) at
> weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:124)
> at
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:760)
> at
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:707)
> at
>
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:251)
> at
>
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:369)
> at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:269)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
>
> who knows how to autoload the new session scope javabeans in a jsp page
> without restarting WL?
>
> thanks in advance...
>
>
Maybe you are looking for
-
Getting error while posting GR using IBD from BAPI_GOODSMVT_CREATE
Hi Experts, While posting GR from IBD using BAPI_GOODSMVT_CREATE with all necessary values like plant,material,mvttype and serial numbers etc... getting error from BAPI return "1 E VLA 315 Item 000010 requires serial numbers; use the inbound deliver
-
HI Friends Any one give some links regarding CRM data extarction to BW links Thanks Gita
-
Hi, iam doing inventory cube, 0ic_co3. when iam trying to fill the setup table for 2lis_03_bf using OLI1BW it is showing that PLANT 2210 does not exist. whe i go to relative table MSEG i found the plant 2210. what is the problem then?
-
Hi I'd like to install a mini sap version on my laptop so that I could connect it with my ce 7.1 framework (which is already installed on my laptop). I thought about ides as a possible solution but I can't find a version which would fit into my lapto
-
When MIGO Doc posting Excise Invoice BED,AED,SED,ECS,CESS Not displayed
dear Gurus , i have one problem when i and posting the document through MIGO T-code the doc is posted but these values is not appearing in the screen Click on bottom of Excise invoice then put data on each of the fields for ex :- BED AED NCCD SED