Re: Of topic: When to use J2EE

2002-03-21 Thread Markus Spath



[EMAIL PROTECTED] wrote:

> REpost
> 
> I normally program using JSP and Java Beans. I wanted to know why you need to 
> program using EJB. I have read information at the Sun site but I really would 
> like someone to share their personal experience of a situation where you 
> would need to use it (Does it offer more security? Is their a good mailing 
> list that I can join?). 
> I have seen Tomcat does not do EJB so I have decided to  look at JBoss which 
> is mentioned often in this mailing list are there anymore free EJB servers 
> with good support. Any advice is most appreciated.
> 


- there is no need to use EJBs/J2EE, you might want to consider using them, if 
you are building larger scale, distributed enterprise applications, the 
application server takes care of a lot of stuff, you have to do quite some 
configuration activities though.

- JBoss is a good choice, there is a bundle with Tomcat available, it has a 
good forum and its easy to start with.

a site with a lot of information: http://www.theserverside.com

hth,
markus





--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Logging

2002-03-01 Thread Markus Spath



Jay Wright wrote:

...
> 
> I'm hesitant to use the  since I'm unfamiliar with whether or not
> that code would be portable to other web servers?
> 



have a look at log4j !

anyway, configurations in tomcat wouldn't break your code either.

markus






--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: XSL - Reload a resource without restarting

2002-02-28 Thread Markus Spath



[EMAIL PROTECTED] wrote:

> Hi, Oliver.
> 
>I can offer an idea (doubt it would qualify as brilliant though - sorry).
> If you do a getResource from the ServletContext, it will give you a
> java.net.URL.  Then, maybe you could do an openConnection on the URL to get a
> URLConnection.  Then, try the getLastModified method on that...  Don't know if
> this will work, but figured I'd throw it out there as a suggestion.


"Java and XSLT" (Eric Burke / O'Reilly) shows a generic approach (additionally 
using Templates) for this. you could download the examples and have a look a 
chapter 6.

markus



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: That old tomcat 4.0.2 - xerces.jar file problem one more time...please

2002-02-27 Thread Markus Spath

additional question:

relies tomcat itself on the libs in CATALINA_HOME/common/lib ?

if not, it could be a good idea to just remove all xml-related libraries from 
there and (redundantly) including them in WEB-INF/lib of the projects to gain 
some sort of control.
- just a thought and i didn't have a closer look at the class-loading mechanism.

are there any best practices for that one might follow?


Markus


Drew Cox wrote:


> Our webapp includes xerces.jar in the web.inf/lib directory.  This works
> fine on Tomcat 3.1 (our prod version) and 3.3a (our new prod version if I
> can't get this sorted).
> 
> On 4.0.2 I get the following error in the tomcat logs, apparently when
> trying to compile a JSP:
> 
> - Root Cause -
> java.lang.NoClassDefFoundError: org/w3c/dom/range/Range
>   at java.lang.Class.forName0(Native Method)
>   at java.lang.Class.forName(Class.java:120)
>   at
> org.apache.xerces.parsers.DOMParser.setDocumentClassName(DOMParser.java:489)
>   at org.apache.xerces.parsers.DOMParser.(DOMParser.java:221)
>   at
> org.apache.xerces.jaxp.DocumentBuilderImpl.(DocumentBuilderImpl.java:9
> 8)
>   at
> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Documen
> tBuilderFactoryImpl.java:87)
>   at
> org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:197)
>   at
> org.apache.jasper.compiler.TldLocationsCache.processWebDotXml(TldLocationsCa
> che.java:165)
>   at
> org.apache.jasper.compiler.TldLocationsCache.(TldLocationsCache.java:1
> 38)
>   at
> org.apache.jasper.EmbededServletOptions.(EmbededServletOptions.java:34
> 5)
>   at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:266)
>   at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
> 6)
>   at
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:653)
> 
>>From reading the previous posts and tomcat docs, it appears there are some
> classloader/version conflicts with the xerces.jar in the
> CATALINA_HOME/common/lib directory.  I have tried moving the catalina
> xerces.jar around into all of the other libs in tomcat to no avail.
> 
> If I remove our webapp's xerces.jar, things work fine.  This is a reasonable
> workaround, but what if I really needed different versions of the library
> available to different apps?  I'm sure there is a simple way to make this
> work, please help the terminally bewildered to get this working.



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Servlet POST results in 404 error

2002-02-26 Thread Markus Spath

did you define the doPost method in your servlet?

if not add:

...
public void doPost(HttpServletRequest request, HttpServletResponse response) {
   doGet(request, response);
}
..

hth,
markus


John Wadkin wrote:

> I'd appreciate a response on this! I've spent time searching the Net but
> haven't turned up anything useful. I don't think I've misconfigured anything
> in my server.xml or web.xml...
> It's just the POST method that doesn't work - no idea why!
> 
> Suggestions please!!
> 
> Thanks,
> 
> John
> 
> -Original Message-
> From: John Wadkin [mailto:[EMAIL PROTECTED]]
> Sent: 26 February 2002 16:11
> To: Tomcat Users List (E-mail)
> Subject: Servlet POST results in 404 error
> 
> 
> All,
> 
> TomCat 4.0.1
> Apache 1.3
> mod_WebApp
> Solaris 8
> 
> I have a servlet that returns a 404 error whenever a POST is sent. GET works
> fine. The servlet uses sessions - not sure if this has anything to do with
> it. My server.xml just defines a context and a logger. The web.xml has a
> servlet name and mapping, nothing more.
> The servlet was originally written for JServ - could this have something to
> do with it?
> 
> There's nothing in the logs.
> 
> I'm not a servlet programmer so I have no ideas!
> 
> Any suggestions??
> 
> Thanks,
> 
> John
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 
> 



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: catalina 4.0.2 and internal servlet cache ... pls help

2002-02-26 Thread Markus Spath

Hi,

I don't know whether this might help you, but i found the manager app to be 
useful:

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/manager-howto.html

markus

ranjeet walunj wrote:

> Dear friends,
> 
> i'm sending the same mail again ... pls help me ...
> 
> i'm facing this internal cache of tomcat problem ..
> i've reffered the old archives and they r saying ki putting
> reloadable=true
> in server.xml can solve this problem.
> 
> Problem: If i change some java code in my servlet and recompile the
> servlet
> it doesn't affect the operation untill i restart the Tomcat ...
> everytime restarting tomcat for small changes is very wierd stuff :-(



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: org.xml.SAXParseException: The String"--"is not permitted within comments. Tomcat 4 Startup Problem

2002-02-25 Thread Markus Spath

hi,

Chuck Amadi wrote

> 
> Thus i have checked out all my comment entries . Where do you think i 
> have made the mistake as i can't rin the startup Now!
> 
> 
> 
> 


.^
you didn't close the comment properly


>   reloadable = "true">
>pathname="webapps/bbnpwardens/WEB-INF/bbnparealm.xml" />
>


markus




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: changing the default character encoding

2002-02-24 Thread Markus Spath

Richard,

Richard Sand wrote:

> Hi all-  Does anyone know how to specify the default encoding for the JVM in
> a linux environment?
> 
> I'm having difficulty with my servlets because the JVM on my system (sun
> jdk1.3.1 on linux) is defaulting to us-ascii encoding instead of using
> iso-8859-1.  I know I can override the encoding inside my code, but
> according to the package description for java.lang, the JVM determines the
> default encoding by looking at the OS.  I tried setting both LANG and
> LC_CTYPE in my shell before launching catalina.sh, but I still couldn't get
> the servlets to not default to US-ASCII.


i guess you want to set the encoding of your servlets response.

you can do this, calling the setContentType() method of the 
(Http)ServletResponse object - before getting a Writer or Stream.

...
public void doGet(HttpServletRequest request, HttpServletResponse response) {

 response.setContentType("text/html; charset=ISO-8859-1");

 PrintWriter blabla = response.getWriter();
 
}

regards,
Markus





--
To unsubscribe:   
For additional commands: 
Troubles with the list: