Mapping xsql on tomcat
hi
I deployed an application on apache-tomcat server. but when I access the xsql page it's
displayed without executing the sql statement.
I modified the web.xml. to map the xsql page with XSQLservlet. I also modified the httpd.conf file to handle the xsql extension by the apache server.
but the problrm is still persisting.
can some one please help me to fix this problem
ghassen
this is the xsql code :
<?xml version = '1.0' encoding = 'WINDOWS-1252'?>
<!--
| Uncomment the following processing instruction and replace
| the stylesheet name to transform output of your XSQL Page using XSLT
<?xml-stylesheet type="text/xsl" href="automateToHtml.xsl" ?>
-->
<?xml-stylesheet type="text/xsl" href="automateToHtml.xsl" ?>
<page xmlns:xsql="urn:oracle-xsql" >
<xsql:include-request-params/>
<xsql:action handler="oracle.jbo.xsql.ViewObject" name="TkeyautomateView" configname="BCAutomateModuleLocal" appmodule="BCAutomate.BCAutomateModule" max-rows="-1" max-levels="-1">
<where>
<attribute name="Idautomate" value="{@automateId}"/>
</where>
</xsql:action>
</page>
I'm using tomcat 4.0
null
Similar Messages
-
Problems configuring XSQL with Tomcat
Having a lot of trouble getting this to work with tomcat standalone, apache with tomcat, and even apache with resin. (I have successfully gotten this to work with resin as both web and appserver.)
I have tried to be meticulous in following the directions, but one thing that is throwing me is that I can't find the web.xml file in my xdk distribution (neither in xdk8i nor xdk9i); I've attempted to create the .xsql extension-to-servlet mapping myself in Tomcat's web.xml file, but maybe I got this wrong.
The main symptom is that my xsql pages are basically being returned to me in the browser. Any help would be appreciated.Bacically you need to create yourself, and here is an example:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
<servlet>
<servlet-name>
WebCounter
</servlet-name>
<servlet-class>
FAQAnswerServlet
</servlet-class>
</servlet>
<servlet>
<servlet-name>
oraclexsql
</servlet-name>
<servlet-class>
oracle.xml.xsql.XSQLServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
oraclexsql
</servlet-name>
<url-pattern>
*.xsql
</url-pattern>
</servlet-mapping>
</web-app>
null -
Can not map .xsql to the java class name
I am using IBMWebAS V2.0 with HTTP server V1.3.3, but I having problem mapping .xsql to the java servlet class oracle.xml.xsql.XSQLservlet. class path is properly defined in the bootstap.properties file but where can I need to put the codes for proper servlet passing with proper extention.
I am using IBMWebAS V2.0 with HTTP server V1.3.3, but I having problem mapping .xsql to the java servlet class oracle.xml.xsql.XSQLservlet. class path is properly defined in the bootstap.properties file but where can I need to put the codes for proper servlet passing with proper extention.
-
Servlet mapping with Apache + Tomcat
I'm trying to set up my servlet with apache + Tomcat(3.2.3), and i'm using mod_jk as the Tomcat-Apache plug-in.
The HelloWorld servlet that comes with the examples app worked fine at: http://localhost/examples/servlet/HelloWorldExample,
but how do I change the configurations, so that it can be invoked at:
http://localhost/examples/HelloWorldExample ?
It appears to me that '/servlet/' is the default prefix for Tomcat's RequestInterceptor, there is no way to get around that.
Any insights will be greatly appreciated, thanks!
Elainehi
Try this:
add below code in web.xml file in examples/WEB-INF
F directory
<servlet-mapping>
<servlet-name>
HelloWorldExample
</servlet-name>
<url-pattern>
/HelloWorldExample
</url-pattern>
</servlet-mapping>
Thanks for the reply, the web.xml is already set up this way, in fact, I'm able to invoke the servlet through tomcat(running on port 8080): http://localhost:8080/examples/HelloWorldExample,
tomcat reads the web.xml without any problems.
The problem comes from Apache(port 80), http://localhost:80/examples/HelloWorldExample wouldn't work, only http://localhost:80/examples/servlet/HelloWorldExample works.
It appears to me that when requests are relayed from Apache to tomcat, you need to tell tomcat that you intend to invoke a servlet by prefixing '/servlet/', if you look in the server.xml, it has
<RequestInterceptor
className="org.apache.tomcat.request.InvokerInterceptor"
debug="0" prefix="/servlet/" />
I've tried to change this to something else, it didn't seem to make any difference. -
Parameters in a mapped servlet in Tomcat
I am using Tomcat 4.0.2/JDK 1.3.1 running on Solaris. I have the following servlet called foo.Bar, named FooBar in the web.xml file for my webapp.
<servlet>
<servlet-name>FooBar</servlet-name>
<display-name>FooBar</display-name>
<description></description>
<servlet-class>foo.Bar</servlet-class.
</servlet>
I can access this servlet from the following url:
http://localhost/webappname/servlet/FooBar ,
also:
http://localhost/webappname/servlet/FooBar/param1/param2
works as well.
But, if I put a servlet-mapping in the web.xml file:
<servlet-mapping>
<servlet-name>FooBar</servlet-name>
<url-pattern>/foo</url-pattern>
</servlet-mapping>
The following URL does not work:
http://localhost/webappname/foo/param1/param2.
Is this a problem in Tomcat? Or is there another section of the web.xml file to tell the url parser to stop at the end of the servlet mapping?
Thanks.
CThis is not a bug. The servlet spec says
"In the web application deployment descriptor, the following syntax is used to define
mappings:
� A string beginning with a �/� character and ending with a �/*� postfix is used
for path mapping.
� A string beginning with a �*.� prefix is used as an extension mapping.
� A string containing only the �/� character indicates the "default" servlet of the
application. In this case the servlet path is the request URI minus the context
path and the path info is null.
� All other strings are used for exact matches only."
Sounds like you need a pattern of /foo/* -
Deploying map viewer on tomcat
hello,
because there was no useable result of all the past threads handling this topic, i would like to ask again.
Is there any experience in deploying the Oracle Map Viewer on a Tomcat server?
Sure, it is possible to deploy the ear/war file at Tomcat and to call the main page of Map Viewer (but not completely, at all), but after that, it seems like some parts of the OC4J are missing, like the xml-parser.
I tried something with the jars of oc4j, the classpath of tomcat and so on, but nothing really helped.
And i know about the pro and con of deploying Map Viewer anywhere else than the oc4j or application server. So there is no need to mention this again.
thanks for help
SebastianHi,
I've been running mapvier on tomcat 5.5.15 for a while now, without any problems.
I do that in my dev environment because it's faster to restart. I guess you still need an oracle appserver license even if you run it in tomcat.
Below are the contents of my lib directories:
TOMCAT_HOME/common/lib:
activation.jar
commons-el.jar
jasper-compiler-jdt.jar
jasper-compiler.jar
jasper-runtime.jar
jsp-api.jar
mail.jar
naming-factory-dbcp.jar
naming-factory.jar
naming-resources.jar
ojdbc14.jar
ojdbc14dms.jar
servlet-api.jar
xmlparserv2.jar
and
mapviewerWEB-INF/lib
adf-faces-api.jar
adf-faces-impl.jar
adfshare.jar
chartbuilder.jar
classgen.jar
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
jsf-api.jar
jsf-impl.jar
jstl.jar
lbs.jar
mapcache.jar
mapviewer.jar
mvclient.jar
mvconsole.jar
mvmbeans.jar
sdoapi.jar
sdogr.jar
sdonm.jar
sdoutl.jar
sdovis.jar
standard.jar
wmsfilter.jar
Also, you have to create the login you will use for the mapviewer admin:
your conf/tomcat-users.xml file should at least contain this:
<role rolename="tomcat"/>
<role rolename="manager"/>
<role rolename="admin"/>
<role rolename="map_admin_role"/>
<user username="yourname" password="secret" roles="map_admin_role,tomcat,admin,manager"/>
Then you use yourname to login to the mapadmin.
This works for me.
Cheers,
Calin -
Virtual directory mapping in tomcat
How can I virtually map directories in tomcat ?
Example I want to access .../images directory from jsp page by /images.
it is possible in weblogic but how can i implement it into tomcat .
If any body can help me regarding this , It would help me .
Thanks in advance.One way could be to do it with the urlrewrite filter: http://tuckey.org/urlrewrite/
-
Tomcat with map application problem
Hi,
Am deploying flex map application in tomcat it is showing install map API ,but local system it is exicuting fine am unable to find out the actual problem.
Any one know tell me how i will resolve this problem.
thanks.You'll need to provide more information.
What is not working? Any errors/exceptions shown?
How are you deploying to Tomcat? How are you connecting to Tomcat? -
Mapping of Web App context root and the physical directory of the web app
I'm running Weblogic 7.0 on Windows2000.The physical directory of my web application
is D:\WL8\weblogic81\TestDeploy\build\TestWebApp and under these directory I have
my JSPS, static HTML and WEB-INF. I define the context path of this web app in
the weblogic.xml ;-
<weblogic-web-app>
<context-root>/testapp</context-root>
</weblogic-web-app>
As a result of deploying this web app in the server (or it may be created manually
also), the following entry gets inserted in the server's config.xml ,-
<Application Deployed="true" Name="TestWebApp"
Path="D:\WL8\weblogic81\TestDeploy\build" TwoPhase="true">
<WebAppComponent Name="TestWebApp" Targets="myserver" URI="TestWebApp"/>
</Application>
Now, whenever I make a request of the form "http://localhost:7001/testapp/..",
it's properly executing my web app. My question is, how does the container knows
that for any request for the web app with context path as 'testapp', it has to
server files from D:\WL8\weblogic81\TestDeploy\build\TestWebApp. In the above
process, nowhere such mapping is specified. I expected something like Tomcat's
server.xml, where in docbase we clearly specify this mapping between the context
path and the physical directory. Please help.Let me give some more details and hopefully this will make things clearer.
Say you deploy /foo/bar/myweb.war and in myweb.war you configure a
context-root of /rob
During deployment, the server creates an ApplicationMBean with a path of
/foo/bar/. It then creates a WebAppComponent with a uri of myweb.war.
Next, deployment calls back on the web container and tells it to deploy
the WebAppComponent. The web container reads the myweb.war, parses
descriptors etc. The web container then updates its data structures to
register that myweb.war has a context path of /rob. (It has to figure
out all the other servlet mappings as well.)
When a request for /rob/foo comes in, the web container consults its
data structures to determine which webapp and servlet receives the
request. This is not a linear search of all webapps and servlets.
There's much better ways to do pattern matching.
Hope this clears things up. Let me know if you still have questions.
-- Rob
Arindam Chandra wrote:
Thanks for the answer. Still one thing is not clear. Whatever context path I declare
for my web app as the value of <context-root> element in the weblogic.xml (in
my example it's "/testapp"), it is no where mapped with the "URI" attribute (or
any other attribute, sub-element whatsoever in the <Application> element).
Application Deployed="true" Name="TestWebApp"
Path="D:\WL8\weblogic81\TestDeploy\build" TwoPhase="true">
<WebAppComponent Name="TestWebApp" Targets="myserver" URI="TestWebApp"/>
</Application>
So when a request of the form http://myweblogic.com:7001/testapp/... arrives at
the server, how does the server knows that it has to serve this request with files
from D:\WL8\weblogic81\TestDeploy\build\TestWebApp ? It should not be like the
web container iterates thru all the web application entries in config.xml and
tries to match with one context-root declaration. I repeat, I expected some mapping
similar to Tomcat's server.xml, where in the <docbase> element u clearly specify
the mapping between the context path and the physical directory
Rob Woollen <[email protected]> wrote:
Arindam Chandra wrote:
I'm running Weblogic 7.0 on Windows2000.The physical directory of myweb application
is D:\WL8\weblogic81\TestDeploy\build\TestWebApp and under these directoryI have
my JSPS, static HTML and WEB-INF. I define the context path of thisweb app in
the weblogic.xml ;-
<weblogic-web-app>
<context-root>/testapp</context-root>
</weblogic-web-app>
As a result of deploying this web app in the server (or it may be createdmanually
also), the following entry gets inserted in the server's config.xml,-
<>So the server will look for your web application at the Application Path
(D:\WL8\weblogic81\TestDeploy\build|) + the web uri (TestWebApp). So
it
maps the context-root you've specified /testapp to that path.
It's a little clearer in the case where you had a full-fledged EAR.
Then you'r application path would map to the "root" of the EAR, and the
uris would point to the various modules (eg webapps.)
-- Rob
Now, whenever I make a request of the form "http://localhost:7001/testapp/..",
it's properly executing my web app. My question is, how does the containerknows
that for any request for the web app with context path as 'testapp',it has to
server files from D:\WL8\weblogic81\TestDeploy\build\TestWebApp. Inthe above
process, nowhere such mapping is specified. I expected something likeTomcat's
server.xml, where in docbase we clearly specify this mapping betweenthe context
path and the physical directory. Please help. -
Hi!! I'm looking for an answer to my problem, and I'm going to explain what I mean.
I've created a .jar named yuhuuTunnel.jar that has the following structure:
yuhuuTunnel.jar:
--> web (contains the servlets)
--> *.class
--> HelloWorldServlet.class
--> META-INF
--> MANIFEST.MF
--> SimpleClient.classThe code of HelloWorldServlet.java is this:
package web;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.ServletException;
import javax.servlet.ServletConfig;
public class HelloWorldServlet extends HttpServlet {
public void init(ServletConfig config) throws ServletException {
super.init(config);
public void doGet( HttpServletRequest request, HttpServletResponse response )
throws ServletException, IOException {
doPost(request, response);
public void doPost( HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<body>");
out.println("<body bgcolor=\"white\">");
out.println("<h1>Yuhuu Servlet!</h1>");
out.println("</body>");
out.println("</html>");
}then, using a .war file (created with ANT), I've created into /../tomcat/webapps/ a directory call yuhuuTunnel that has this structure:
/webapps/
--> yuhuuTunnel
--> WEB-INF
--> web.xml
--> lib
--> yuhuuTunnel.jar
--> META-INF
--> MANIFEST.MF
--> yuhuuTunnel.jar
--> index.htmlThe content of web.xml is the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<!-- Action Servlet Configuration -->
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>web.HelloWorldServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>HelloWorld</url-pattern>
</servlet-mapping>
</web-app>Tomcat works correctly ( http://localhost:8080 return me the page of tomcat ) but when I try to use the HelloWoldServlet typing http://localhost:8080/yuhuuTunnel/HelloWorld into a browser, this one returns me the HTTP Status 404 - The requested resource () is not available.
What is wrong? The address that I type into the browser or there's an error into web.xml?
Something interesting: If I type
http://localhost:8080/yuhuuTunnel/HelloWorld
the message given back is: "The requested resource () is not available."
but if I type
http://localhost:8080/HelloWorld the message is different:
"The requested resource (/HelloWorld) is not available."<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<!-- Action Servlet Configuration -->
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>web.HelloWorldServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>HelloWorld</url-pattern>
</servlet-mapping>
</web-app>Please change the servlet url pattern from
<url-pattern>HelloWorld</url-pattern>to
<url-pattern>/HelloWorld</url-pattern>in servlet mappings
REGARDS,
RaHuL -
I am having problems running my .xsql file on the web using JRUN. I have set the classpath and was able to run the xsql file from the command line and also was able to get the xml output. But here is the error that i get when i try to execute the same file on the web using the below URL.
http://someserver.com/servlet/xsql/demo/helloworld/helloworld.xsql
500 Internal Server Error
xsql:
Could not load servlet
Could any one give some pointers about how to set up environment in JRUN on Solaris5.7 to run the xsql.Hi Steven,
I read the installation / configuration documentation at http://technet.oracle.com/tech/xml/xsql_servlet/htdocs/relnotes.html#ID175 . It is very helpful. I ahev a question about how to map .xsql in JRUN as i dont have admin permissions on JRUN. Is there way i can setup in my environment or in the code itself. Please let me know.
Thanks,
Shivaji. -
How to execute servlets in tomcat?
Hi,
I have compiled servlet file and tried to execute that file from root i.e. (http://localhost/'filename'....)as class file is in web-inf/classes.But it is executing from "http://localhost/servlet/" where is that servlet directory?
why all servlets executes from "servlet/" directory?
Please reply....
Thanx in advance.I has the same problem, and my solution was to include a line in the tomcat-auto file foreach servlet i had.
Under
JkMount /MyApp/servlet/* ajp13
I set a line
JkMount /MyApp/MyServlet ajp13
and in the web.xml of my webapp i included a servlet mapping for the servlet:
<servlet>
<servlet-name>MyServlet</servlet-name>
<servlet-class>MyPackage.MyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MyServlet</servlet-name>
<url-pattern>/MyServlet</url-pattern>
</servlet-mapping>
Then restarting tomcat and apache it worked.
One question i have is that tomcat-auto file it is supposed to be auto-generated by tomcat, but in my case it is not, each time i add an app in the webapps dir i have to add all the stuff in tomcat-auto file. Does anyone know how to autogenerate this file? -
Hi.
I need some assistance troubleshooting
a simple .xsql.
I'm running Oracle 8.1.7 and JRUN 3.X as
my servlet engine.
I've mapped .xsql files to the XSQL servlet
as specified in the installation guide.
The servlet engine is running and I'm able
to establish a connection w/ the database via
that servlet.
My xsql file is as follows:
<xsql:query connection="gdsadmin" xmlns:xsql="urn:oracle-xsql">
select gds_entity_id,
entity_symbol,
native_id
from entity_xref_tab
</xsql:query>
In my browser, I see the following:
<?xml version="1.0" ?>
<xsql:query connection="gdsadmin" xmlns:xsql="urn:oracle-xsql">select gds_entity_id, entity_symbol, native_id from entity_xref_tab</xsql:query>
Any ideas on what could be going wrong?
XML generation via OracleXML getXML with
the same connect string as in XSQLConfig.xml
is successful.
Thanks for your help,
Tara
nullThis symptom is the result of not having the servlet engine properly associate the *.xsql with the oracle.xml.xsql.XSQLServlet servlet. It's simply returning the raw template as a text file, rather than returning the result of having the servlet process the template server-side.
-
Question about servlet in a package
hello
i use tomcat4.0,and write a simple servlet "Hello.java",put it in "C:\jakarta-tomcat-4.0\webapps\ee\WEB-INF\classes",i input "http://127.0.0.1:8080/ee/servlet/Hello",the code works well,but after i add a package declaration "package hi;" in front of my servlet,and put it in "C:\jakarta-tomcat-4.0\webapps\ee\WEB-INF\classes\hi\",wheather i input "http://127.0.0.1:8080/ee/hi/servlet/Hello" or "http://127.0.0.1:8080/ee/servlet/hi/Hello",both of them don't work,why?and how can i call a servlet that is in a package from the browser? thanks!
my code:
package hi;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Hello extends HttpServlet{
public void service(HttpServletRequest req,
HttpServletResponse resp)
throws IOException,
ServletException{
resp.setContentType("text/html");
PrintWriter out=new PrintWriter(resp.getOutputStream());
out.print("<html>");
out.print("<body>");
out.print("hello world!");
out.print("</body>");
out.print("</html>");
out.close();Hi,
Open your ee/web-inf/web.xml file and add these lines.
<servlet>
<servlet-name>
Hello
</servlet-name>
<servlet-class>
hi.Hello
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
Hello
</servlet-name>
<url-pattern>
/Hello
</url-pattern>
</servlet-mapping>
Start the tomcat and give the URL,
http://127.0.0.1:8080/ee/servlet/Hello
Hope this helps.
If you don't have a web.xml file there, you can add these lines in your Tomcat\conf\web.xml file.
Sudha -
Question about cookies in OWA package and JSP
Hi all!!
Can I get in a JSP page a cookie set in a PL/SQL procedure?
I set a cookie in a PL/SQL procedure (Using the OWA package).
Later (a few pages forward), I try to get it using
HttpServletRequest.getCookies in a JSP page.
When I see the list of cookies, my cookie is not there!
How can I achieve this?? is this possible??
Thanks!Hi,
Open your ee/web-inf/web.xml file and add these lines.
<servlet>
<servlet-name>
Hello
</servlet-name>
<servlet-class>
hi.Hello
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
Hello
</servlet-name>
<url-pattern>
/Hello
</url-pattern>
</servlet-mapping>
Start the tomcat and give the URL,
http://127.0.0.1:8080/ee/servlet/Hello
Hope this helps.
If you don't have a web.xml file there, you can add these lines in your Tomcat\conf\web.xml file.
Sudha
Maybe you are looking for
-
How do I create photo page with blow up images on click?
I need some help trying to create a web page of photo thumbnails with blow-up larger images: 1) I want to create a contact sheet type of web page of multiple photo thumbnails. 2) When you click the photo it opens into a small window or "blow-up" vers
-
Found a fix for windows not recognizing vision M, possible for oth
I went through the same frustration as so many people about windows not recognizing my vision M. Here's how I solved it. Go to device manager (right click on My Computer, choose manage then device manager) go to the unrecognized usb device, right cli
-
Cant hear what im recording in realtime on my headphones
hello thank you for taking a look at my post, i use soundbooth for little recording music projects, i know its not for that but i use it because its simple and gets the job done. however i got a BOSS dr. rhythm drum machine DR-770 and i have it plugg
-
Viewing multiple clips in 1 window/ viewing a playlist
Is it possible to view a playlist / several clips in one window (like windows media player playlist) with a mac? Either with quicktime or another viewer? as when you want to view several clips and move back and forth - you can't - you have to open on
-
I can't manually fade background music.
This is a new problem for me. I have always been able to add background music to a clip and fade the music in and out manually. However, with my latest project this is not working. I manually select a fade out point and the music just cuts out wit