Newbie trying to analyze code for xml tags
My problem is that I need to find what xml tags my java files contain. Is there a way to run a search and pull out all xml tags? Thank you.
you mean you have to find xml tags in .java file. you have to write a program that will read the contents of file and then check for any string that contains < and ends with >. U can use LineNumberReader class for reading a line. besides these u have to take care of comments.
Regards,
Gurpreet
Similar Messages
-
Trying to write code for clicking on the links that are in HTML table
Hi,
I have an application, where in I created a table test for one HTML table. The table test case is passed. Now I am trying to write some VBA code for clicking on the links that are in the table.
Please help me.
I was trying to write the following code:
Dim tbl As HTMLTable
' tbl = "window(index=0).Tag[TABLE](index=11)"
Dim tblrow As HTMLTableRow
For Each tblrow In tbl
tblrow.click
Next
but getting error as runtime error 424: Object required.
Is what I am doing is correct.
I also have another question regarding assigning the no of links to a integer.
Call RSWApp.WriteToLog("Number of links", objDocument.links.Length) ( i have this code from one of the forum entries).
This writes the links to the Results log. but is there a way to assign this value to an integer.
Thanks in advance.
Sailaja.Hi,
Thanks.
Q1: I am able to copy all the links to a .csv file for databank. But not able to pass that variable through VBA code in order to click the links.
I used the following code to copy the links from the application to .csv file
Dim myFs As Scripting.FileSystemObject
Dim myFile As Scripting.TextStream
Set myFs = New Scripting.FileSystemObject
Set myFile = myFs.OpenTextFile("C:\Empirix\eTEST\DataBank\linksData.csv", ForWriting)
Q2: I was using the following code for clicking. ( This is different from above. I was trying other alternative without using databank.)
Dim myDoc As HTMLDocument
Dim myLink As HTMLAnchorElement
Set myDoc = RSWApp.om.GetTopDocument
For Each myLink In myDoc.links
If myLink.Id = "AppsNavLink" Then
myLink.click
End If
Next
The problem here is, The "clicking" is happening but not visible in the application. I have 70 links to click, after the test is passed, the cursor is pointing to the last link ( 70th link).
Please help me if I am doing wrong.
Thanks,
Sailaja. -
Urgent help needed for XML Tags using XMLForest()
Folks
I need some urgent help regarding getting use defined tag in your
XML output.
For this I am using XMLElement and XMLForest which seems to work fine
when used at the SQL prompt but when used in a procedure throws and error
SQL> Select SYS_XMLAGG(XMLElement("SDI",
XMLForest(sdi_num)))
From sdi
where sdi_num = 22261;- WORKS FINE
But when used in a procedure,doesnt seem to work
Declare
queryCtx DBMS_XMLQuery.ctxType;
v_xml VARCHAR2(32767);
v_xmlClob CLOB;
BEGIN
v_xml:='Select SYS_XMLAGG(XMLElement("SDI",
XMLFOREST(sdi_num)))
From sdi
where sdi_num = 22261';
queryCtx :=DBMS_XMLQuery.newContext(v_xml);
v_xmlClob :=DBMS_XMLQuery.getXML(queryCtx);
display_xml(v_xmlClob);
End;
CREATE OR REPLACE PROCEDURE display_xml(result IN OUT NOCOPY CLOB)
AS
xmlstr varchar2(32767);
line varchar2(2000);
BEGIN
xmlstr:=dbms_lob.SUBSTR(result,32767);
LOOP
EXIT WHEN xmlstr is null;
line :=substr(xmlstr,1,instr(xmlstr,chr(10))-1);
dbms_output.put_line('.'||line);
xmlstr := substr(xmlstr,instr(xmlstr,chr(10))+1);
END LOOP;
end;
SQL> /
.<?xml version = '1.0'?>
.<ERROR>oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an
XML tag name.</ERROR>
PL/SQL procedure successfully completed.
SQL>HELP is appreciated as to where I am going wrong?Hi,
if you want to transform something to something else, you should declare, what is your source.
I would prefer to use plain XSL-Transformations, because you have a lot more options to transform your source and you can even better determine, how your output should looks like.
Kind regards,
Hendrik -
Searching for XML tags using Oracle Text
I am using full text search to find documents based on a search text. It works fine for pdf, word documents, etc. However for XML documents, searching for a particular tag name does not find anything. Searching for text within tags works fine. Any thoughts?
Edited by: miyer on Feb 21, 2011 6:25 PMHi
Try adding the following variable to ucm config.cfg and then see if a new xml checkin returns the result for FT search :
TextIndexerFilterFormats=xml
Save the file , restart UCM and then test .
If the new checkin gets the results as expected then execute Collection Rebuild cycle to have the existing contents as well FT indexed to be searchable (for XML).
Thanks
Srinath -
Oracle code+simple XML tags
Hi ,
I wrote a shell script which contains " Oracle SQL query + simple XML tags".
the code was executing successfully.But My problem is to create a document based on the code.Don't mind any one please help me to preparingn the document..
Can I post the code here?? Is it right place to post my code.? Because I am new member to this forum..Please let me know...
I'll post the code as per ur suggestion..
Thank you..dbuser=SCOTT/TIGER
dbname=PRODDB
connect_string=$dbuser@$dbname
tableowner="DEVPS"
TABLEOWNER=$(echo $tableowner | tr '[a-z]' '[A-Z]')
#. ${MMHOME}/rfx/etc/config.env
OUT_DIR=/ifiles/inbox/data
# Set it to number of CPU on the server
MAX_THREAD=12
TASK_RUNNING=0
PROGRAM_NAME='Out_Source'
get_partname()
sqlplus -s $connect_string <<!
set pages 0
set feedback off
set heading off
SELECT PARTITION_NAME, PARTITION_POSITION
FROM DBA_TAB_PARTITIONS
WHERE TABLE_NAME='EMP'
ORDER BY PARTITION_POSITION;
exit;
create_part_flow()
cat > dats/outFlow_${PROGRAM_NAME}_$1.xml - <<EOF1
export PROGRAM_NAME="item_sale_$1"
. \${MMHOME}/config.env
. \${LIB_DIR}/lib.ksh
message "Program started ..."
\${ITEM_EXE} \${ITEM_OPTIONS} << EOF
<FLOW name="output.flow">
\${DBREAD}
<PROPERTY name="query">
<![CDATA[
SELECT <stmt>
]]>
</PROPERTY>
<OPERATOR type="convert">
<PROPERTY name="convertspec">
<![CDATA[
<CONVERTSPECS>
<CONVERT destfield="EMP_SAL" sourcefield="EMP_SAL" newtype="int16">
<CONVERTFUNCTION name="int16_from_dfloat"/>
<TYPEPROPERTY name="nullable" value="false"/>
</CONVERT>
</CONVERTSPECS>
]]>
</PROPERTY>
<OUTPUT name="tmp.v"/>
</OPERATOR>
</OPERATOR>
<OPERATOR type="export">
<INPUT name="tmp.v"/>
<PROPERTY name="outputfile" value="\${DATA_DIR}/sao0_irt_i_$1.dat"/>
<PROPERTY name="schemafile" value="\${SCHEMA_DIR}/item_on_off.schema"/>
</OPERATOR>
</FLOW>
EOF
checkerror -e $? -m "Program failed - check \${ERR_FILE}"
# Remove the status file
if [[ -f \${STATUS_FILE} ]]; then rm \${STATUS_FILE}; fi
message "Program completed successfully"
# cleanup and exit
rmse_terminate 0
EOF1
create_nopart_flow()
cat > outFlow_${PROGRAM_NAME}.xml - <<EOF
<FLOW name="output.flow">
<OPERATOR type="oraread">
<PROPERTY name="query">
<![CDATA[
<![CDATA[
SELECT <STmt>
]]>
</PROPERTY>
<OUTPUT name="tmp.v"/>
</OPERATOR>
<OPERATOR type="export">
<INPUT name="tmp.v"/>
<PROPERTY name="outputfile" value="sao0_irt_i_$1.dat"/>
</OPERATOR>
</FLOW>
EOF
create_full_flow()
cat > dats/item_sale.xml << EOF1
export PROGRAM_NAME="item_sale"
. \${MMHOME}/config.env
. \${LIB_DIR}/lib.ksh
ON_SALE_OUTPUT_FILE=\${DATA_DIR}/smo0_onseffdt_.txt
ON_SALE_OUTPUT_SCHEMA=\${SCHEMA_DIR}/item_on_sale.schema
OFF_SALE_OUTPUT_FILE=\${DATA_DIR}/sm0_ofseffdt_.txt
OFF_SALE_OUTPUT_SCHEMA=\${SCHEMA_DIR}/item_off_sale.schema
#export RFX_DEBUG=1
# input files:
ONOFF_DATE=\${DATA_DIR}/dm0_onseffdt_ofseffdt.dat
ONOFF_DATE_SCHEMA=\${SCHEMA_DIR}/item_on_off.schema
message "Program started ..."
\${RETL_EXE} \${RETL_OPTIONS} << EOF
<FLOW name="Store_Source.flw">
<OPERATOR type="import">
<PROPERTY name="inputfile" value="\${ONOFF_DATE}"/>
<PROPERTY name="schemafile" value="\${ONOFF_DATE_SCHEMA}"/>
<OPERATOR type="copy">
<OUTPUT name="on_off_sale.v"/>
</OPERATOR>
</OPERATOR>
<!--START_INS_C2.1-->
<OPERATOR type="copy">
<INPUT name="on_off_sale.v"/>
<OUTPUT name="on_sale_out.v"/>
<OUTPUT name="off_sale_out.v"/>
</OPERATOR>
<!--END_INS_C2.1-->
<OPERATOR type="fieldmod">
<INPUT name="on_sale_out.v"/>
<!--START_DIS_C2.1
<PROPERTY name="rename" value="ON_SALE_EFFECTIVE_DATE=STATUS_UPDATE_DATE"/>
END_DIS_C2.1-->
<!--START_INS_C2.1-->
<PROPERTY name="rename" value="ON_SALE_EFFECTIVE_DATE=ONSALE_DATE"/>
<!--END_INS_C2.1-->
<OPERATOR type="export">
<PROPERTY name="outputfile" value="\${ON_SALE_OUTPUT_FILE}"/>
<PROPERTY name="schemafile" value="\${ON_SALE_OUTPUT_SCHEMA}"/>
</OPERATOR>
</OPERATOR>
<OPERATOR type="fieldmod">
<INPUT name="off_sale_out.v"/>
<!--START_DIS_C2.1
<PROPERTY name="rename" value="OFF_SALE_EFFECTIVE_DATE=STATUS_UPDATE_DATE"/>
END_DIS_C2.1-->
<!--START_INS_C2.1-->
<PROPERTY name="rename" value="OFF_SALE_EFFECTIVE_DATE=OFFSALE_DATE"/>
<!--END_INS_C2.1-->
<OPERATOR type="export">
<PROPERTY name="outputfile" value="\${OFF_SALE_OUTPUT_FILE}"/>
<PROPERTY name="schemafile" value="\${OFF_SALE_OUTPUT_SCHEMA}"/>
</OPERATOR>
</OPERATOR>
</FLOW>
EOF
checkerror -e 0 -m "Program failed - check ${ERR_FILE}"
# Remove the status file
if [[ -f \${STATUS_FILE} ]]; then rm \${STATUS_FILE}; fi
message "Program completed successfully"
# cleanup and exit
rmse_terminate 0
EOF1
# Remove all individual xml files
rm outFlow_${PROGRAM_NAME}*.xml
NO_OF_PART=`get_partname $TABLEOWNER |wc -l`
if [ ${NO_OF_PART} -eq 0 ]; then
echo Table not partitioned
create_nopart_flow
time retl -c ${1} -f outFlow_${PROGRAM_NAME}.xml
else
echo Table partitioned
get_partname $TABLEOWNER |while read PARTNAME THREAD_SEQ
do
echo PartName: $PARTNAME POS: $THREAD_SEQ
create_part_flow $THREAD_SEQ ${PARTNAME}
time /app/rms/scripts/rms_retl_aip.sh outFlow_${PROGRAM_NAME}_${THREAD_SEQ}.xml&
echo Running outFlow_${PROGRAM_NAME}_${THREAD_SEQ}.xml ....
sleep 1
#TASKS_RUNNING=`ps -ef|grep retl|grep -v java|grep -v grep|wc -l`
TASKS_RUNNING=`ps -ef |grep ${PROGRAM_NAME} |grep -v java|grep -v grep |wc -l`
echo Running: ${TASKS_RUNNING} Max: ${MAX_THREAD}
while [ "${TASKS_RUNNING}" -ge "${MAX_THREAD}" ]; do
sleep 2
TASKS_RUNNING=`ps -ef |grep ${PROGRAM_NAME} |grep -v java|grep -v grep |wc -l`
done
done
wait
#Concatenate all files
cat ${OUT_DIR}/dm0_src_i_*.dat > ${OUT_DIR}/sm0_onseffdt_ofseffdt.dat
if [ $? -eq 0 ]; then
rm ${OUT_DIR}/sm0_src_i_*.dat
fi
create_full_flow
time dats/item.sh item_sale.xml
fi -
Need Code for XML content into Xlet
"How to read XML file and How to display on Xlet interface."
If you know it. please post me
thank you
lakHi Ryan,
i had already tried the function that you have given me...
WorkspaceOps.getPropertyBytes()..
but no result the binary value is still NULL...:(
Now let me tell you that my code is running very much fine for non-library services enabled repository ,i am able to get the content in that repository, but as you know you will not get any version history, which is very much important to me....
now as it is working there i think that there should not be any problem with the code ,but problem may be there when i use library services enabled repository....
i think there is some problem with the weblogic content repository...when it is enabled for library services...
manoj -
Reading & writting code for XML doc
I need help with writting a java code that will read the XML dopcument below & output it as given below. thanks.
<?xml version="1.0"?>
<!-- Employee expenses by department. -->
<firm>
<!-- Hmmm, suspicious. -->
<dept name="Accounting">
<emp name="Boswell" amt="437.46" />
<emp name="Austen" amt="124.07" />
<emp name="Johnson" amt="184.19" />
<emp name="Boswell" amt="423.99" />
<emp name="Keats" amt="321.14" />
</dept>
<!-- Why so much travel and always to Russia in summer? -->
<dept name="Finance">
<emp name="Tolstoi" amt="224.46" />
<emp name="Turgenev" amt="532.11" />
<emp name="Tolstoi" amt="149.08" />
<emp name="Gogal" amt="643.26" />
<emp name="Tolstoi" amt="265.91" />
</dept>
<!-- Marketing, smarketing -->
<dept name="Marketing">
<emp name="Mishima" amt="754.18" />
<emp name="Kawabata" amt="398.07" />
<emp name="Kawabata" amt="398.07" />
</dept>
<!-- High pay, high stress: deserve to travel -->
<dept name="Technology">
<emp name="Hesse" amt="156.44" />
<emp name="Handke" amt="174.21" />
<emp name="Hesse" amt="365.21" />
<emp name="Hesse" amt="452.33" />
</dept>
</firm>
OUTPUT:
Accounting
Austen --> $124.07
Bosworth --> $861.45
Johnson --> $184.19
Keats --> $321.14
Finance
Gogal --> $643.26
Tolstoi --> $639.45
Turgenev --> $532.11
Marketing
Kawabata --> $796.14
Mishima --> $754.18
Technology
Handke --> $174.21
Hesse --> $973.98
----------------------------------------------------/* INTERFACE */
import java.util.*;
import java.util.regex.*;
abstract public interface XMLInterface {
abstract public void parse(String file_name);
abstract public String getStartTag(String item);
abstract public String getEndTag(String item);
abstract public Map getAttributes(String item);
abstract public int getXMLType(String item);
public static final String start_tagSA =
"<[\\s]*[\\w]+[\\s]*>";
public static final String end_tagSA =
"</[\\s]*[\\w]+[\\s]*>";
public static final String pi =
"<\\?[\\W\\w\\s]*\\?>";
public static final String comment =
"<!--[\\s]*[\\W\\w]+[\\s]*-->";
public static final String elementSA =
"<[\\s]*[\\w\\W]+[\\s]*[]?>";
public static final String attribute =
"[:\\w]+[\\s]*=[\\s]*([\\'|\"])[\\w\\d\\.$\\s]+\\1";
public static final int XML_BAD_TYPE = 0;
public static final int XML_COMMENT = -1;
public static final int XML_ELEMENT = -2;
public static final int XML_PI = -3;
public static final int XML_START_TAG = -4;
public static final int XML_END_TAG = -5;
/* IMPLIMENTATION */
import java.io.*;
import java.util.*;
import java.util.regex.*;
public class ParserXML implements XMLInterface {
public void parse(String file_name) {
readFile(file_name);
compile_patterns();
Iterator it = records.iterator();
while (it.hasNext()) {
String next = (String) it.next();
int type = getXMLType(next = next.trim());
switch (type) {
case XMLInterface.XML_START_TAG:
System.out.println("Start tag: " + next);
String tag = getStartTag(next);
if (tag != null)
System.out.println("\tTag is " + tag);
break;
case XMLInterface.XML_END_TAG:
System.out.println("End tag: " + next);
break;
case XMLInterface.XML_ELEMENT:
System.out.println("Element: " + next);
Map m = getAttributes(next);
if (m != null) {
Set s = m.keySet();
Iterator iter = s.iterator();
while (iter.hasNext()) {
Object key = iter.next();
System.out.println("\tAttribute: " + key + " = " + m.get(key));
break;
case XMLInterface.XML_COMMENT:
System.out.println("Comment: " + next);
break;
case XMLInterface.XML_PI:
System.out.println("Processing instruction: " + next);
break;
default:
System.out.println("Bad XML type: " + next);
break;
public int getXMLType(String item) {
Matcher m = null;
m = start_tagSA.matcher(item);
if (m.matches()) return XMLInterface.XML_START_TAG;
m = end_tagSA.matcher(item);
if (m.matches()) return XMLInterface.XML_END_TAG;
m = elementSA.matcher(item);
if (m.matches()) return XMLInterface.XML_ELEMENT;
m = comment.matcher(item);
if (m.matches()) return XMLInterface.XML_COMMENT;
m = pi.matcher(item);
if (m.matches()) return XMLInterface.XML_PI;
return XMLInterface.XML_BAD_TYPE;
public String getStartTag(String item) {
Matcher m = start_tagSA.matcher(item);
if (m.find())
return m.group();
else
return null;
public String getEndTag(String item) {
return null;
public Map getAttributes(String item) {
Matcher m = attribute.matcher(item);
if (!m.find()) return null;
m.reset();
Map attributes = new HashMap();
int n = 0;
while (m.find(n)) {
String[ ] key_value = m.group().split("=");
attributes.put(key_value[0].trim(), key_value[1].trim());
n = m.end();
return attributes;
private void readFile(String filename) {
records = new ArrayList();
try {
BufferedReader input = new BufferedReader(new FileReader(filename));
String record = null;
while ((record = input.readLine()) != null)
records.add(record);
input.close();
catch(Exception e) {
e.printStackTrace();
System.exit(-1);
private void dump() {
Iterator it = records.iterator();
while (it.hasNext())
System.out.println(it.next());
private void compile_patterns() {
elementSA = Pattern.compile(XMLInterface.elementSA);
comment = Pattern.compile(XMLInterface.comment);
pi = Pattern.compile(XMLInterface.pi);
start_tagSA = Pattern.compile(XMLInterface.start_tagSA);
end_tagSA = Pattern.compile(XMLInterface.end_tagSA);
attribute = Pattern.compile(XMLInterface.attribute);
private List records;
private Pattern elementSA;
private Pattern comment;
private Pattern pi;
private Pattern start_tagSA;
private Pattern end_tagSA;
private Pattern attribute;
/* DRIVER */
class ParseDriver {
public static void main(String[ ] args) {
if (args.length < 1) {
System.out.println("ParseDriver <filename>");
return;
ParserXML parser = new ParserXML();
parser.parse(args[0]); -
Hi,
how can i edit html code of modules when all i can find are the module tags and id?
thank you
[email protected]Hey there,
Which and what do you mean?
Some modules have layouts such as web apps, events, news etc. Some such as the shopping cart module have no layout and you can not edit the HTML. It depends on the module. -
"Newbie Unable to load class for custom tag"
I have recently written a custom tag but I have been unable to implement it in a JSP because the server is unable to load the .class file. Below I have supplied the files that contribute to make up the custom tag, aswell as the JSP file used to implement it.
genericDBConnect.java
stored in C:\jakarta-tomcat-3.2.3\webapps\exper\WEB-INF\classes\jsp\tags\dbase
package jsp.tags.dbase;
import java.io.*;
import java.sql.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class genericDBConnect extends BodyTagSupport
private String odbcDriver;
private String dataSource;
public void setOdbcDriver(String driver)
odbcDriver = driver;
public void setDataSource(String source)
dataSource = source;
public int doStartTag() throws JspException
return EVAL_BODY_INCLUDE;
public int doEndTag() throws JspException
try{
pageContext.getOut().print("This is the value of odbcDriver = " + odbcDriver + "and dataSource = " + dataSource);
catch(Exception ioException)
System.err.println("Exception thrown in genericDBConnect.doEndTag():");
System.err.println(ioException);
throw new JspException(ioException);
return EVAL_PAGE;
WEB.XML
Stored in: C:\jakarta-tomcat-3.2.3\webapps\exper\WEB-INF
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/dtd/web-app_2_2.dtd">
<web-app>
<display-name>Generic database Connector</display-name>
<description>
Connecting to a database using dataSource and OdbcDriver
Attributes as well as sending a query to the database;
</description>
<taglib>
<taglib-uri>/genericdbconnecttags.tld</taglib-uri>
<taglib-location>/WEB-INF/genericdbconnecttags.tld</taglib-location>
</taglib>
</web-app>
genericdbconnecttags.tld
C:\jakarta-tomcat-3.2.3\webapps\exper\WEB-INF
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>genericDBConnect</short-name>
<tag>
<name>dbconnect</name>
<tag-class>jsp.tags.dbase.genericDBConnect</tag-class>
<attribute>
<name>dataSource</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>odbcDriver</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>
DBTester.jsp
Stored in:C:\jakarta-tomcat-3.2.3\webapps\exper
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Generic dataBase Connection</title>
</head>
<body>
<%@ taglib uri="/genericdbconnecttags.tld" prefix="database" %>
<database:dbconnect odbcDriver="sun.my.tag.lib" dataSource="hello">
this is the the begining of the end of life as we know it
</database:dbconnect>
</body>
</html>
And this is the error I get:
Error: 500
Location: /exper/DBtester.jsp
Internal Servlet Error:
org.apache.jasper.compiler.CompileException: C:\jakarta-tomcat-3.2.3\webapps\exper\DBtester.jsp(8,0) Unable to load class null
at org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:129)
at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspParseEventListener.java:759)
at org.apache.jasper.compiler.JspParseEventListener.addGenerator(JspParseEventListener.java:138)
at org.apache.jasper.compiler.JspParseEventListener.handleTagBegin(JspParseEventListener.java:909)
at org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListener.java:194)
at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:825)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:209)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)
Please if you can help I will be very gratefulI was searching about this problem and I found here.
I'm using WSAD 4.0.3 and I'm making my first custom tag.
Here is my files:
======================= CLASS ======================
package sas.ric.tags.teste;
import javax.servlet.jsp.tagext.TagSupport;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;
import java.io.IOException;
public class ClTagHello extends TagSupport {
public int doStartTag() {
try {
JspWriter out = pageContext.getOut();
out.println("HELLO!");
} catch (IOException ioe) {
System.out.println("Erro in ClTagHello: " + ioe);
return (SKIP_BODY);
================= TLD ==========================
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>ric</short-name>
<uri></uri>
<info>Exemple</info>
<tag>
<name>hello</name>
<tag-class>sas.ric.tags.teste.ClTagHello</tag-class>
<body-content>empty</body-content>
</tag>
</taglib>
======================== JSP =====================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META name="GENERATOR" content="IBM WebSphere Studio">
<META http-equiv="Content-Style-Type" content="text/css">
</HEAD>
<%@ taglib uri="WEB-INF/app-tlds/tag-hello.tld" prefix="ric" %>
<BODY>
<ric:hello />
</BODY>
</HTML>
==========================================================
Please, help me.
Occur this error "JSPG0058E: Unable to load class null"
Thank's -
Any help on writing code for XML export?
Hello,
The Adobe Acrobat 6.0 allows us to Export/SaveAs PDF to XML 1.0. Currently we have developed an application which reads PDF files and emits some XML. However this XML has a very basic schema and we need to add more structure to it. Like one examples is of recognizing tables from PDF document. Logical information of tables are not there in PDF files as such, and tables in PDF document are merely stored as collection of horizontal and vertical lines. Acrobat 6.0 recognizes tables and lists somehow. I need to recognize them too. So is there any reference or some algorithms which tell us how to extract this logical information from a PDF? Any
clues? Any type of guidance is appreciated.
Regards,
AtiqYou're posting to the wrong forum. This one is about XMP metadata, not about Acrobat or general XML. You should repost on an Acrobat forum.
-
Will you please provide a sample on how to generate XML file using PL/SQL ?
There are many samples in the Samples directory of the XDK
-
How can I replace a text/range of text enclosed in a XML tag
I want to replace a piece of text enclosed inside a XML tag in a text frame.
In my input parameters, I have the In-design document page number, text frame UID in that page and the XML tag name inside that text frame
which encloses my old text.
what command/function/interface can I use which can help me to replace the existing text with the input text ?
eg:
[old text] -----> [new text]
where [ ] is XML tag with name tag1.After some trail and POC, I was able to write the below piece of code.
This detects the starting and ending position of the marker and based on that we can replace the text inside it. Hope it helps.
InterfacePtr<IDocumentSignalData> data(signalMgr, UseDefaultIID());
if (data == nil)
break;
UIDRef docRef = data->GetDocument();
InterfacePtr<IDocument> doc(docRef, IID_IDOCUMENT);
IDataBase *db = docRef.GetDataBase();
//Get the spread
InterfacePtr<ISpreadList> spreadList(doc, UseDefaultIID());
int32 spreadCount = spreadList->GetSpreadCount();
for ( int32 spreadIndex = 0; spreadIndex < spreadCount; spreadIndex++ )
// Get the spread reference
UIDRef spreadUIDRef(db, spreadList->GetNthSpreadUID(spreadIndex));
// Get the spread object
InterfacePtr<ISpread> spread(spreadUIDRef, UseDefaultIID());
int32 numberOfPages = spread->GetNumPages();
for (int32 nPage = 0; nPage < numberOfPages; nPage++ )
UIDList pageItemList(db);
spread->GetItemsOnPage(nPage, &pageItemList, kFalse, kFalse);
// Iterate the page items and save off the UIDs of frames.
int32 pageItemListLength = pageItemList.Length();
for (int32 j = 0; j < pageItemListLength; j++ )
UIDRef pageItemRef = pageItemList.GetRef(j);
InterfacePtr<IFrameType> frame(pageItemRef, UseDefaultIID());
if( frame->IsTextFrame() )
//Now trying to get the marker position for XML tag
TextIndex startPos=0,endPos=0;
IXMLReferenceData *xmlReferenceData= Utils<IXMLUtils>()->QueryXMLReferenceData(pageItemRef);
XMLReference ref = xmlReferenceData->GetReference();
//IIDXMLElement *element = ref.Instantiate();
InterfacePtr<IIDXMLElement> element(ref.Instantiate());
UID tagUID = element->GetTagUID();
WideString elementName = element->GetTagString();
for(int32 i=0; i < element->GetChildCount(); i++)
XMLReference childRef = element->GetNthChild(i);
InterfacePtr<IIDXMLElement> child_element(childRef.Instantiate());
tagUID = child_element->GetTagUID();
elementName = child_element->GetTagString();
int32 index=0;
Utils<IXMLUtils>()->GetElementMarkerPositions(child_element,&startPos,&endPos);
startPos += 1; // move forward to exclude the starting tag
} // iterate pages in spread -
UML modeling for class diagrams, could not generate code for modified diagr
Hi,
I'm using Java studio Enterprise for creating class diagrams and generating code from the UML using round trip engineering. I'm able to create class diagrams and generate code from the diagram. I tried modifying java code for classes and saved it. Now if I try and modify the diagram its not updating the java code associated with it.
Please suggest the workaround or so.
Thanks
SunitaMaybe the linkage between the source and model class element is broken. Try to expand the class element from the project tree to see if a source file artifact node (under the class that displays the pathname as the name of the node). If not, that's why. Then, the workaround is to manually add the pathname to the java source file. Here are the steps:
- expand the class in question
- select the source file artifact node
- from the properties window on the right side of the ide, enter the exact pathname to the java source file and press the Enter
It should work now. -
Hi ,
I am trying to write code for open job , submit & close job.
I need to send 4 fields as parameters from program1 to the BGprogram.
Anyone please tell me the syntax for submit.I cun't find any syntax for this.
Thanks in advance,..Create new job
CONCATENATE lc_job_prefix l_pr_count
INTO l_job_name SEPARATED BY '_'
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = l_job_name
IMPORTING
jobcount = l_job_count
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4
IF sy-subrc <> 0.
....Error creating job
IF NOT sy-msgid IS INITIAL.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
MESSAGE s000(zz) WITH
'Failed to create job'(021)
l_job_name
ENDIF.
ELSE.
....Submit job {
MESSAGE s000(zz) WITH
'Creating job'(022) l_job_name l_job_count '...'
INTO l_msgtx
PERFORM show_progress USING l_msgtx 0 1.
IF v_sort = 'X'.
SUBMIT (sy-cprog)
WITH s_pernr BETWEEN l_pernr_min AND l_pernr_max
WITH s_g_ctrl IN r_cs_ctrl
WITH s_g_land IN r_cs_land
WITH s_g_gs IN r_cs_gs
VIA JOB l_job_name NUMBER l_job_count
TO SAP-SPOOL SPOOL PARAMETERS l_print_parm
ARCHIVE PARAMETERS l_archive
WITHOUT SPOOL DYNPRO
AND RETURN
ELSE.
SUBMIT (sy-cprog)
WITH s_pernr BETWEEN l_pernr_min AND l_pernr_max
WITH s_g_lub IN r_cs_lub
WITH s_g_pro IN r_cs_pro
WITH s_g_pub IN r_cs_pub
VIA JOB l_job_name NUMBER l_job_count
TO SAP-SPOOL SPOOL PARAMETERS l_print_parm
ARCHIVE PARAMETERS l_archive
WITHOUT SPOOL DYNPRO
AND RETURN
ENDIF.
....Start immediately
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = l_job_count
jobname = l_job_name
strtimmed = true
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8
IF sy-subrc <> 0.
IF NOT sy-msgid IS INITIAL.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
MESSAGE s000(zz) WITH
'Error releasing job'(023)
l_job_name
l_job_count
ENDIF.
ELSE.
MESSAGE s000(zz) WITH
'Job released'(024) l_job_name l_job_count
INTO l_msgtx
PERFORM show_progress USING l_msgtx 0 1.
ENDIF.
....} Submit job
ENDIF.
..Increment process count
ADD 1 TO l_pr_count.
ENDDO.
MESSAGE s000(zz) WITH l_pr_count 'job(s) created.'(025). -
Exception in running the sample code for XA
Hi,
I'm trying out sample code for XA with Two-phase commit operation - X4.java provided in "Oracle8i JDBC Developer's Guide and Reference"
http://technet.oracle.com/docs/products/oracle8i/doc_library/817_doc/java.817/a83724/samapp9.htm#1012235
I'm getting the following exception.
java.sql.SQLException: ORA-06550: line 1, column 13:
PLS-00201: identifier 'JAVA_XA.XA_START' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1446)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1371)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1900)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:407)
at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:156)
at orajta.XA4.main(XA4.java:126)
oracle.jdbc.xa.OracleXAException
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:498)
at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:190)
at orajta.XA4.main(XA4.java:126)
What's the reason for the above exception and can someone help me with a possible fix for the same? Your help is greatly appreciated.
Thanks,
HajaHi,
I dont have access to a 8i db, but i ran the sample between two oracle9i db and it ran successfully.
Regards
Elango.
Maybe you are looking for
-
Windows Vista 32 bit security updates
After lastest security updates from Microsoft for Vista, 32 bit, the PC checks for system errors and restores to point before updates. Tried doing one update at an time and again get system reset before updates. Sometimes get no signal to TV and PC
-
Error in trying dynamic class loading in sun rmi tutorila
Hi, I am trying the sun rmi tutorial http://java.sun.com/docs/books/tutorial/rmi/. I am not able to download the stub class from the codebase to client. The server is running in a linux box while the client in a w2k box. Linux box (server) ==========
-
Vendor search with CNPJ number
Hello all, We are in SAP SRM 5.0 Server 550 system with ECS. Recently we went live with Brazil, now there is a requirement that the users while creating SC want to select vendors based on CNPJ number (Legal tax number - In vendor master is Tax number
-
I only signed up for itunes because a game that I had been looking for was advertised and it said I needed ituens to play the game. I am not into music, tv, or movie downloads. I only wanted the game. When I tried to order the game it would not pr
-
SME 7.1 not working with Exchange 2013 SP1 CU6
Hello, i tried upgrading to SME 7.1 on our Exchange 2013 SP1 CU6, but when trying to configure the Exchange Server in the SME management console using the configuration wizard, it gave an error before the LUN mapping page, saying "Failed to get Excha