JSP Java Tomcat SDK
Hello,
Let me start off by saying, I know nothing about programming in any language or Tomcat or Java.
I downloaded the CiscoIPPS_SDK_v4.1.1 with hopes of getting the speeddials.jsp working on a little Windows 2003 machine. I've tried different versions of Java and Tomcat, but theres something I must be missing. Right now I'm running Tomcat 6.0.13 and JDK Version 5 Update 12.
Every time I try to run the speeddials.jsp service on the phone I get something that looks like this...
An error occurred at line: 120 in the jsp file: /speeddials.jsp
XmlEncoder cannot be resolved
117: if (sd != null) {
118: out.print("<MenuItem><Name>");
119: out.println("Speeddial Position: " + sd.getPosition());
120: out.print(XmlEncoder.encode(sd.getLabel() + " " + sd.getNumber()));
121: out.print("</Name><URL>QueryStringParam:index=" + i + "&dirn=" + URLEncoder.encode(sd.getNumber(), "UTF-8") + "&label=" + URLEncoder.encode(sd.getLabel(), "UTF-8") + "&position=" + sd.getPosition() + "</URL></MenuItem>\r\n");
122: }
123: }
It looks like it cant compile it or it doesnt understand the XML stuff. This is way over my head and I'm lost. Any help would be nice.
A look at the SDK JavaDoc reveals no such class, the XMLEncoder class in Java has no static methods so they probably meant to use URLEncoder.encode instead.
By the way, the stuff in the SDK isn't meant to be used by end users.. it's mean to give developers a head start at implementing their own solutions. If you look at the documentation, they tell you it's not production quality code - so using it productively without even understanding what it does, is taking an uncalculated risk if you ask me.
Similar Messages
-
Can't usebean in JSP in Java 2 sdk ee1.3 server
I have created a jsp page which used a bean but everytime I accessed the bean from the J2ee server ..it will always displayed the error that the bean class is not found..
I have try to deploy the jsp as a web component using the deploytool but got the same error ...
I am using jdk1.3 and java 2 sdk ee 1.3 in windows 98se
Where do I have to put the class file?
Is there something wrong with my classpath
Do I need the change some of the properties file? if not what other solution is there....
I am completely lost...I have double check the jsp code and the bean code..they are fine...Just couldn't figure out the solution..
Pls help me come up with a solutionMaybe it would be easier if I include the error message that I got and also the files.
I use J2EE server 1.3 so there is only a public_html folder, I can't find any webapp folder...public_html folder contain the context of the application...where do I put the class file there or the package
Here is the error that I got while executing the jsp page
org.apache.jasper.JasperException: Unable to compile class for JSPc:\j2sdkee1.3\repository\default\web\_0002fusebean_jsp.java:61: Class org.apache.jsp.BankAccount not found.
BankAccount BA = null;
^
c:\j2sdkee1.3\repository\default\web\_0002fusebean_jsp.java:64: Class org.apache.jsp.BankAccount not found.
BA= (BankAccount)
^
c:\j2sdkee1.3\repository\default\web\_0002fusebean_jsp.java:69: Class org.apache.jsp.BankAccount not found.
BA = (BankAccount) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "BankAccount");
^
3 errors
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:523)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:175)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:187)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:453)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:254)
at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:198)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:177)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:255)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:882)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:225)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:882)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2227)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:229)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:882)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:162)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:882)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:875)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952)
at java.lang.Thread.run(Thread.java:484)
here is the bean code:
import java.io.*;
import java.sql.*;
public class BankAccount
private String sAccountID=" ";
private String sPin=" ";
Connection connect=null;
Statement state=null;
ResultSet result=null;
public void setSAccountID(String sAccountID)
this.sAccountID=sAccountID;
public String getSAccountID()
return sAccountID;
public void setSPin(String sPin)
this.sPin=sPin;
public String getSPin()
return sPin;
public BankAccount() throws ClassNotFoundException
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
public boolean AccountValidate()
boolean validate=false;
String sPinno="";
try
sAccountID=getSAccountID();
sPin=getSPin();
connect=DriverManager.getConnection("jdbc:odbc:Bank","","");
String strquery="select cPin_no from Login where cAccount_id='"+sAccountID+"'";
state=connect.createStatement();
result=state.executeQuery(strquery);
while (result.next())
sPinno=result.getString(1);
sPinno=sPinno.trim();
sPin=sPin.trim();
if (sPinno.equals(sPin))
validate=true;
catch(Exception e){}
return validate;
here is the jsp :
<%@ page language="java" %>
<jsp:useBean id="BA" scope="application" class="BankAccount" >
<jsp:setProperty name="BA" property="sAccountID" param="accid"/>
<jsp:setProperty name="BA" property="sPin" param="pin"/>
</jsp:useBean>
<html>
<head><title>result page</title></head>
<body>
<%
String accid=request.getParameter("i1");
String pin=request.getParameter("i2");
out.println("welcome "+accid);
boolean validate=BA.AccountValidate();
if (validate==true)
out.println("the user is validated");
else
out.println("the user is not valid");
%>
</body>
</html>
here is the simple html file
<html>
<head><title>user validation</title></head>
<body>
<form method="post" action="usebean.jsp">
<table border="0" cellspacing="1" cellpadding="5">
<tr>
<td width="100"> </td>
<td align="right"><h1><font color="red">Welcome to Bank</font></h1></td>
</tr>
<tr>
<td width="100"><b><font color="blue">Account ID:</font></b></td>
<td align="left"><input type="text" name="sAccountID" size="30"></td>
</tr>
<tr>
<td width=100 align=right><b><font color=blue>Pin Number:</font></b></td>
<td align=left><input type="password" name="sPin" size="30"></td>
</tr>
<tr>
<td width=100> </td>
<td align=left><input type=submit value=submit></td>
</tr>
</table>
</form>
</body>
</html>
what changes do you suggest?
I try testing and creating a simple package just to ensure I can create package and it is accessible but I can't access the package
Here is what I did...
I created a file displayclass.java which contains the package declaration as follows
package mypackage;
public class displayclass
public String displaytext()
return "displaying text";
I compile it using javac -d . displayclass.java
I check and the package named mypackage is created under the current directory which is c:\java\jsp
then I created the usepackage.java which use the mypackage package
here it is
import jsp.*;
public class usepackage
public static void main(String args[])
displayclass dc=new displayclass();
String string=dc.displaytext();
System.out.println(string);
Then I set the classpath as "set classpath=%classpath%;c:\java\jsp\mypackage" without the quotation marks ofcourse
I found to my dismay that when I compile usepackage.java.. the compiler generated the following error message
usepackage.java:7 cannot displayclass
bad class file: c:\java\jsp\mypackage\displayclass.class
class file contain wrong class: jsp.displayclass
Please remove and make sure it appears in the correctsubdirectory of the classpath
My brains are already over the limit...the level of frustration at not be being able to make a simple package thing work after facing hurdles after hurdles in JSP...
What solutions do you suggest for the above 2 problems --the one with the jsp and the one with the package..
I use jdk1.3 and j2sdkee1.3, windows 98se
they are all working fine
I really can't comprehend that the people at sun if they admit that j2sdkee1.3 can work in windows 98 with minor tweakings and instead of leading us to a forum with suggested solutions..why can't they simply support the damn thing in windows98 if it can work on windows98...so much for platform independence..or do they prefer us to upgrade to windows NT or windows 2000 :-)
I feel that it would be way too simple for them to make the batch file to work properly...I am indeed surprised as it wouldn't take much of a time for them. Don't you all think so?
As regards the stuff not working without package...it just is too much...I am close to boiling point...why can't they spare a thought for that? I have seen many of my classmates simply throwing up their hands in desperation :-) it is making life a living hell for us---as we are not genius..it depends upon the genius, if at all they are, to make something more userfriendly
anyway pls help me!....I have to finish my assignments on my home computer... -
Will Java 2 SDK, Enterprise Edition 1.3.1 run on Windows 98?
Will Java 2 SDK, Enterprise Edition 1.3.1 run on Windows 98?
If so, would I still need to download Apache Tomcat?
I'm trying to setup my desktop (currently running Windows 98) to test
servlets and JSP's. What software should I download?
ThanksI have a Windows 98 system. I just downloaded the j2se from the net and installed. Everything worked just fine.
I did not install Tomcat. -
Can not compile the jsp in Tomcat 4
Hello anyone
Now I use jdk1.4 and Tomcat 4.0.4, and put in the directory d:\j2sdk and d:\tomcat. Even I set the classpath as follow, I still compile jsp.
SET CLASSPATH=.;D:\j2sdk\lib\tools.jar;D:\tomcat\common\lib\servlet.jar
but at before, i can run it at Tomcat 3.2.
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
D:\tomcat\work\Standalone\localhost\_\userCounter$jsp.java:4: Class or interface declaration expected.
import javax.servlet.*;
^
D:\tomcat\work\Standalone\localhost\_\userCounter$jsp.java:10: Superclass org.apache.jsp.HttpJspBase of class org.apache.jsp.userCounter$jsp not found.
public class userCounter$jsp extends HttpJspBase {
^
2 errors, 1 warning
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:536)
pls help, thank you very much!This is a new problem with jdk1.4 when compiling with tomcat.
The solution is to ensure that any classes in WEB-INF/classes are in a package structure and the relevant jsp calls the same using the package name.
best
kev -
Column Not found error while trying to access databse through JSP+Java Bean
I am trying to acees MS Access 2003 db through JSP using Tomcat 5.0.28.The code for accessing the databse is incorporated in the bean.The jsp only calls the particular method of the bean .
Code for Java Bean:
package ActiveViewer;
import java.sql.*;
import java.util.*;
public class CompanyBean
Connection con;
ResultSet rs=null;
Statement st;
public CompanyBean(){}
public void connect()
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
System.out.println("Here4");
con=DriverManager.getConnection("jdbc:odbc:activeviewer","","");
System.out.println("Here1");
catch (ClassNotFoundException e)
System.out.println("Could not locate driver.");
catch (SQLException e)
System.out.println("An SQL Exception has occured :: "+e);
e.printStackTrace();
catch (Exception e)
System.out.println("An unknown Exception has occured :: "+e);
e.printStackTrace();
public void disconnect()
try
if (con!=null)
con.close();
catch (SQLException e)
System.out.println("An SQL Exception has occured :: "+e);
e.printStackTrace();
public ResultSet select(String username)
if(con!=null)
try
st=con.createStatement();
rs=st.executeQuery("select * from company where username='" + username + "'");
catch (SQLException e)
System.out.println("An SQL Exception has occured :: "+e);
e.printStackTrace();
catch (Exception e)
System.out.println("An Exception has occured while retrieving :: "+e);
e.printStackTrace();
else
System.out.println("Connection to database was lost.");
return rs;
The code for JSP that uses the above bean is:
<%@ page language="java" import="java.sql.*,ActiveViewer.* " contentType="text/html"%>
<jsp:useBean id="conn" scope="session" class="ActiveViewer.CompanyBean" />
<html>
<body>
<% String username=request.getParameter("username");
String password=request.getParameter("password");
System.out.println("username:"+username);
System.out.println("password:"+password);
conn.connect();
ResultSet rs=conn.select(username);
System.out.println("Below select ");
while (rs.next())
String dbusername=rs.getString("username");
String dbpassword=rs.getString("password");
if(dbusername.equals(username) && dbpassword.equals (password))
{ %> out.println("OK");
<% }
else { %>Invalid Username and / or Password.
<br>Clickhere to go back to Login Page.
<% }
} %>
</body>
</html>
I get the following error:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Column not found
though the database is not int he same folder as the jsp, the DSN is set correctly to pint to the db location.The jsp does print in stdout file:
Here4 (from connect method above)
Here 1 (from connect method above)
Below Select (from jsp)
This means that the jsp does connect to db but it gives the above error.Also the field name also matches that in the database and data is present in the db too.
All other things like creating package for bean,incorporating the packakage are done.
Can someone please help me with their precious advice?U're getting this error because there is no field called 'password' in ur database, the field in ur database is named 'cpassword' and not 'password'. So change the statement rs.getString("password"); to rs.getString("cpassword");
-
Column Not found error while trying to access database through JSP+Java Bea
I am trying to access MS Access 2003 db through JSP using Tomcat 5.0.28.The code for accessing the database is incorporated in the bean.The JSP only calls the particular method of the bean .
Code for Java Bean:
package ActiveViewer;
import java.sql.*;
import java.util.*;
public class CompanyBean
Connection con;
ResultSet rs=null;
Statement st;
public CompanyBean(){}
public void connect()
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
System.out.println("Here4");
con=DriverManager.getConnection("jdbc:odbc:activeviewer","","");
System.out.println("Here1");
catch (ClassNotFoundException e)
System.out.println("Could not locate driver.");
catch (SQLException e)
System.out.println("An SQL Exception has occured :: "+e);
e.printStackTrace();
catch (Exception e)
System.out.println("An unknown Exception has occured :: "+e);
e.printStackTrace();
public void disconnect()
try
if (con!=null)
con.close();
catch (SQLException e)
System.out.println("An SQL Exception has occured :: "+e);
e.printStackTrace();
public ResultSet select(String username)
if(con!=null)
try
st=con.createStatement();
rs=st.executeQuery("select * from company where username='" + username + "'");
catch (SQLException e)
System.out.println("An SQL Exception has occured :: "+e);
e.printStackTrace();
catch (Exception e)
System.out.println("An Exception has occured while retrieving :: "+e);
e.printStackTrace();
else
System.out.println("Connection to database was lost.");
return rs;
The code for JSP that uses the above bean is:
<%@ page language="java" import="java.sql.*,ActiveViewer.* " contentType="text/html"%>
<jsp:useBean id="conn" scope="session" class="ActiveViewer.CompanyBean" />
<html>
<body>
<% String username=request.getParameter("username");
String password=request.getParameter("password");
System.out.println("username:"+username);
System.out.println("password:"+password);
conn.connect();
ResultSet rs=conn.select(username);
System.out.println("Below select ");
while (rs.next())
String dbusername=rs.getString("username");
String dbpassword=rs.getString("password");
if(dbusername.equals(username) && dbpassword.equals (password))
{ %> out.println("OK");
<% }
else { %>Invalid Username and / or Password.
<br>Clickhere to go back to Login Page.
<% }
} %>
</body>
</html>
I get the following error:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Column not found
though the database is not int he same folder as the jsp, the DSN is set correctly to pint to the db location.The jsp does print in stdout file:
Here4 (from connect method above)
Here 1 (from connect method above)
Below Select (from jsp)
This means that the jsp does connect to db but it gives the above error.Also the field name also matches that in the database and data is present in the db too.
All other things like creating package for bean in WEB-INF/classes,incorporating the packakage are done.
Can someone please help me with their precious advice?Hi, I too have a problem with an SQL exception, the message is Column not found.
I'm using the sun jdbc odbc driver with access.
the first few lines of the stack trace are
sun.jdbc.odbc.JdbcOdbcResultSet.findColumn(JdbcOdbcResultSet.java:1852)
sun.jdbc.odbc.JdbcOdbcResultSet.getInt(JdbcOdbcResultSet.java:603)
net.homeip.sdaniels.MemberBean.ejbFindByUnamePwd(MemberBean.java:127)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
I am of course sure that the column does infact exist. I can insert into the column no problems. the sql looks like this:
SELECT * FROM Members WHERE uName ='Stewart' AND encPwd='�F2C�3����h�1Y�'
Can any one tell me if there is a common cause to this problem?
Thanks -
Oracle Connectivity in JSP using Tomcat 4
Dear friends,
After installing and configuring the Tomcat 4 I am able to run JSP and Servlats. But I am unable to connect to Oracle database (oracle 8i) using thin driver.
Sample code is :
<html>
<head><title>Test JSP-JDBC</title></head><body>
<%@ page language="java"%>
<%@ page import="java.sql.*"%>
<%@ page import="oracle.jdbc.driver.OracleDriver" %>
<%
try
DriverManager.registerDriver(new OracleDriver());
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@myserver:1521:orcl","scott","tiger");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select * from emp");
while(rs.next())
out.println(rs.getString("ename")+"<br>");
catch (Exception e)
out.println(e);
%>
</body></html>
and the error msg is:
type: Exception report
message: Internal Server Error
description: The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception :
org.apache.jasper.JasperException: Unable to compile class for JSP
C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\second$jsp.java:4: Class oracle.jdbc.driver.OracleDriver not found in import.
import oracle.jdbc.driver.OracleDriver;
^
1 error
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
Please help me in solving this.
thanks in advance
GeethanadhHi
The oracle driver needs a jar file to be placed into your Runtime Environment. If you are importing oracle. Get the jar file, put it in your JRE/lib/ext folder and also in the jdk/jre/lib/ext folders. Restart your tomcat, and now try to compile the page. Should work.
Thanks
Swaraj -
How good is the java Ras Sdk in Business objects XI?
I have programmed some reports from scratch by using the java ras sdk.
Somehow I have the feeling that new features of XI like dynamic image location, or
running totals aren't so well supported as for example through the Crystal report Designer.
Do others also think that Business objects is being a bit negligent on this Api?
Maybe they do not consider the Api as important anymore because most people will be using there web based out of the box jsp components?Normally you should run your CR reports in the INfoView. You can start a report either by double clicking on it or by selecting View in the context menu. Still in order to fetch data you have to press the Refresh button in the CR viewer window (in the InfoView).
In the CMC I assume that you are using the Run now option in the context menu. Please note that this will just schedule your report immediatelly. hen the report is scheduled a new instance is created hich is available in the History of the report. In order to see a report in the CMC select again View in the context menu and you can again fetch data by pressing the Refresh button.
Regards,
Stratos -
Java ME SDK 3.0 Released
I am happy to announce the Revenue Release of Java Platform Micro Edition Software Development Kit 3.0.
Java ME SDK includes the advanced tools found in Java Wireless Toolkit 2.5.2 [for CLDC] and Sun Java Toolkit 1.0 [for CDC] and many new features.
Key Features
* Integration with third-party emulators and Windows Mobile devices
* On-device deployment and on-device debugging
* CLDC/MIDP, CDC/FP/PBP/AGUI, and BD-J integrated into one SDK
* New CLDC HotSpot Virtual Machine
* Optimized MSA 1.1 stack with extensions
* Profiling support
* Network monitor
* BD-J support
* New development environment based on Netbeans Platform
* Lightweight UI Toolkit (LWUIT) integration
* Device search database integrated in SDK
* JavaFX Mobile Emulator included
Have a look for yourself: [http://java.sun.com/javame/downloads/sdk30.jsp]Are there any plans about releasing the SDK on Linux, and if yes, when?
-
Beginner trying to get my beans to work with jsp on tomcat
Please help me open my eyes!
I know this is a stupid oversight on my part, but I've been working for days on getting other things to work on my tomcat server, so I'm out of ideas on this one.
I've followed all the tomcat docs instructions on where to put my jsp and bean files and set my classpath to where my beans are located. jsps work fine for me but when I try to run this jsp that uses my CalcBean, I get this and similar internal server errors:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 1 in the jsp file: /jsp/calc/calculate.jsp
Generated servlet error:
C:\jakarta-tomcat-4.0\work\Standalone\localhost\research\jsp\calc\calculate$jsp.java:56: Class org.apache.jsp.CalcBean not found.
CalcBean calc = null;
^
Do I need to register my bean somewhere like web.xml?
Thanks so much in advance for any help!!rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
-
Help running a simple jsp file,Tomcat 5.0.16
Hi,
This question may be addressed many many times,but do reply.
I have a Win xp operating system
Installed Tomcat 5.0.16 in it.
Next the directory structure
PS : The sampleapp directory is outside the tomcat installation directory.
E:/sampleapp
| |
ROOT WEB-INF
|
classes
|
<package1><structure> .class files (for servlet works fine!!!!)
in the WEB-INF,there is the web.xml,then sourcefiles<dir> and the lib directory which is empty.
Now the servlet files work fine.........
I have placed my MyJsp.jsp file in the above mentioned ROOT directory.
I have not done any thing with the <TOMCAT_HOME>/conf/server.xml file
and the web.xml which I have written.
When I give the following URI
http://localhost:8080/sampleapp/MyJsp.jsp,
I get the HTTP status 404- /MyJsp.jsp
description: The requested resource (/MyJsp.jsp) is not available.
Hoping that I have defined the problem specifically.Kindly show some light on this.
Thanks
ASNevermind. I just found the answer. For the record, there are two ways in getting JSPs to work:
1. Precompiling the JSPs and modifying your webapp's web.xml file with the XML fragment generated in YourWebApp/web/WEB-INF/generated_web.xml;
2. Not precompiling the JSPs, but simply letting tomcat compile it on the fly on first access.
PRECOMPILATION METHOD
Go to http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html. Copy-and-paste the ant script under the section "Web Application Compilation" into a file called compile.xml. For me, I save it in ~/development/compile.xml. Then compile the JSPs using the command (all in a single line):
$ANT_HOME/ant -file <PATH_TO_COMPILE.XML> -Dtomcat.home=<$TOMCAT_HOME> -Dwebapp.path=<$WEBAPP_PATH>
In my case, I cd into the directory where my app resides:
cd ~/development/HelloWorld
and then I type:
ant -file ~/development/compile.xml -Dtomcat.home=/var/tomcat5 -Dwebapp.path=.
(Note the trailing dot since my current directory is my webapp's directory itself. Also, in my case, my shell's PATH contains the path to the ant executable, so I just type 'ant' directly.)
Open the file ~/development/HelloWorld/web/WEB-INF/generated_web.xml and follow the instructions in that auto-generated file, which is: "Place this fragment in the web.xml before all icon, display-name, description, distributable, and context-param elements."
The web.xml referred to above is YOUR web.xml. In my case, it is the one in ~/development/HelloWorld/web/WEB-INF/web.xml
When ready to deploy, type:
ant dist
as usual. Deploy the .war file in the dist directory as you normally would. In my case, I do:
rm -rf $CATALINA_HOME/webapps/hello* (removes my HelloWorld webapp directory and its war file)
cp ~/development/HelloWorld/dist/hello.war $CATALINA_HOME/webapps
and wait for tomcat to unravel the war file. I can then access the JSP page based on whatever the generated_web.xml had specified. In my case, it would be http://localhost:8080/hello/sample.jsp
NON-PRECOMPILATION METHOD
Copy tools.jar from the Java JDK into tomcat's common/lib. (I found this only in the error message in tomcat's log file!! Didn't find it anywhere else!!). Do this one time only, then restart tomcat:
cp $JAVA_HOME/lib/tools.jar $CATALINA_HOME/common/lib
Restart tomcat.
Deploy your webapp as usual which will include your JSP files stored under your webapp's 'web' directory. No precompilation of JSPs is required. Then access your JSP pages such as http://localhost:8080/HelloWorld/my-jsp-page.jsp and tomcat will compile it on the fly on first access. The disadvantage is that there will be a slight delay on first access.
[Note: I am putting all this down for the record, because it took me MANY HOURS to figure all this out as the info on how to do this is not found clearly in one place!! Hope this helps others.]
My next step is to incorporate the contents of compile.xml as mentioned above, into my regular build.xml file. -
Problems compiling jsp on Tomcat
I am getting an error message when I try to run jsp files on the Tomcat server. It runs the txt files fine. Using the 8080 port. Any suggestions about what is going wrong? This is my first time to run jsp or Tomcat on this computer. Thank you. Sorry for the long error message.
Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
error: Invalid class file format in C:\Program Files\Java\jre1.5.0_04\lib\rt.jar(java/lang/Object.class).
The major.minor version '49.0' is too recent for this tool to understand.
C:\Program Files\Apache Tomcat 4.0\work\localhost\myapp\project3a$jsp.java:0: Class java.lang.
Object not found in class javax.servlet.GenericServlet.
package org.apache.jsp;
^
2 errors, 1 warning
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at java.lang.Thread.run(Unknown Source)It looks like it is running multiple versions of Java.
It looks like you are trying to run with java 1.5
Check what your JAVA_HOME variable is set to
Do you have any other versions of java installed on the machine? -
L00000k Help me Install Java 2 SDK, SE v1.4.2_05
Hey, I'm trying to download this Java from this site (I need to download this excat Java, I can't download any other ones...) :
https://sdlcweb1a.sun.com/ECom/EComActionServlet/LegalPage:~:com.sun.sunit.sdlc.content.LegalWebPageInfo;jsessionid=sdlcweb1a.sun.com-ab15%3A411f9048%3Ad7a645b4a44a7ec3
First off, which one shoudl I download. I tried downloading both of them, and got errors on them both. Please help me out as I really want to use the java. You can look at my post here on another forum and it has pictures of what went wrong. I get two errors, the first one is when Its trying to copy the files in the installation. The error I get says "Error 1335. The cabinet file 'st142000[1].cab' required for this installation is corrupt and cannot be used. This could indicate a network error, an error reading from the CD-Rom, or a problem with this package.... After that I click retry, and nothing happends same error, so I click Ignore. Then another error comes up and it says 'Internal Error 2350'. Then I get the thing where it shoudl say installation complete, but instead it says "The wizard was interuppted before Java 2 SDK, SE v1.4.2_05 could be completly installed.
Please someone help me figure this out because I really want to use java. If any of you guys want to see what happends in picturse, view the post I made on a other forum, and they (the members on that forum) didnt really help me out at all. They just told me to re-download it, which I did about four times. http://jagex.us/SBoT196/viewtopic.php?t=16&postdays=0&postorder=asc&start=30 (I'm Travisu88 on that site)See my reply to this thread http://forum.java.sun.com/thread.jsp?forum=14&thread=546824&tstart=0&trange=100
Before attempting this, make sure that all previous Java install attempts and resulting folders and files are removed from your computer. If the computer is not clean problems will likely result.
This is the standard way to download the current Java. I recommend that you use the offline installation option if you are installing on Windows, it is less likely to cause problems. -
Unable to load Applet in JSP using Tomcat 5.5.12
Hi
I am aunable to applet in jsp using Tomcat 5.5.12 and JRE 1.5. Below is the code that I am using
<applet
codebase = "."
archive = "WebPOSApplet.jar"
code = "webposprint.WPMainApplet.class"
name = "Trans Applet"
width = "450"
height = "115"
hspace = "0"
vspace = "0"
align = "middle"
>
<param name = "redirectInfo" value = "SearchProducts.do">
</applet>
<%/*%>
<OBJECT
classid = "clsid:CAFEEFAC-0014-0002-0000-ABCDEFFEDCBA"
codebase = "http://java.sun.com/products/plugin/autodl/jinstall-1_4_2-windows-i586.cab#Version=1,4,2,0"
WIDTH = 450 HEIGHT = 115 >
<PARAM NAME = CODE VALUE = webposprint.WPMainApplet.class>
<PARAM NAME = archive VALUE = WebPOSApplet.jar>
<PARAM NAME = "type" VALUE = "application/x-java-applet;jpi-version=1.4.2">
<param name = "redirectInfo" value = "SearchProducts.do">
<PARAM NAME = "scriptable" VALUE = "false">
<PARAM NAME = model VALUE=models/buckminsterfullerine.xyz>
<embed width="450" height="115" code="webposprint.WPMainApplet.class" archive="WebPOSApplet.jar" type="application/x-java-applet;jpi-version=1.4.2" redirectinfo="SearchProducts.do" scriptable="false" model="models/buckminsterfullerine.xyz" src="webposprint.WPMainApplet.class">
</embed> <COMMENT> <EMBED
type = "application/x-java-applet;jpi-version=1.4.2" \
CODE = webposprint.WPMainApplet.class\
archive = WebPOSApplet.jar\
WIDTH = 373 \
HEIGHT = 167 \
model =models/buckminsterfullerine.xyz \
scriptable = false \
pluginspage = "http://java.sun.com/products/plugin/index.html#download"> <NOEMBED>
alt="Your browser understands the <APPLET>
tag but isn't running the applet, for some reason."
Your browser is completely ignoring the <APPLET>
tag! </NOEMBED> </EMBED> </COMMENT>
</OBJECT>
<%*/%>
This code doesn't seems working with Tomcat 5.5.12. I works fine with Tomcat 4.1.31
Please help
ThanksApplets run client side - which means the relevant class files need to be downloaded to the client.
Anything under the WEB-INF directory is not directly accessible by the client. Nothing under WEB-INF can be downloaded.
ergo, specifying the WEB-INF directory as part of your applet codebase is a bad idea.
I would suggest try copying the applet classes from under WEB-INF to some other place in your application.
Also, you should probably specify the full class name of your Applet in the plugin tag.
<%@ page import="com.util.MyApplet" %>
<jsp:plugin type="applet" code="com.util.MyApplet" codebase="/classes" width="250" height="100" jreversion="1.6">
<jsp:fallback>
<B>Unable to start plugin!</B>
</jsp:fallback>
</jsp:plugin>cheers,
evnafets -
I am trying to install the J2me Wireless Toolkit on a Linux system but the install errors with a
"This application requires Java 2 SDK" message. Please point me to the correct file(s) as the Sun site is not the easist to interpret. I have JRE1.5 currently installed - obviously not an SDK as the install requires.
Regardshttp://java.sun.com/javase/downloads/index.jsp
Click on the JDK 5.0 Update 8 download button.
Maybe you are looking for
-
can't open adobe premiere element 11 on my MacBook Pro? which I buy it from App Store? plz help its says that its currently not availabe I have so many work counting on this programme plz help
-
WebAS 6.20: startuperror : ID000546: Error instancing frame class of a cor
Hello, Please read the entire posting before you answer to the problem. I am installing the web middlewear for CRM IDES 4.0 SP4. SAP deliver e-selling scenario (based on 6.20 webas) in a sar file and all I have to is unzip it into a directory a
-
Epson R200 printer will not print
with an intel mac with osx 10.6 and adjusting in the firefox print window as necessary my printer will not print. The Epson print icon appears then deletes. In the print queue there is a blank. The printer works well with Safari
-
User Assigned to Org.unit
Hi all... I have list of user ..i want to find these users assigned to org.unit ? i need the list in production.. so i can't write the code... how can i find? any view or direct table which will list these stuff.. thanks...
-
I am having issues with icloud. I sync my email account from work, with Icloud but it does not synch all emails. I can send emails but it some times it does receive it but not synch with other devices such as Ipad or macbook pro. once I received an e