Showing posts with label IDE. Show all posts
Showing posts with label IDE. Show all posts

Thursday, July 09, 2009

Eclipse : Problems with web.xml

If you use Eclipse with the Sysdeo plugin you sometimes get problems with web.xml when you add more servlet mappings. The message is:

The content of element type "web-app" must match "(icon?,display-
name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-
mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-
ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-
ref*)".


e.g. you may have


web-app
servlet A
servlet-name
servlet-class
/servlet

servlet-mapping A
servlet-name
url-pattern
/servlet-mapping

servlet B
servlet-name
servlet-class
/servlet

servlet-mapping B
servlet-name
url-pattern
/servlet-mapping

/web-app


The problem is in the order. You can't intermix servlet and servlet-mapping. All the servlets have to come first followed by all the servlet-mappings. So the above would look like:


web-app
servlet A
servlet-name
servlet-class
/servlet

servlet B
servlet-name
servlet-class
/servlet

servlet-mapping A
servlet-name
url-pattern
/servlet-mapping

servlet-mapping B
servlet-name
url-pattern
/servlet-mapping

/web-app


You can check this by : Right click inside the xml window - Validate.

Enjoy!

Monday, April 03, 2006

Misc : Multiple IDE's

I rarely have less than 3 open at any one time covering a range of languages:

Java , C, C++ , C#, Cobol ...

What's really confusing is when you write a correct statement in the wrong language

e.g. in the Cobol IDE, I wrote:

Temp = 1;

and then you wonder why the compiler complained!

If you don't have your orientation correct, it's a puzzle because it *looks* correct. The moment you realise you are in the Cobol IDE, the penny drops.

The correct statement is of course:

Move 1 to Temp.

Enjoy!

Thursday, September 22, 2005

Misc : Number of IDE's for development

So many IDE’s on my desktop just has to lead to confusion.

Eclipse 3.1 for basic Java
Weblogic Workshop for Internet stuff
Blackberry 4.0.2 for Blackberry development
Visual Studio 2003 for .NET, C++, CF, PPC and Smartphone.
eVC++ 3.0 and eVC++ 4.0 for older mobiles
Java Studio Mobility for J2ME

And yes, most of them are used most of the time! Gets really confusing when you have more than one open at the same time especially if they require different languages.

That’s 11 platforms – can anyone beat that?

Notice the only real gap is Visual Basic – I’m not a big fan.

Enjoy!