Marco Rossi

Ranch Hand
+ Follow
since Jul 01, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Marco Rossi

Hi all,

I have 3 web applications.
They were built upon Tomcat 5.5, now we are trying to make the "porting" to Tomcat 6.

We know class loader and lib folder have changed.

Two of three applications work fine, but one doesn't.

What I get is:



I checked web.xml and FacesServlet is initialized like following:



What am I missing?

Thanks
11 years ago
Hi all,

I am a newbie with Tomcat.
I have installed it on a openSuSe 11.2 (I downloaded it from Apache website) but it seems not working.
To go to the welcome page I have to type

http://localhost:8080/root/index.jps

If I simply type http://localhost:8080 or http://localhost:8080/root nothing is loaded.

Any hints?


Thanks
Marco
11 years ago
Hi all,

I need to verify if any element of an XML file contains an attribute called "id"; for example:



And this is what I wrote but it seems not working



When I print $currentNode I would like to get printed the name of the node.

Thanks
Marco
Hi all,

I have this code coming from Eclipse XPath View; I would like to add some (SWT) text field but if I simply add them they are display vertically, but as said, I want them horizontally:



How can I put them horizontally?
12 years ago
Hi all,

in my Eclipse plug-in I have a menu item which opens an SWT FileDialog...the user selects an XML file and its processing starts.
Processing can takes up to 20 seconds to complete if the selected XML is big.

At the moment I am running the task with a class extending ActionDelegate and implementing IEditorActionDelegate.
In this case, the task is done inside the UI Thread and therefore the UI is "freezed" till the task is completed.

What I would like to do is show a IProgressMonitor, like

http://www.vogella.de/articles/EclipseJobs/article.html

but to be honest I do not know how I can integrate it with my FileDialog...

As far as I know I have to change from <action> to <command> inside my plugin.xml....

I tried to implement the tutorial from that link and of course it works well.

Thanks
Marco
12 years ago
Hi all,

I do not know if this is the right sub-forum, by the way.
I explain my situation: through XPath Expression (define in an external XML file which I read using JAXB) I read data from a second XML file (a datasource, for example).

Then, inside my Java code, according to which Node name (org.w3c.node), or Nodelist, or attribute name, or something else have been selected from the datasource I make some operations on them an display them on the screen.

As you can understand, inside the Java code there are direct references to the names of the Node, attributes and so on from the datasource.
What I would like to do is to remove these "hard coded" part from the Java code and allow make the processing using another external file (XML, XSLT, or what else).

This means that anyone using my software can define its own data processing defined externally from the Java source code on its data source XML file without changing the Java source code.

Hope I explained good...otherwise, tell me! ;)

Thanks
Marco
12 years ago
Ehm...you are right.
I have been using XPath for 4 months but sometimes I still make stupid error.

Thanks a lot
Marco
Hi all,

I know it is possible with XPath to query directly a Node (org.w3c.node) instead of a document and so I think I am failing somewhere.

I have a org.w3c.node that, of course, contains a node of an XML document.
Then, I want to make an XPath query on it to get all its attributes:



But I get all the attributes (the length) of ALL attributes inside the document.
The document, in particular, its an XML file opened inside the editor (I am working on the content assist of this editor)

Thanks
Marco
Hi all,

I have a String, for example:

String website = "https://coderanch.com"

I would like that, inside a SWT MessageBox (but in any other place of my application) by clicking on the String the browser opens and loads the website...is it possible?
12 years ago
I tried to execute an XPath 2.0 Expression and it works.
What I have done is simply (I found this code on another website):



Your way and mine are similar, by the way.

I tried with your implementation and my application works fine too, thanks.

Marco

I am trying with Saxon but I do not find any good examples...

is it enough to do that?



where XPathFactoryImpl() is net.sf.saxon.xpath.XPathFactoryImpl;

but what about XPathExpression?

Hi all,

in my application I need to make some queries to an external XML file and I am using XPath.

Java6 (and 7 too) offers support to XPath1.0 but I need to build some complex XPath expressions that only work in XPath 2.

At the moment, this is what I am doing:



What should I use and do if I want to switch to XPath?

Thanks
Marco
Hi all,

I am developing an Eclipse plug-in extending an existing one which comes from Eclipse.

Inside I code I have added I need log4j and other classes that are inside other JAR built by me (but this is not a plug-in).

Using the Manifest Editor inside Eclipse I have added these two JARs in "Classpath" inside the "Runtime" tab and if I test my plug-in from inside Eclipse using "Run as Eclipse Application" everything is ok.

Problem comes up when I try to export my plug-in because I get some "import can not be resolved" for classes that are inside one of my JAR.

To add these two JARs to my final JAR plug-in I edited the "Runtime Information" inside tab "Build".
In the Manifest.MF tab I can see these two JARs added with:



In fact during export the second JAR is included, but I get "import can not be resolved" inside a log file (created during export).

Why? How can I solve?

Thanks
Marco
12 years ago
Hi all,

I am adding some features to plug-in org.eclipse.wst.xml.ui which is part of Eclipse XML Editor.
What I did is to edit some existing .java files and add some new files for a new view.

I works fine when I do "Run as Eclipse Application" but then I have problems when I try to deploy it.

In eclipse/plugins there is of course a .jar file with the same name; this jar is signed.
I put my plugins in eclipse/dropin folder but it is not loaded, it always loads the default one...why?

Where can the problem be?
I thought that it was enough to change the plugin...but probably "somewhere" it always loads the default one.

I tried to create an "Hello World" plug-in, put it in the dropin folder and it works.



Ove Lindström wrote:You are not supposed to use the Class and resource to load from a Plugin. An Eclipse plugin is a bundle and lives in a Context of an OSGi-instance. Hence, you need to use the Bundle and Context.



This works fine.

Thanks a lot
Marco

12 years ago