Problem with X-application URL

X-Application Version: 3.1.1
Tamino Version : 3.1.1
Platform : Win2k
WebContainer : Tamocat 4.0
JDK Version : 1.3.1


Hello,

I have created an application using x-application 3.1.1. The application was generated automatically. I am getting an error with some of the JSP pages in the application. I have found out that error is because the URL that gets the taglib from your website is no longer available.

Please find the URL below.
http://www.softwareag.com/xtools/xapplication and below is the code in one of the JSP files.
<%@ taglib uri=“http://www.softwareag.com/xtools/xapplication” prefix=“bdm” %>

Could you please tell me the replacement URL for the above. This is quite urgent as we have few applications here relying on the URL.

Hope to hear from you, soon

Thank You

Hi,
I’m not sure what the cause of your problem is, but it probably isn’t the taglib URL. The way this works is as follows. You specify in your jsp source code:

<%@ taglib uri="http://www.softwareag.com/xtools/xapplication" prefix="xapp" %></pre><BR>This associates an arbitrary uri with a tag prefix. Then in your WEB-INF/web.xml file you have:<BR><pre class="ip-ubbcode-code-pre"><taglib>
<taglib-uri>http://www.softwareag.com/xtools/xapplication</taglib-uri> 
<taglib-location>/WEB-INF/jsp/xapplication.tld</taglib-location> 
</taglib>


This associates the arbitrary URL with a physical taglib. So now when you use xapp:tag the tag code can be resolved from the tag library (tld) file.

This might be interesting but it doesn’t solve your problem :wink: Can you please post details of the symptom you get when you execute one of your jsp pages?

Thanks.

Hello,

that is a strange think because my understanding of the attribute ‘uri’ is giving a string constant to map the prefix (in your case bdm) to the tablib entry of your web.xml file

  <taglib>
    <taglib-uri>http://www.softwareag.com/xtools/xapplication</taglib-uri>
    <taglib-location>/WEB-INF/jsp/xapplication.tld</taglib-location>
  </taglib>




The URL ‘http://www.softwareag.com/xtools/xapplication’ didn’t exist.

I think the error has another reason. Could you post the error message? Using Tomcat 4.0 instead of 3.3.x could be one reason for your errors.

Bye,
Christian.

Thank you very much for your response. Please find the error message below. What I have noticed is that we are not getting the error all the time. It mainly happens when we try to modify a document and that too only sometimes.

Any help on this would be much appreciated.

Thank You

ERROR MESSAGE:
org.apache.jasper.JasperException: This absolute uri (http://www.softwareag.com/xtools/xapplication) cannot be resolved in either web.xml or the jar files deployed with this application
at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:194)
at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:174)

Hello,

I am not sure whether the error could or could not be because of Tomcat 4.0

This is because we had been using this application on Tomcat 4.0 for the last 4 months. The reason why we have not got the latest version of x-application is because this means we will have to re-install the latest Tamino and Tomcat. This is major work as we have got few applications running on it.

It is only recently that we had been getting some problems with X-application. One is the error I mentioned above which popped up today. The other is on the error page. Basically when user clicks modify, it goes to the error page which displays the following message.

org.apache.jasper.JasperException: Unable to compile calss for JSP

An error occured at line 64 in the jsp file : /Error.jsp

Generated servlet error: C:\Program Files\Apache Tomcat\work\localhost\app\Error$jsp.java:80: Ambigious class: java:
if(exception instanceof JspException) {


The code on Error.Jsp page is as follows:

Exception is: <
<%boolean found=false;%>
<% if (exception instanceof NavigationException)
pageContext.forward(“Back.jsp”);%>
<%if (exception instanceof JspException) {%>JspException<%found=true;}%>
<%if (exception instanceof XException) {%>X-Application Exception<%found=true;}%>
<%if (exception instanceof XRuntimeException) {%>X-Application Runtime Exception<%found=true;}%>
<%if (found==false) { %><%=exception%><%}%>>

Hello,

Bill has sent also a post to your problem has sent me an email with possible reasons:

Error.jsp problem: May be related to Tomcat 4, because at V4 there are two versions of JspException:

javax.servlet.jsp.JspException 
</pre><BR>and <BR><pre class="ip-ubbcode-code-pre">
org.apache.jasper.runtime.JspException.
</pre><BR>So the user gets this error when she compiles Error.jsp.<BR><BR><B>Why is the error.jsp invoked?</B><BR><BR>Maybe all happens because:<BR>1) You changed the Update.jsp page in some small way, and this made Tomcat 4 compile it for the first time. This generates a compiler error (perhaps because of a taglib problem), so ...<BR>2) Tomcat tries to compile the (never used before?) Error.jsp and gets the ambiguous class problem.<BR><BR><BR>Other suggestions as Bill for the reason of your problem I don't have. My propose is:<BR><BR>Change the page where the error occurs by removing the page directive for the error page.<BR><BR>Replace<BR><pre class="ip-ubbcode-code-pre">
<%@ page language="java" contentType="text/html" ... errorPage="Error.jsp"%>
</pre><BR>by <BR><pre class="ip-ubbcode-code-pre">
<%@ page language="java" contentType="text/html" ... %>
</pre><BR><BR>You will get the plain exception text when the error occurs. It is not longer masked by the error.jsp problem. If you have this plain exception, we can analyze the problem.<BR><BR>For the compile error of the error page: <BR><BR>You could replace the code<BR><BR><pre class="ip-ubbcode-code-pre">
<% if (exception instanceof JspException) ...
</pre><BR>by<BR><pre class="ip-ubbcode-code-pre">
<% if (exception instanceof javax.servlet.jsp.JspException) ...



Bye,
Christian.

Hello,

Thank You very much for your answers. The problem with error.jsp could be a result of me changing Modify.jsp slightly. I did change it 2 weeks ago. But what is the reson for the first problem I reported? The problem with http://www.softwareag.com/xtools/xapplication

This is what is worrying me most as the other one could be sorted out.

Any luck with any solutions?

Thank You

Can you please zip and attach files Modify.jsp and WEB-INF\web.xml. Thanks.

Hello

Please find a zip file files.zip attached.
Let me know if you need any more details.

Thank You
files.zip (2.89 KB)

Well I can’t see what’s wrong, but I found the same problem description >here<
The solution is (don’t ask me why) to change the taglib definition in the jsp source to the following:

<%@ taglib uri="/WEB-INF/jsp/xapplication.tld" prefix="bdm" %>


I tested this and the page still works for me. I would suggest you stop Tomcat, delete ONLY “modify_jsp.java” and “modify_jsp.class” from Tomcat’s Work… directory structure, then make the source change and restart Tomcat.
Hope it works.

Finally!!!

That you very much for that. I will try what you suggested. I am sure it will work this time. Still makes me wonder why this error came up months after this application was created.

Thank you very much for all your help.