sortby attribute for directcommand.

Harald,
This refers to the sorting message on the Tamino X-Application Assistance.

Following your directions, I made the additions to the DirectCommandTag.java, the xapplication.tld, and recompiled the xapplication using build at the root. How ever on copying the generated jar file to the /web-inf/lib and th tld file i get this error.
“Unable to find setter method for attribute: sortby”

I am not sure if i am doing any thing incorrect (yes i restarted the tomcat even emptied the tomcathome/work/localhost/~webapp directory, but alas and hence the sos.

regards


amit
:rolleyes:

http://tamino.forums.softwareag.com/viewtopic.php?p=12638

oops
amit

Hi amit,

do you use Tomcat 4?

Make sure that the attribute sortby and the setter method setsortby are spelled correctly.
If everythings correct, try to add a getSortby method.

If you don´t succeed, could you post your changes?

Regards, Harald

Xapplication 3.1.2
compiled on win 2000/tomcat 4.01
tested on Solaris 8 Tomcat/4.01

two files
/xapplication_312/src/com/softwareag/xtools/xapplication/jsp/taglib/DirectCommandTag.java
and xapplication.tld


please use diff command to view the differences between orignal and modified.

The process that i followed is after modifiying the files i ran build command on the root it generated $xapphome/lib/debug/xapplication.jar and $xapphome/lib/opt/xapplication.jar copied those files to a solaris 8.0 machine replacing the $tomcathome/common/lob/xapplication.jar with new file and the $tomcat/webapps/$apphome/WEB-INF/lib/xapplication.jar with the generated file and the xapplication.tld file in the same directory.

One thing i am confused is what is the purpose of to xapplication.jar files the one in debug and opt directory and which one should go in $tomcathome/common/lib and which in $tomcathome/webapp/$apphome/WEB-INF … directory.

kindly advice.

Amit
Desktop.zip (3.33 KB)

I can only answer you question about the various X-Application jar files.

If you build X-Application, i.e. run “build.cmd”,
you get lib\debug\xapplication.jar. (build also generates a lib\opt\xapplication.jar file, but we never use it because is does not include debug information – for example, line numbers stack traces would be missing.)

However, web applications do not directly use lib\debug\xapplication.jar. Instead, every web application has its own copy of this jar file.
Example: your web application resides in “c:\tomcat-home\webapps\myapp”. In this case, you have a copy of the original jar file in
“c:\tomcat-home\webapps\myapp\WEB_INF\lib”.

As a consequence, you have to copy the original lib\debug\xapplicaton.jar to all your web-application WEB_INF\lib directories if you have rebuild X-Application. (The examples coming with X-Application work the same way: after a “build”, you have to run “build examples.jsp” to copy the latest xapplication.jar into the various WEB_INF\lib directories). Otherwise, web applications would continue to use the old version of X-Application.

Rationale – why use multiple copies of the same jar file? That’s kind of a deployment step: you
build the original lib\debug\xapplication.jar, maybe run some tests on it, and then deploy it into the web-application to choose. This way, you can switch one web application to a different xapplication version without affecting other web applications.

I am not familiar with tomcathome\lib\common, sorry.


Michael

Software AG Germany, Darmstadt

Hi Amit,

I have just download your contribution and
tested it with our environment.

It works perfect !!!


Greetings

Thorsten

Thanks Thorsten Raab,
for taking time and testing the “sortby”, the code was suggested by Harald Wolf, I have merely compiled it but have not been able to use it as yet.
Regards
Amit

Thorsten Raab,
Can you post the generated jar file to the forum ?
I would appreciate it.
Regards
Amit

Hello,

I hope with the hint of Throsten for your request

Compiler Exception

you could solve your problem.

(1) Could you create and use your jar file or
(2) Should Thorsten post his file to the community?

Thanks,
Christian.

Hi Christian,

thanks for your reply, I replaced the xapplication.tld file in the WEB_INF and jsp subdir along with the v3.1.1 xapplication.jar file with that of v3.1.2. the application how ever the generated and then modified webapp remains the same.
I replaced the import statement in error.jsp which was
com.softwareag.xtools.xapplication.jsptaglib.
to
com.softwareag.xtools.xapplication.jsp.taglib.


I still get the Exceptions they are

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

An error occured between lines: 62 and 63 in the jsp file: /Error.jsp

Generated servlet error:
/usr/local/jakarta-tomcat-4.0.1/work/localhost/irith/Error$jsp.java:72: Class org.apache.jsp.NavigationException not found.
if (exception instanceof NavigationException)
^


An error occurred at line: 74 in the jsp file: /Error.jsp

Generated servlet error:
/usr/local/jakarta-tomcat-4.0.1/work/localhost/irith/Error$jsp.java:142: Class org.apache.jsp.InvalidEmbeddedContentException not found.
if (exception instanceof InvalidEmbeddedContentException) {
^


An error occurred at line: 76 in the jsp file: /Error.jsp

Generated servlet error:
/usr/local/jakarta-tomcat-4.0.1/work/localhost/irith/Error$jsp.java:149: Class org.apache.jsp.InvalidEmbeddedContentException not found.
out.print(((InvalidEmbeddedContentException)exception).getEscapedEmbeddedContent());
^
3 errors

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)

What i am able to make out is that since the app was based on 3.1.1 i have to modify imports and may be some code to make it compatiable with v3.1.2.
Any Pointers

Thanks for all your help
regards
Amit

I am using tomcat 4.01 is that the problem ?

amit