Strange problem (Korean language in jsp page) - Urgent Please
Dear friends,
I have a strange problem.
in my jsp page, i have to add hangul words also using korean language. (hangul).
After adding hangul language in jsp page, in browser, it is displaying in some other format.
how can i display hangul script on browser using a jsp page.
please help me.
Thanks in advance
Yours
Rajesh
Dear noahlau,
Thank you very much.
I got the solution for this problem
I used korean encoding char set like this in my jsp program.
<%@page contentType="text/html;charset=ks_c_5601-1987"%>
Now it is working fine.
Thanks once again.
if you need any help please ask me.
Yours
Rajesh
Similar Messages
-
Java problem -- sending email via JSP page
Below is a copy of my feedback page
Basically, I am doing my work in a JSP page.
For now, my plan is that when I click on the ''submit'' button, everything written on the text boxes will be sent to my email (my hotmail address)
However, I do not know what are the codings needed (honestly speaking, I went up to Google to search but then, the codings are complicated and I don't know what is written) and neither do I know whether should I place all codings on one JSP page or place the codings for submission to my email on another JSP page.
Please help. Thank you.
http://i468.photobucket.com/albums/rr43/mrclubbie/feedback_page.jpg (sorry you have to copy the link and paste on your browser)
Edited by: mrclubbie on Jun 27, 2010 3:05 AMYou do not have a problem, so stop trying to pretend you have one. Lack of knowledge is not a problem, because it has a very easy fix: study more. Invest some time. Seriously, you are going to find blocks at every corner until you fully understand the tools you are using, and you are not going to find the answers by posting in forums hoping for someone to bail you out.
I find that Javaworld usually has clear and precise articles, so I would use this one as the basis for your research:
[http://www.javaworld.com/javaworld/jw-10-2001/jw-1026-javamail.html|http://www.javaworld.com/javaworld/jw-10-2001/jw-1026-javamail.html]
Good luck! -
Problem with onload in jsp page
Hi all,
I had two jsp pages, a search and a results page. I need to enter some search criteria in the first page and based on that criteria i will be getting the results in the results jsp. Now, when i click the back button in the results page, i need to go to the search page and the values which i entered in the search page needs to be present there. But the problem is i had a javascript function which runs on loading of the search page. This function will set all the values in this search page to empty whenever we go to the search page. I am calling this javascript function as follows in my search jsp page.
<body onload="setdefaultvalues('<%=name%>');">
I am having the code for the back button in the results page as follows.
<INPUT TYPE="button" VALUE='Back' onClick="javascript:history.go(-1);resetvalue(name);" class="button">
The problem i am facing is whenever i go to the search page by clicking on the back button, the values in the search page are getting empty because of the onload method. There is no way that i can remove this onload method as i require it for setting the values in the search page evrytime i get to that from other modules as it is the main page for my module. So, is there anyway that i can stop this function from executing when i come from the results page or is there any other way that i can store the values in the search page when going from the results page.i think you really should have the result page include your search page contents rather than having the user need to click back as you'll end up with all sorts of nightmares in caching & session object management to be honest. if the search page is complex use javascript to hide contents and let the users expand them when they want to re-search.
however, if you feel you must i would suggest the following:
in your result page:
session.setAttribute("userQuery","true"); (you probably actually want to put a container object with the query information in here)
in your search page you could have something like:
<body <% session.getAttribute("userQuery")==null { %>onload="setdefaultvalues('<%=name%>');"<% } %>>
-or-
<body onload="setdefaultvalues('<%=name%>',<%=session.getAttribute("userQuery")==null?"true":"false"%>);">
function setdefaultvalues(name,run) { if ( !run ) return;....}
you'll have to decide when to remove the object though cause once its set its there until the session expires or you remove it.
hope that helps, good luck! -
Problem in running a jsp page on tomcat 5.0
hi....
i made a java class abc.java and then compiled it to get a java class file named abc.class in a package named pkg.
Then i copied this package in the classes folder of the WEB-INF folder in tomcat 5.0.
After that i created a jsp page in which i imported this class file. Now when i run the jsp page on tomcat 5.0 i get an error saying this:
javax.servlet.ServletException: pkg/abc (Unsupported major.minor version 49.0)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:244)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.UnsupportedClassVersionError: pkg/abc (Unsupported major.minor version 49.0)
java.lang.ClassLoader.defineClass0(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:502)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1214)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Generator.generate(Generator.java:3272)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Can anyone please tell me the solution to this problem?
thanksThis post:
http://mail-archives.apache.org/mod_mbox/jakarta-tomcat-user/200408.mbox/%[email protected]ys.com%3E
Leads me to believe that you're compiling and targeting a java version that your tomcat installation doesn't support. What version of the JDK are you using?
Good Luck
Lee -
Passing values to the JSP page - Urgent
Hi all,
I have to pass the user id value to the JSP page. I have written the following code in the doInitialization() method
IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
IPortalComponentContext myContext = request.getComponentContext();
IPortalComponentProfile myProfile = myContext.getProfile();
IAuthentication ia = UMFactory.getAuthenticator();
IUser portalUser = ia.getLoggedInUser(request.getServletRequest(), request.getServletResponse(false) );
s = portalUser.getUniqueName();
IPortalComponentSession componentSession = ((IPortalComponentRequest)getRequest()).getComponentSession();
Object o = componentSession.getValue("myEvents");
myEvents = (LoadEvents)o;
//myEvents = (LoadEvents) myContext.getValue("myEvents");
myEvents.setUserId(s);
myContext.putValue("myBeanName", myEvents);
I have also defined myEvents as a bean in my JSP page with scope APPLICATION. But I get User Id as "NULL".
Thanks in advance.
Rgds,
Janvi.Hi Prakash,
Please find the jsp code pasted below:
<hbj:content
id="myContext">
<hbj:page
title="Successful processing">
<jsp:useBean id="myMeet" scope="application" class="com.sap.ep.bluestar.LoadEvents" />
<jsp:useBean id="myEvents" class="com.sap.ep.bluestar.MonthView" scope="application" />
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" %>
<%
int leadSpaces, daysInMonth, leadSpaces_next,daysInMonth_next, col_Counter;
myCal.setMonthView();
java.util.Vector printVal_pre = new java.util.Vector();
myCal.printMonth(myCal.getPre_month(),myCal.getPre_year());
printVal_pre = myCal.getPrintValues();
java.util.Vector printVal_cur = new java.util.Vector();
myCal.printMonth(myCal.getCur_month(),myCal.getCur_year());
printVal_cur = myCal.getPrintValues();
java.util.Vector printVal_next = new java.util.Vector();
myCal.printMonth(myCal.getNext_month(),myCal.getNext_year());
printVal_next = myCal.getPrintValues();
if(request.getMethod().equals("POST")){
try {
String action =(String) request.getParameter("action");
if(action.equals("insert")){
// response.sendRedirect("_insertEvent.jsp");
//response.sendRedirect("test.html");
} catch(Exception e) {
System.out.println(e.getMessage());
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script language="javascript">
function insertEvent(frm,eventDay){
alert("here finally " + eventDay + " " + frm.eventMonth.value + " " + frm.eventYear.value );
frm.action.value = "insert";
frm.submit();
function openWin(frm,eventDay)
var newWin = window.open("http://localhost:50100/irj/servlet/prt/portal/prtroot/Web_Calendar.eventHandler?variable=" + frm.eventMonth.value + "/" + eventDay + "/" + frm.eventYear.value, 'popup',
'resizable,height=200,width=325');
if(newWin.focus) newWin.focus();
</script>
</head>
<body>
User is : <%= myCal.getUserId() %>
<table width="745" height="583" border="0">
<tr>
<td width="258" height="23" align="center"><B> <% out.println(printVal_pre.elementAt(0).toString() + " " + printVal_pre.elementAt(1).toString());
leadSpaces = ((Integer)printVal_pre.elementAt(2)).intValue();
daysInMonth = ((Integer)printVal_pre.elementAt(3)).intValue();
%> </B> </td>
<td width="215"> </td>
<td width="258" align="center"><B> <% out.println(printVal_next.elementAt(0).toString() + " " + printVal_next.elementAt(1).toString());
leadSpaces_next = ((Integer)printVal_next.elementAt(2)).intValue();
daysInMonth_next = ((Integer)printVal_next.elementAt(3)).intValue();
%> </B></td>
</tr>
<tr>
<td height="151"><table width="245" border="1">
<tr>
<th width="35" scope="col"><div align="center">S</div></th>
<th width="35" scope="col"><div align="center">M</div></th>
<th width="35" scope="col"><div align="center">T</div></th>
<th width="35" scope="col"><div align="center">W</div></th>
<th width="35" scope="col"><div align="center">T</div></th>
<th width="35" scope="col"><div align="center">F</div></th>
<th width="35" scope="col"><div align="center">S</div></th>
</tr><tr>
<% col_Counter = 0;
for (int i = 0; i < leadSpaces; i++) {
out.print("<td> </td>");
col_Counter++;
for (int i = 1; i <= daysInMonth; i++) {
// This "if" statement is simpler than messing with NumberFormat
if(i < 9) {
out.print("<td align='center'>" + " " + i + "</td>");
col_Counter++;
} else {
out.print("<td align='center'>" + i + "</td>");
col_Counter++;
if ((leadSpaces + i) % 7 == 0) { // Wrap if EOL
out.println("</tr><tr>");
int cnt = col_Counter;
if(col_Counter == 28){
out.println("</tr>");
}else {
for(int i = 0; i < (42 - col_Counter);i++){
out.print("<td> </td>");
cnt++;
if((cnt%7) ==0)
out.println("</tr><tr>");
out.println("</tr>");
%>
</table></td>
<td> </td>
<td><table width="245" border="1">
<tr>
<th width="35" scope="col"><div align="center">S</div></th>
<th width="35" scope="col"><div align="center">M</div></th>
<th width="35" scope="col"><div align="center">T</div></th>
<th width="35" scope="col"><div align="center">W</div></th>
<th width="35" scope="col"><div align="center">T</div></th>
<th width="35" scope="col"><div align="center">F</div></th>
<th width="35" scope="col"><div align="center">S</div></th>
</tr>
<tr>
<% col_Counter = 0;
for (int i = 0; i < leadSpaces_next; i++) {
out.print("<td> </td>");
col_Counter++;
for (int i = 1; i <= daysInMonth_next; i++) {
// This "if" statement is simpler than messing with NumberFormat
if(i < 9) {
out.print("<td align='center'>" + " " + i + "</td>");
col_Counter++;
} else {
out.print("<td align='center'>" + i + "</td>");
col_Counter++;
if ((leadSpaces_next + i) % 7 == 0) { // Wrap if EOL
out.println("</tr><tr>");
cnt = col_Counter;
if(col_Counter == 28){
out.println("</tr>");
}else {
for(int i = 0; i < (42 - col_Counter);i++){
out.print("<td> </td>");
cnt++;
if((cnt % 7 ) ==0)
out.println("</tr><tr>");
out.println("</tr>");
%>
</table></td>
</tr>
<tr>
<td colspan="3"><table width="735" height="383" border="1">
<tr>
<td colspan="7" align="center"><B> <% out.println(printVal_cur.elementAt(0).toString() + " " + printVal_cur.elementAt(1).toString());
leadSpaces = ((Integer)printVal_cur.elementAt(2)).intValue();
daysInMonth = ((Integer)printVal_cur.elementAt(3)).intValue();
%> </B></td>
</tr>
<tr>
<th width="105" scope="col">SUN</th>
<th width="105" scope="col">MON</th>
<th width="105" scope="col">TUE</th>
<th width="105" scope="col">WED</th>
<th width="105" scope="col">THUR</th>
<th width="105" scope="col">FRI</th>
<th width="105" scope="col">SAT</th>
</tr>
<form name="eventCal" method="post" action="Web_Cal.jsp">
<input name="eventMonth" type="hidden" value="<%= myCal.getCur_month() + 1 %>">
<input name="eventYear" type="hidden" value="<%=myCal.getCur_year() %>">
<input name="action" type="hidden" value="">
<tr>
<% col_Counter = 0;
for (int i = 0; i < leadSpaces; i++) {
out.print("<td> </td>");
col_Counter++;
for (int i = 1; i <= daysInMonth; i++) {
// This "if" statement is simpler than messing with NumberFormat
if(i < 9) {
out.print("<td align='center'>" + " " + "<a href='javascript:openWin(document.eventCal," + i + ");'>" + i + "</a></td>");
col_Counter++;
} else {
out.print("<td align='center'>" + "<a href='javascript:openWin(document.eventCal," + i + ");'>" + i + "</a></td>");
col_Counter++;
if ((leadSpaces + i) % 7 == 0) { // Wrap if EOL
out.println("</tr><tr>");
if(col_Counter == 28){
out.println("</tr>");
}else if(col_Counter < 35){
for(int i = 0; i < (35 - col_Counter);i++)
out.print("<td> </td>");
out.println("</tr>");
}else {
for(int i = 0; i < (42 - col_Counter);i++)
out.print("<td> </td>");
out.println("</tr>");
%> </form>
</table></td>
</tr>
</table>
</body>
</html>
</hbj:textView>
</hbj:page>
</hbj:content>
Regards,
Janvi -
Problem in sending a JSP Page as email !!
Hi,
I have a web based tool which sends a jsp page as the body of the email. The jsp page contains a table with data. When i forward that email the table in the email is coming up. Kindly suggest something which will prevent me fom this.Hi,
There is an article regarding this at
http://www.stardeveloper.com/articles/display.html?article=2001101101&page=1
Best Regards -
Writing UTF-8 characters to a JSP page (URGENT).
Hello everybody!
I am trying to write UTF8 encoded characters to a jsp page, but is seems as if the PrinterWriter I get back in the getWriter call keep returning a writer parametrized for the ISO-8859-1 character set.
I am calling setContentType with "text/html; charset=UTF-8" as parameter but it does not help.
Anyone know what I should do?
Thanx alot!
Regards DanielI put the following in a "page" directive at the top of my JSPs:
contentType="text/html; charset=UTF-8"
That handles getting a jspWriter that write UTF-8.
You also need to convert the parameters you get from the browser's form input fields to UTF-8 encoded Strings.
Like this:
String temp = req.getParameter(parmName);
// bail out if nothing here
if (temp ==null) return "";
try
temp = new String(temp.getBytes("ISO-8859-1"),"UTF-8");
catch (Exception e)
Mydebug("UTF-8 conversion exception");
}When you get the parameter it is UTF-8 encoded, but Java's default encoding is ISO-8859-1. After executing the conversion above, temp is a UTF-8 encoded String. -
Calculations in Jsp form - Urgent Please
Hi,
I have 3 fields in my table, Quantity,Price and Total. Quantity * Price gives Total. Price is the Column of another table and I display the values of Price using <jbo:InputSelectLOV>. So,my requirement is when I input the value for Quantity and select the values from list in the Edit.jsp form I need the value of Quantity * Price to be displayed in the Total field on Browse form. Could someone please help me. I am new to JSP and any help is appreciated.
Thank YouIt's not related to JDeveloper this is a generic thing for HTML pages - if you want to do client side (menaing no traffic to the server) actions you use Javascript.
You just need to stick the Javascript into the JSP page you have inside JDeveloper. -
Problems with filters and jsp pages.
I have the following simple filter that checks if there is user information in the session object and redirects accordingly:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class LoginFilter implements Filter
public void init(FilterConfig filterConfig) {}
public void destroy() {}
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException
System.out.println("filter");
HttpSession session = ((HttpServletRequest)request).getSession();
String action = request.getParameter("action");
if(action != null && !action.equals("login") && !action.equals("wronglogin"))
if(session.getAttribute("username") == null)
((HttpServletResponse)response).sendRedirect("index.jsp?action=wronglogin");
System.out.println("User not OK, kicking out...");
else
chain.doFilter(request, response);
System.out.println("User OK, letting in...");
else
chain.doFilter(request, response);
}The filter is mapped to an admin page with the name index.jsp. However, I get an error for every <% and %> tag in the file (there are quite a few) when I use the filter with the page. The page works fine without the filter, and the filter seems to work with pages without scriptlets (without the <% and %> tags). Here is the beginning of the error report:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 6 in the jsp file: /admin/index.jsp
Generated servlet error:
Syntax error on tokens, AnnotationName expected instead
An error occurred at line: 6 in the jsp file: /admin/index.jsp
Generated servlet error:
Syntax error on tokens, delete these tokens
An error occurred at line: 6 in the jsp file: /admin/index.jsp
Generated servlet error:
Syntax error on token ";", [ expected
An error occurred at line: 6 in the jsp file: /admin/index.jsp
Generated servlet error:
Syntax error on token ";", [ expected
An error occurred at line: 6 in the jsp file: /admin/index.jsp
Generated servlet error:
Syntax error on token ";", [ expected
Jasper gives me many errors per <% and %> tag. As you can see there is a <% tag on line 6. Any idea, why this does not work?
Thanks!
Message was edited by:
chincillyaWhat is the JSP scriptlet code at line 6 ?
By looking at the code we can identify if there are any syntax errors, otherwise we can't really guess what might be the problem. -
JNDI lookup from a JSP page (URGENT)
Hello,
In my JSP I was using the "conn = DriverManager.getConnection("URL","username", "password")" scheme
to connect to the database. I want to change this to use the JNDI for the database lookup in the same JSP.
After creating this JSP i am using the include directive to include this JSP in all my other JSPs so that I can get the connection on other JSPs too.
My included JSP where I use the JNDI look up is:
<%@ page import="javax.naming.*,javax.sql.DataSource,java.sql.*" %>
<%!
static Connection conn;
static Statement statement;
static DataSource dataSource;
%>
try{
Context ctx = new InitialContext();
dataSource = (DataSource)ctx.lookup("MY_JNDI_NAME");
conn = dataSource.getConnection();
statement = conn.createStatement();
}catch (Exception excep){
out.println("Exception occurred "+excep);
%>
After I include this JSP in my main JSP, i get some error:
188: Type expected. } catch (Throwable t) { ^ 1 error
Can anyone here please help how to fix this.
Thanks<%@ page import="javax.naming.*,javax.sql.DataSource,java.sql.*" %>
<%!
static Connection conn;
static Statement statement;
static DataSource dataSource;
%><% // <-- you were missing a "<%" here
try{
Context ctx = new InitialContext();
dataSource = (DataSource)ctx.lookup("MY_JNDI_NAME");
conn = dataSource.getConnection();
statement = conn.createStatement();
}catch (Exception excep){
out.println("Exception occurred "+excep);
%>If I run that code in tomcat I get "Exception occurred javax.naming.NameNotFoundException: Name MY_JNDI_NAME is not bound in this Context". Which is what I would expect.
btw: You really shouldn't be doing this stuff in a jsp. -
Problem Loading JDBC Enabled JSP Page
Hi all, does anyone knows that's the case of this error:
This happened when I tried to access MySQL Database from remote client. I have no problem loading normal jsp file w/o JDBC Connection. Kind of confused on what is going on
Regards,
Joe
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: com.mysql.jdbc.Driver
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
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:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)
root cause
javax.servlet.ServletException: com.mysql.jdbc.Driver
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536)
at org.apache.jsp.dbquery_jsp._jspService(dbquery_jsp.java:112)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
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:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)
Apache Tomcat/4.1.24Hi scsi-boy, first of all, thank you so much for your
prompt and fast response. So how do i tackle
ClassNotFoundException ?.i'm sorry coz i'm a newbie to
jsp. I hope by providing my configuration below could
aid you in understanding my problem.
I've place the setting config in /etc/profile with the
following:
JAVA_HOME=/usr/local/java
CATALINA_HOME=/usr/local/tomcat
ANT_HOME=/usr/local/ant
APACHE_HOME=/usr/local/apache
MYSQL_HOME=/usr/local/mysql
CLASSPATH=${CATALINA_HOME}/common/lib/servlet-api.jar:$
YSQL_HOME/connector/mysql_connector/mysql_connector-jav
-3.08-stable-bin.jar:${JAVA_HOME}/lib/tools.jar:${JAVA_
OME}/jre/lib/rt.jar:./
PATH=${PATH}:${JAVA_HOME}/bin:${ANT_HOME}/bin:
MANPATH=${JAVA_HOME}/man:${MANPATH}
export JAVA_HOME ANT_HOME APACHE_HOME MYSQL_HOME
CATALINA_HOME CLASSPATH PATH MANPATH
As you can see, i've un-tar mysql_connector in
/usr/local/mysql/connector directory and set my
classpath to point to that file. Is that the proper
way to do it?
Regards,
Joesorry not a JSP expert however just to clarify i am guessing that it is a ClassNotFoundException. it could be something else entirely and i don't really want to send you on a wild goose chase. we need to know what the root exception actually is.
i am off to sleep now but i'm sure if you can give a little more information which may involve figuring out how to get it to cough up more information someone will help you here. -
How to display a html report on jsp page---urgent
i want to display a html report wen a tab is clicked.can any tell me how to do tat.
Didn't quite get your requirement. What do you mean by an HTML report?
-
Hi all
I am facing problem with following Query , Could you please any body assist me
It is urgent task.
SELECT load_id,
file_name,
num_pages,
TO_CHAR((process_start_date,'DD-MON-YYYY HH24:MI:SS'),(process_end_date,'DD-MON-YYYY HH24:MI:SS'),
(creation_date,'DD-MON-YYYY HH24:MI:SS'), (last_update_date,'DD-MON-YYYY HH24:MI:SS')),
last_updated_by
FROM SAS_ECM_DOCUMENT_LOADS
WHERE CREATION_DATE
BETWEEN (?,'DD-MON-YYYY HH24:MI:SS')
AND (?,'DD-MON-YYYY HH24:MI:SS')
OR file_name like ?
Thanks,
RED1) The syntax
BETWEEN (?,'DD-MON-YYYY HH24:MI:SS') AND (?,'DD-MON-YYYY HH24:MI:SS')
doesn't make any sense. If you are passing in a character string, you would need to call TO_DATE with an appropriate format mask, but there is no TO_DATE call. If you are passing in date values, you wouldn't want to cast to a different data type. You'd just want
BETWEEN date1 AND date2
2) "not showing the date column" doesn't make a whole lot of sense. There are 5 date columns (well, 4 columns that appear to be dates that are being cast to strings and 1 that appears to be a real date) in your query. What does "not showing" mean here?
3) Without some sample data and the expected output, it is highly unlikely that anyone is going to correctly guess what you're trying to accomplish and guess at the right way to accomplish that task. If you provide table declarations, sample data, and expected output, it's very likely that we'll be able to help...
Justin -
Problem with a user-password request, urgent please!!
Hi all!!
I´m consuming a WS on XI with a Web Dynpro ABAP. When I execute the proccess I get an error, because is necessary to introduce an user and password in a popup to access XI.
How can I avoid this request??In addition to SSO to connect to XI,
you can also look at PROXies.
See transaction SPROXY.
Proxies to Interfaces on XI can be generated on the ABAP stack. Using SPROXY.
The genrated ABAP classes can be called from your WDA application.
System users are registered for the connection between stacks.
See XI post installation Guide for more details.
So you have a couple of alternatives.
But we strongly recommend you dont use URLs to pass passwords.
If the password must be sent with the SOAP call, speak to you XI consultant about
passwords inside the payload / message header and use HTTPS to do the SOAP call.
regards
Phil -
Hi ,
I'm facing a problem in displaying a JSP page . I'm displaying records from the database on the page . I want to display only 20 records at a time . I have given the navigation facility for previous,first ,last ,next etc.
I'm getting all the records at once and displaying them at once . But , I show only 20 records at a time ,hiding the remaining records .
This works fine for less no . of records but for more records ,say 2000-3000 records , it gets quite slow as expected .
I don't want to fire the query again .
Is there any other way possible using this technique .
It's very urgent . So kindly help .
Thanks.Just get a scrollable ResultSet with the row amount for 1 page, e.g.
* Returns a result set for the given query, that is read only and scrollable
* (cursor can move forward and backward). The default fetch size is used and
* can be changed anytime by calling resultSet.setFetchSize(newFetchSize).
* <p>
* Note: be sure that the used JDBC driver supports scrollable result sets via
* <code>DatabaseMetaData.supportsResultSetType(ResultSet.TYPE_SCROLL_SENSITIVE)</code>
* @param select SQL select query.
* @param fetchSize Number of rows to prefetch.
* @return Scrollable, read-only result set.
private ResultSet getScrollableResultSet(String select, int fetchSize) {
ResultSet result = null;
if (select != null) {
try {
//TYPE_SCROLL_SENSITIVE can throw SQLException "Unsupported syntax for refreshRow()" with the
//current ORACLE driver (8.1.7.0.0).
// Statement stmt = createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
Statement stmt = createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
int maxRows = stmt.getMaxRows();
if (fetchSize < 0 || fetchSize > maxRows) {
fetchSize = 0; //ignore fetch size
stmt.setFetchSize(fetchSize);
long t = System.currentTimeMillis();
result = stmt.executeQuery(select);
logger.debug(select + (" ("+(System.currentTimeMillis() - t)+")"));
if (result == null) {
stmt.close();
} catch (SQLException sqle) {
logger.error("Error getting scrollable ResultSet for '"+select+"'.", sqle);
throw new BavException(sqle);
return result;
}//getScrollableResultSet()and fetch the next/previous page records via the resultSets next()/previous() methods. But beware that the SQL statement doesn't use an ORDER BY or GROUP BY that needs to fetch all rows anyway.
Maybe you are looking for
-
How do I get Logic to sync to external audio device?
Here is what I am trying to do: I have a Big Ben which I want to use to sync everything together. I have Lynx Aurora converters on the way but for now I need to use a 002 rack with a Presonus DigiMax for audio i/o. So basically, I want to connect BIg
-
Potential problem with XMLDOM.writeToClob()
I'm really hoping that someone can help me with this. Last fall, wrote some code that used XMLDOM to build a document and send it to a web service. I remember having problems with WriteToBuffer and WriteToClob during my development efforts, which I t
-
Whenever I access the iTunes store, the homepage loads without a problem. If I try to browse for music, I do not have any problems either. Once I click a link from the browse menu or the homepage, iTunes immediately starts using 100% of my processor
-
Can't automatically start appserver 8.2 under Solaris 10
Hi, I have recently installed Sun Java Application Server 8.2 on Solaris 10 6/06 under a user other than root. I'm interested in making domain1 start-automatically after booting. I tried for the first time a script that used asadmin start-domain doma
-
N97 mini - customisation of bookmark's icons on ho...
Hello, on N97 mini it is possible to put shortcut for internet bookmark on the home screen. However, I don't know, how it is possible to change the icon which is automatically set to the sheet of paper with the globe? Is this possible at all? Thanks