Whats wrong with this servlet code..?no error in log
hello guys..hope one of you can help....
i have 2 servlet classes. one receives form data sent from a jsp page, then create a form object containing all the inputs.. that object is then added to the session ..
also, it construct a User object containing info about the present user and add it to the session.. IUser and Form are inner to the main class.
the first servlet (check) seems to work fine.. but the problem occurs with the second servlet...i have inserted some printl statements to help me identify how far it goes and it seems that the whole code of the second servlet(update) is almost redundant....I dont get any error message ..simply a blank page which is of course of no help to me...
I hate inserting long code here but i would be pleased if anyone could tell me of a way to find out about the actual problem..program compiles fine but..it just freezes at runtime
..here is part of the code..whats wrong?
HttpSession session=request.getSession();
User user2=(User)session.getAttribute("person");
Form fr=(Form)session.getAttribute("form");
System.out.println("User and Form created");
int uid=user2.getId(); //class User contain the getId method
String uname=user2.getName();
System.out.println("Data for user retrieved");
String goTo=fr.getC();
String password = fr.getP();
String email=fr.getE();
String newName=fr.getN();
System.out.println("data from form retrieved");
thanks
the first servlet was indeed supposed to ass all those attributes...
but the thing is that the data being retrieved later were not of the type expected...
i have now decided to proceed differently but I am a bit curious to lean more about something that you mentionned in relation to servlet listeners..i never thought of the need to remove all those attribute when the session times out...
I thought that it was doned automatically with a call to session.invalidate().
is that not the case?
thanks
Similar Messages
-
Does any one know what is wrong with this servlet code
package com.bt.ros;
import java.util.*;
import java.io.*;
import java.net.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import javax.sql.*;
import javax.naming.InitialContext;
import javax.naming.Context;
import javax.naming.NamingException;
* This class is a servlet that searches for a Finder Aid.
* @author
public class FinderAidsSearchS extends HttpServlet {
* This is the static initializer,
* executed the first time this class is referred to.
* It makes sure the JDBC pool driver is loaded.
* This method examines an HTTP request and searches for the
* specified Finder Aid record in the database. It then redirects
* the response to the <tt>Results.jsp</tt> JSP page.
public void service(HttpServletRequest req, HttpServletResponse res)
throws IOException
HttpSession session = req.getSession(true);
//res.setContentType("text/html");
//PrintWriter out = res.getWriter( );
//out.println("<HTML>");
//out.println("<HEAD>");
//out.println("<TITLE>");
//out.println("A Servlet Example");
String year = req.getParameter("Year");
String year_range = req.getParameter("Year_Range");
String county = req.getParameter("County");
Connection conn = null;
try {
//example code from tomcatmanual
Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup("java:/comp/env");
DataSource ds = (DataSource)envContext.lookup("jdbc/rosDS");
//Connection
conn = ds.getConnection();
Statement stmt = conn.createStatement();
String select = "select * from abridgment where " +
"(a_county = '" + county +
"' AND a_year_date = " + year +
out.println("<DEBUG> <select> the select staement is : " + select);
stmt.execute(select);
ResultSet resultSet = stmt.getResultSet();
Results abridgeresults = new Results();
abridgeresults.setName("NaeemColl");
Abridgment varabridgment = null;
int nRows = 0;
while(resultSet.next()){
nRows++;
varabridgment = new Abridgment();
varabridgment.seta_county(county);
varabridgment.seta_year_date(Integer.parseInt(year));
varabridgment.seta_sub_year_volume(resultSet.getInt("a_sub_year_volume"));
// out.println("varabridgment - attributes are:");
//out.println("varabridgment - attributes are:" +varabridgment.geta_sub_year_volume());
//out.println("varabridgment - attributes are:"+resultSet.getInt("a_sub_year_volume"));
varabridgment.seta_page_id(resultSet.getString("a_page_id"));
varabridgment.seta_month_date(resultSet.getInt("a_month_date"));
varabridgment.seta_day_date(resultSet.getInt("a_day_date"));
varabridgment.seta_year_sequence(resultSet.getLong("a_year_sequence"));
varabridgment.seta_day_sequence(resultSet.getLong("a_day_sequence"));
varabridgment.seta_year_volume(resultSet.getInt("a_year_volume"));
varabridgment.seta_volume_id(resultSet.getString("a_volume_id"));
varabridgment.seta_summary(resultSet.getString("a_summary"));
varabridgment.seta_batch_id(resultSet.getLong("a_batch_id"));
varabridgment.seta_image_id(resultSet.getLong("a_image_id"));
abridgeresults.addAbridgment(varabridgment);
//trying to use vector construct
req.setAttribute("results",abridgeresults);
//session.setAttribute("results", abridgeresults);
stmt.close();
conn.close();
//out.println("</BODY>");
//out.println("</HTML>");
// String sURL = res.encodeRedirectURL("/rossearch/results.jsp");
try{
//TEMPCOMM res.sendRedirect(sURL);
req.getRequestDispatcher("/rossearch/results.jsp").forward(req, res);
//TEMPCODE
//out.println("</BODY>");
//out.println("</HTML>");
catch(Exception e){
System.err.println("Exception: FinderAidsSearchS.service: " + e);
catch (Exception e) {
System.err.println("Exception: FinderAidsSearchS.service: " + e);
}i really need some assistance at the following areas of code :
where the database results are set to attributes of one bean varabridgment (Type Abridgement) - the declaration and use of this bean.
and where this bean is then added to another bean abridgeresults (Type Results) as a List collection.
i get a null pointer exception when i try to retrieve the List from abridgeresults object of Type Results Bean.
i would really appreciate some assistance in this - i really need to go to sleep now - but cant until i solve this issue. - thanks all in advance.below is exception outputed to tomcat log file.
it is thrown at the following line of code in the jsp that tries to get the List object :
currently jsp code to retrieve List: <% List myAbridgments = (List) request.getAttribute("results");
for (int i = 0; i < myAbridgments.size(); i++) {
abridgment = (Abridgment) myAbridgments.get(i);
%>
line that gives problem is
(results_jsp.java:95)
//myAbridgments - is variable where i store the List object in jsp scriptlet
for (int i = 0; i < myAbridgments.size(); i++) {
Also, i dont understand why the servlet keeps on forwarding to the results.jsp when i even comment out the line of code to forward request oobject to results.jsp - i recompile copy it over original and restart tomcat - but still i get the null pointer exception in results_jsp - but i'm no longer forwarding anything to this jsp. --- i want to do some out.printline statemets in servelt to see some of the data from the query - but i cant as it just forwrads the request to results.jsp - how can i output the data to look at debug - i dont have a log4j logger setup and dont have IDE to be able to place break points - so wanted to just output stuff to browser to have a look at what was going on - but can't as just forwards request on ?
Exception ....
2005-11-07 02:45:20 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException
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 -----
java.lang.NullPointerException
at org.apache.jsp.results_jsp._jspService(results_jsp.java:95)
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) -
Whats wrong with this logic - Why the error, out of bounds
Hi there,
I have this code that I am trying to work out with some logic I have put together, as shown below, but I get an error message saying "Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -29
":" What I am basically trying to do is print out a string which has both numbers and words into a vertical dialog window with the appropriate words next to their corresponding numbers.
{code}
A = "91011Word121314Sentence151617";
int start = 9;
int end = 17;
// Considering that we are on the first iteration
for(int i = start; i <= end; i++)
String a2 = "" + i; // convert the integer 9 into a string
int a1 = A.indexOf(a2); // get the index of 9 in the string A
int a3 = a2.length(); // get the length of 9
int a4 = a1 + a3; // the index of 9 plus its length is "equivalent" to the index of the next number in A -- 1
String a5 = "" + (i+1); // convert the next integer 10 into a string
int a6 = A.indexOf(a5); // get the index of 10 in the string A -- 1
add += a2 + " " + A.substring(a4,a6) + "\n";
/** Following the logic I would expect that at the end of the first iteration the String "add" should contain,
just 9 followed by a space, and the A.substring(1,1) would return nothing since there is no word in the
middle then there will be a new line */
{code}
However, I ended up getting a string index out of bounds exception. I would appreciate it if someone could explain to me why that would be so.
Thanksdefine wrote:
for(int i = start; i <= end; i++)
That should probably be "i < end". This program seems very fragile btw. No checking if indexOf() return numbers less than zero, and ambiguous data..
To improve your code, you should use better variable names. Also, it's better to use String.valueOf(i) instead of "" + i
Edited by: paul.miner on Dec 7, 2007 8:53 PM - Typos -
What's wrong with this simple code?
What's wrong with this simple code? Complier points out that
1. a '{' is expected at line6;
2. Statement expected at the line which PI is declared;
3. Type expected at "System.out.println("Demostrating PI");"
However, I can't figure out them. Please help. Thanks.
Here is the code:
import java.util.*;
public class DebugTwo3
// This class demonstrates some math methods
public static void main(String args[])
public static final double PI = 3.14159;
double radius = 2.00;
double area;
double roundArea;
System.out.println("Demonstrating PI");
area = PI * radius * radius;
System.out.println("area is " + area);
roundArea = Math.round(area);
System.out.println("Rounded area is " + roundArea);Change your code to this:
import java.util.*;
public class DebugTwo3
public static final double PI = 3.14159;
public static void main(String args[])
double radius = 2.00;
double area;
double roundArea;
System.out.println("Demonstrating PI");
area = PI * radius * radius;
System.out.println("area is " + area);
roundArea = Math.round(area);
System.out.println("Rounded area is " + roundArea);
Klint -
Contest: Guess whats wrong with this code!
Can you guess whats wrong with this code snippet? Perhaps its too easy...
private void clearDefaultTableModel( DefaultTableModel dtm) {
int rowCount = dtm.getRowCount();
for(int i =0; i < rowCount; i++) {
dtm.removeRow(i);
}- Karl XIICan you guess whats wrong with this code snippet?
Perhaps its too easy...
private void clearDefaultTableModel(
DefaultTableModel dtm) {
int rowCount = dtm.getRowCount();
for(int i =0; i < rowCount; i++) {
dtm.removeRow(i);
it should be
private void clearDefaultTableModel(DefaultTableModel dtm) {
int rowCount = dtm.getRowCount();
for(int i =0; i < rowCount; i++) {
dtm.removeRow(0);
}or another way
private void clearDefaultTableModel(DefaultTableModel dtm) {
while(dtm.getRowCount()>0){
dtm.removeRow(0); -
select CASE WHEN TO_NUMBER(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'DDMMYYYY HH24:MM:SS'),13,2))>0 AND TO_NUMBER(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MM:SS'),13,2)) <14
THEN TO_DATE(CONCAT(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MM:SS'),13,2)||'00',SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MI:SS'),16)||'00'),'DD-MM-YYYY HH24:MI:SS') end
from table;
i have written this query.whats wrong with this query..........
the error is "literal does not match format string"
Reegards soumenWhy does your date_format loose, ununify and not fix ?
And what is your exact requirement?
>>
CASE WHEN
TO_NUMBER(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'DDMMYYYY HH24:MM:SS'),13,2))>0
AND TO_NUMBER(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MM:SS'),13,2)) <14
<<
This is
CASE WHEN TO_CHAR(START_TIME_TIMESTAMP,'MM') between '01' and '13'
>>
THEN TO_DATE(CONCAT(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MM:SS'),13,2)
||'00',
SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MI:SS'),16)||'00'),
'DD-MM-YYYY HH24:MI:SS')
<<
This is
TO_DATE(
TO_CHAR(START_TIME_TIMESTAMP,'MM"00"SS"00"),
'DD-MM-YYYY HH24:MI:SS')
Obviously, format is not matching !
SQL> select to_char(sysdate,'MM"00"SS"00') from dual;
TO_CHAR(
06004900
SQL> select to_date('06004900','DD-MM-YYYY HH24:MI:SS') from dual;
select to_date('06004900','DD-MM-YYYY HH24:MI:SS') from dual
ERROR at line 1:
ORA-01861: literal does not match format string -
Does ANYONE know whats wrong with this program?!?!
Hey(again),
Does anyone know whats wrong with this program?:
public class FloatingNumbersTest
public static void main(String args[])
float float1 =50.0f;
float closeFloat=0.001f
float farfloat=100.0f
if (float1<=closeFloat)
System.out.print("Float1 pretty close to zero");
if (float1>=closeFloat)
System.out.print("Float1 is near 0");
if (float1>=farfloat)
System.out.print("Float1 is not even close to zero!"0
}There has seemed to be 5 errors!public class FloatingNumbersTest
public static void main(String args[])
float float1 =50.0f;
float closeFloat=0.001f
float farfloat=100.0f
if (float1<=closeFloat)
HERE System.out.print("Float1 pretty close to zero");
if (float1>=closeFloat)
System.out.print("Float1 is near 0");
if (float1>=farfloat)
System.out.print("Float1 is not even close to zero!"0
}you're missing the opening { for the first if. -
I have a video that has sound, I brought it into afteraffects, made a composition and made some changes. I exported the composition (rendered it) for quick time to edit in photoshop - the video is about 7 minutes.
Playing the video there is no sound....why?
Bringing the video into photoshop for editing with content aware fill creates 500+ frames......is that normal?
also whats the easiest way to move between aftereffects and photoshop in terms of editing frames? can I make changes in photoshop and watch it update in after effects?What wrong with this?
Everything! Sorry, it's simply the most ill-conceived workflow I could imagine.
Playing the video there is no sound....why?
http://forums.adobe.com/thread/426347?tstart=0
Bringing the video into photoshop for editing with content aware fill creates 500+ frames......is that normal?
Yes. All video editing in PS is limited to 500 or 1000 frames, repsectively. There is no way to extend that range. Read the PS help!
also whats the easiest way to move between aftereffects and photoshop in terms of editing frames?
You don't. What you have in mind won't work, anyways. Content Aware Fill only works per frame and has no temporal stabilization, so each frame will have a different pattern and the resulting animation would flicker and wobble.
can I make changes in photoshop and watch it update in after effects?
That's what use File --> Reload Footage for or simply close and reopen the project.
Mylenium -
CAN ANYBODY TELL ME WHAT WRONG WITH THIS RSS FEED IT WONT WORK
CAN ANYBONE TELL ME WHATS WRONG WITH THIS FEED BECAUSE IT WONT WORK AND ALSO HOW DO I GET A LINK TO THE PODCAST RSS FEED FOR THE SUBMIT PODCAST PAGE ON ITUNES,
ANY HELP WILL BE MUCH APRECIATED
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
<channel>
<title>DJ Hybrid Coventry Drum n Bass Podcast</title>
<link>http://www.djhybridcoventry.com/podcast.htm</link>
<language>en-us</language>
<copyright>℗ & © 2007 DJ Hybridb& </copyright>
<itunes:subtitle>DJ Hybrid Drum n Bass Podcast brings you all the latest and greatest from the Drum n Bass scene, updated every two weeks</itunes:subtitle>
<itunes:author>DJ Hybrid</itunes:author>
<itunes:summary>The DJ Hybrid Coventry Drum n Bass Podcast will showcase a selection of the latest and greatest tunes that are getting rinsed on the scene, mixed down with sharp cuts and nasty double drops by Dj Hybrid the podcast will also feature other DJ's and Mc's on different shows. Updated every two weeks this is guarenteed to be an original style of drum n bass mashup, for more info check www.djhybridcoventry.com</itunes:summary>
<description>DJ Hybrid Drum n Bass Podcast brings you all the latest and greatest from the Drum n Bass scene, updated every two weeks</description>
<itunes:owner>
<itunes:name>DJ Hybrid</itunes:name>
<itunes:email>[email protected]</itunes:email>
</itunes:owner>
<itunes:image href="http://i100.photobucket.com/albums/m8/djhybrid/PODCASTLOGOBLUE.jpg" />
<itunes:category text="Music">
<itunes:category text="Drum n Bass"/>
</itunes:category>
<itunes:category text="music"/>
<item>
<title>DJ Hybrid Podcast - 1st Show 03/6/07</title>
<itunes:author>DJ Hybrid</itunes:author>
<itunes:subtitle>The first show of the new drum n bass podcast from DJ Hybrid</itunes:subtitle>
<itunes:summary>Welcome to the 1st show from DJ Hybrid because its the first show im goin to play what tunes i think represent me as a DJ aswell as my favourite drum n bass tunes at the moment for tracklistings check www.djhybridcoventry.com</itunes:summary>
<enclosure url="http://fs06n5.sendspace.com/dl/603942da730253766c5157920e810d3e/46771dd931 3f824d/v3adp4/DJ%20Hybrid%20Podcast%201%20%20-%20%203rd%20June%202007.mp3" length="8727310" type="audio/x-m4a" />
<guid>http://fs06n5.sendspace.com/dl/603942da730253766c5157920e810d3e/46771dd9313f824d /v3adp4/DJ%20Hybrid%20Podcast%201%20%20-%20%203rd%20June%202007.mp3</guid>
<pubDate>Sun, 03 Jun 2007 20:00:00 GMT</pubDate>
<itunes:duration>53:36</itunes:duration>
<itunes:keywords>DJ, Hybrid, Podcast, Drum, Bass, Jungle, Coventry, Double Drop, Latest, Tunes, Vinyl, Liquid, Rave, Reggae, Urban</itunes:keywords>
</item>
</channel>
</rss>First...Stop screaming. It's rude.
Next...there are some minor problems with your feed. "Drum n Bass" is not a iTunes category. Stick with <itunes:category text="Music" /> remove the others.
Not required, but recommend to add an <itunes:explicit> tag with a Y or N depending on what suits your podcast. The iTunes staff will remove your feed if it isn't tagged properly.
MP3 audio files should have a type="audio/mpeg".
Keep the Podcast spec handy...the categories and other info listed in the spec.
Test your feed with http://www.feedvalidator.org it will point out problems with your feed.
The bigger problems stem from your podcast enclosure, specifically the URL.
The URL you have listed to the podcast mp3 apparently has changed so iTunes can't download the file. It also appears that you are using a "free download" kind of service that uses web page based downloads, which might account for why the URL keeps changing. Don't think that iTunes will be able to properly download the file.
Erik -
What's wrong with my servlet code ?
<p>
Hi,
</p>
<p>
I need to redirect user from jsf application to PHP app with some request attributes using POST method. To check how to do at first I prepared simple servlet:
</p>
<p>
public class TestServlet extends HttpServlet {
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException,
</p>
<p>
IOException {
req.setAttribute("p1","Value One");
req.setAttribute("p2","Value Two");
res.sendRedirect("http://www.mycompany.pl/test.php");
public void doGet(HttpServletRequest request, HttpServletResponse response)throws IOException,
</p>
<p>
ServletException{
doPost(request,response);
</p>
<p>
I also prepared simple PHP page to display these attributes (Im sure this page works correct):
</p>
<p>
<html>
<body>
Attribute p1: <? echo $_POST["p1"]; ?> <br />
Attribute p2: <? echo $_POST["p2"]; ?> <br />
</body>
</html>
</p>
<p>
Te problem is that attributes from servet don't displayed on PHP page - why. What is wrong wit this servlet ?
</p>
<p>
Kuba
</p>Well if this line of code works for you:
res.sendRedirect("http://www.mycompany.pl/test.php");
you could append parameters by building the url string dynamically.
res.sendRedirect("http://www.mycompany.pl/test.php?p1=ValueOne&p2=ValueTwo");
Isn't PHP a server technology, if yes why don't you do all the work in php (you'll avoid cookie problems)?
Regards
Fred
PS I don't think this forum is the right place for php questions. -
HELP PLEASE - WHATS WRONG WITH THIS CODE
Hi. I get this message coming up when I try to compile the code,
run:
java.lang.NullPointerException
at sumcalculator.SumNumbers.<init>(SumNumbers.java:34)
at sumcalculator.SumNumbers.main(SumNumbers.java:93)
Exception in thread "main"
Java Result: 1
BUILD SUCCESSFUL (total time: 2 seconds)
I am not sure whats wrong with the code. Any assistance would be nice. The code is below.
package sumcalculator;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class SumNumbers extends JFrame implements FocusListener {
JTextField value1;
JTextField value2;
JLabel equals;
JTextField sum;
JButton add;
JButton minus;
JButton divide;
JButton multiply;
JLabel operation;
public SumNumbers() {
SumNumbersLayout customLayout = new SumNumbersLayout();
getContentPane().setFont(new Font("Helvetica", Font.PLAIN, 12));
getContentPane().setLayout(customLayout);
value1.addFocusListener(this);
value2.addFocusListener(this);
sum.setEditable(true);
value1 = new JTextField("");
getContentPane().add(value1);
value2 = new JTextField("");
getContentPane().add(value2);
equals = new JLabel("label_1");
getContentPane().add(equals);
sum = new JTextField("");
getContentPane().add(sum);
add = new JButton("+");
getContentPane().add(add);
minus = new JButton("-");
getContentPane().add(minus);
divide = new JButton("/");
getContentPane().add(divide);
multiply = new JButton("*");
getContentPane().add(multiply);
operation = new JLabel();
getContentPane().add(operation);
setSize(getPreferredSize());
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
public void focusGained(FocusEvent event){
try {
float total = Float.parseFloat(value1.getText()) +
Float.parseFloat(value2.getText());
sum.setText("" + total);
} catch (NumberFormatException nfe) {
value1.setText("0");
value2.setText("0");
sum.setText("0");
public void focusLost(FocusEvent event){
focusGained(event);
public static void main(String args[]) {
SumNumbers window = new SumNumbers();
window.setTitle("SumNumbers");
window.pack();
window.show();
class SumNumbersLayout implements LayoutManager {
public SumNumbersLayout() {
public void addLayoutComponent(String name, Component comp) {
public void removeLayoutComponent(Component comp) {
public Dimension preferredLayoutSize(Container parent) {
Dimension dim = new Dimension(0, 0);
Insets insets = parent.getInsets();
dim.width = 711 + insets.left + insets.right;
dim.height = 240 + insets.top + insets.bottom;
return dim;
public Dimension minimumLayoutSize(Container parent) {
Dimension dim = new Dimension(0, 0);
return dim;
public void layoutContainer(Container parent) {
Insets insets = parent.getInsets();
Component c;
c = parent.getComponent(0);
if (c.isVisible()) {c.setBounds(insets.left+24,insets.top+48,128,40);}
c = parent.getComponent(1);
if (c.isVisible()) {c.setBounds(insets.left+256,insets.top+48,128,40);}
c = parent.getComponent(2);
if (c.isVisible()) {c.setBounds(insets.left+408,insets.top+48,56,40);}
c = parent.getComponent(3);
if (c.isVisible()) {c.setBounds(insets.left+488,insets.top+48,152,40);}
c = parent.getComponent(4);
if (c.isVisible()) {c.setBounds(insets.left+128,insets.top+136,72,40);}
c = parent.getComponent(5);
if (c.isVisible()) {c.setBounds(insets.left+248,insets.top+136,72,40);}
c = parent.getComponent(6);
if (c.isVisible()) {c.setBounds(insets.left+368,insets.top+136,72,40);}
c = parent.getComponent(7);
if (c.isVisible()) {c.setBounds(insets.left+488,insets.top+136,72,40);}
c = parent.getComponent(8);
if (c.isVisible()) {c.setBounds(insets.left+176,insets.top+48,56,40);}
}Thank you. How do i amend this? I have defined value1though.Yes, you did - but after the call to addFocusListener(...). It needs to be before it.
BTW, you did the same thing with "value2.addFocusListener(this)" and "sum.setEditable(true)" on the next two lines. You're attempting to call a method on an object that doesn't exist yet (i.e., you haven't called new yet). -
Fed up! dont know whats wrong with this code
import java.io.*;
import java.net.*;
import java.awt.*;
public class machine {
private String machine_name;
private String IP_address;
public static void main(String[] args) throws IOException {
machine server = new machine();
server.machine_name = "SERVER1";
server.IP_address = "192.168.0.1";
InputStreamReader reads_incoming = null;
// Reads incoming Bytes
PrintWriter sends_outgoing = null;
Socket ping_socket = null;
try{
ping_socket = new Socket(server.machine_name , 7);
sends_outgoing = new PrintWriter(ping_socket.getOutputStream(),true);
reads_incoming = new InputStreamReader(ping_socket.getInputStream());
catch (UnknownHostException e){
//report error to sole text box
catch (IOException e)
//similar
/* Need a string to send some arbitrary bytes to SERVER1
* using IP_address instead , as this field in this implementation
while(true)
sends_outgoing.println(server.IP_address);
if(ping_socket.getInputStream() != null)
System.out.print("Server is up");
}same... i am not very experienced, and try and uses this as training... but as new to java programming i could still mention about 5 things that might be wrong with this code... so a deeper explanation would be nice...
while(true) { } for example seems like a nice way to make infinite loop that can suck your memory out of your computer pretty fast :-) newb -
Whats wrong with this sql statement ??
Hello all, I am trying to run the below query out of persheet(tanel poder) performance excel chart...but i get below error...db is on 9.2
what is wrong with this sql statement ?
http://blog.tanelpoder.com/2008/12/28/performance-visualization-made-easy-perfsheet-20-beta/
select * from (
with fsq as (
select /*+ materialize */
i.dbid
, i.instance_name
, i.instance_number
-- , trunc(s.snap_time, 'DD') DAY
-- , to_number(to_char(s.snap_time, 'HH24')) HOUR
-- -- , to_char(s.snap_time, 'MI') MINUTE
-- , 0 MINUTE
, trunc(
lag(s.snap_time, 1)
over(
partition by
v.dbid
, i.instance_name
, v.instance_number
, v.event
order by
s.snap_time
, 'HH24'
) SNAP_TIME
, v.event_type EVENT_TYPE
, v.event EVENT_NAME
, nvl(
decode(
greatest(
time_waited_micro,
nvl(
lag(time_waited_micro,1,0)
over(
partition by
v.dbid
, i.instance_name
, v.instance_number
, v.event
order by v.snap_id
, time_waited_micro
time_waited_micro,
time_waited_micro - lag(time_waited_micro,1,0)
over (
partition by
v.dbid
, i.instance_name
, v.instance_number
, v.event
order by v.snap_id
time_waited_micro
, time_waited_micro
) / 1000000 SECONDS_SPENT
, total_waits WAIT_COUNT
from
(select distinct dbid, instance_name, instance_number from stats$database_instance) i
, stats$snapshot s
, ( select
snap_id, dbid, instance_number, 'WAIT' event_type, event, time_waited_micro, total_waits
from
stats$system_event
where
event not in (select event from stats$idle_event)
union all
select
snap_id, dbid, instance_number,
case
when name in ('CPU used by this session', 'parse time cpu', 'recursive cpu usage') then 'CPU'
when name like 'OS % time' then 'OS'
else 'STAT'
end,
name , value, 1
from
stats$sysstat
-- where name in ('CPU used by this session', 'parse time cpu', 'recursive cpu usage')
-- or name like('OS % time')
-- or 1 = 2 -- this will be a bind variable controlling whether all stats need to be returned
) v
where
i.dbid = s.dbid
and i.dbid = v.dbid
and s.dbid = v.dbid
and s.snap_id = v.snap_id
and s.snap_time between '%FROM_DATE%' and '%TO_DATE%'
and i.instance_name = '%INSTANCE%'
select * from (
select
instance_name
, instance_number
, snap_time
, trunc(snap_time, 'DD') DAY
, to_char(snap_time, 'HH24') HOUR
, to_char(snap_time, 'MI') MINUTE
, event_type
, event_name
, seconds_spent
, wait_count
, ratio_to_report(seconds_spent) over (
-- partition by (to_char(day, 'YYYYMMDD')||to_char(hour,'09')||to_char(minute, '09'))
partition by (snap_time)
) ratio
from fsq
where
snap_time is not null -- lag(s.snap_time, 1) function above will leave time NULL for first snapshot
-- to_char(day, 'YYYYMMDD')||to_char(hour,'09')||to_char(minute, '09')
-- > ( select min(to_char(day, 'YYYYMMDD')||to_char(hour,'09')||to_char(minute, '09')) from fsq)
where ratio > 0
order by
instance_name
, instance_number
, day
, hour
, minute
, event_type
, seconds_spent desc
, wait_count desc
Error at line 6
ORA-00604: error occurred at recursive SQL level 1
ORA-00972: identifier is too longHi Alex,
Subquery factoring a.k.a. the with-clause should be possible on 9.2:
http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_103a.htm#2075888
(used it myself as well on 9.2)
@OP
I recall having problems myself using PL/SQL Developer and trying to get the with clause to work on 9.2 some years ago.
A workaround might be to create a view based on the query.
Also, your error message is "ORA-00972: identifier is too long"...
http://download.oracle.com/docs/cd/B19306_01/server.102/b14219/e900.htm#sthref419
Can't test things currently, no 9.2 available at the moment, but perhaps tomorrow I'll have a chance. -
What wrong with this sql ?
what wrong with my sql ?? When i try to run a explain plain against it. I get it that perfectly fine...if the syntax was wrong i wont get the explain plan, then why am i getting invalid number error ??? is it the data ?? i am on 10.2.0.3
Edited by: S2K on Aug 18, 2009 10:21 AMS2K wrote:
i am sorry i am not able to get what you mean...do you mean i should have it something like this ??
CASE WHEN tv.var_data_typ_nm = 'Continuous' THEN ROUND(cr.rslt_qty, tmc.rpt_prcsn)
ELSE cr.rslt_qty END,
Well, I did not realize column with QTY in the name is stored as string. Then your issue is values stored in cr.rslt_qty - at least one is not numeric. Keep in mind balnk string will fail:
SQL> select round(' ') from dual
2 /
select round(' ') from dual
ERROR at line 1:
ORA-01722: invalid number
SQL> So if you can have blank cr.rslt_qty use LTRIM/RTRIM.
SY. -
How to write to csv file - Whats wrong with this???
Hi ALL,
I created a view that does all sorts of calculations, now I need to write the output in csv file. How do I do this thru a procedure? Sorry I've never had to create a csv file before and this is my first time.
Thanks!
Edited by: user5737516 on Nov 18, 2009 9:47 AMWhat is wrong with this?? Am I supposed to do something else before I could run this?
CREATE OR REPLACE DIRECTORY PAYROLL as 'c:\';
Directory created.
grant read, write on directory PAYROLL to my_user;
Grant succeeded.
CREATE OR REPLACE PROCEDURE baninst1.PAY_CSV(p_year NUMBER, p_qtr NUMBER) AS
CURSOR c_data IS
SELECT pay_period,
pay_group,
p_qtr,
check_date,
SUM(soc_sec_gross) as SOC_SEC_GROSS,
SUM(medicare_gross) as MEDICARE_GROSS,
SUM(TOTAL_DEDUCTIONS) as Total_Deductions,
SUM(NET_PAY) as Net_Pay
FROM baninst1.pzvdedn
WHERE pay_year = p_year
AND p_qtr = p_qtr
GROUP BY pay_period, pay_group, check_date, pay_qtr
ORDER BY pay_period, pay_group, check_date, pay_qtr;
v_file UTL_FILE.FILE_TYPE;
BEGIN
v_file := UTL_FILE.FOPEN('PAYROLL',
'pay_csv.csv',
'w',
max_linesize => 32767);
FOR cur_rec IN c_data LOOP
UTL_FILE.PUT_LINE(v_file,
cur_rec.pay_period || ',' ||
cur_rec.pay_group || ',' ||
cur_rec.check_date || ',' ||
cur_rec.soc_sec_gross || ',' ||
cur_rec.medicare_gross || ',' ||
cur_rec.total_deductions || ',' ||
cur_rec.net_pay);
END LOOP;
UTL_FILE.FCLOSE(v_file);
EXCEPTION
WHEN OTHERS THEN
UTL_FILE.FCLOSE(v_file);
END;
Procedure created.
SQL> exec baninst1.PAY_CSV(2009,1);
BEGIN baninst1.PAY_CSV(2009,1); END;
ERROR at line 1:
ORA-20003: File could not be opened or operated on as requested.
ORA-06512: at "BANINST1.PAY_CSV", line 45
ORA-06512: at line 1Edited by: user5737516 on Nov 18, 2009 9:16 AM
Edited by: user5737516 on Nov 18, 2009 9:18 AM
Edited by: user5737516 on Nov 18, 2009 9:20 AM
Edited by: user5737516 on Nov 18, 2009 9:35 AM
Maybe you are looking for
-
I just not a new iPhone and in order to sync it I need the newest iTunes, but I can't update it! I tried checking for updates and then trying to downlaod it. I get this error: "Errors occured while installing the updates. If the problem persists, cho
-
Partner profile in case of Idoc to File scenario
Hi I have ECC system and PI system. Scenario as : ECC will send the Idoc to PI ..PI system will Convert this to flat file and provide it to Legarcy system I made Partner profile in sending system (ECC) and maintained Message type 'MATMAS' as Outbound
-
Hello Dear Friends, I need G/L account Balances list including below datas. can you help me? thank you very much in advance... Reporting Period: 2011 January-March G/L Accounts "Balance Carryforward" "Debit Reporting Period" "CreditReporti
-
hi, There is a BDC program for creating an outbound delivery. it has to update the partner function field and few other fields. it works fine in sap and the shipment is complete. But in the third party system the shipment is not complete. the log sho
-
Location of custom modules in PI/PO
Hi , One of our colleague deployed ear file of custom module from NWDS in our PI server some time back .Now he left from our organization .We have requirement to edit the custom module .Can we get the ear file from some where in PI server to do the c