tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Alex Chaffee)
Subject [FAQ] jGuru FAQ Update
Date Sat, 30 Mar 2002 01:38:01 GMT
jGuru maintains FAQs and Forums on Servlets, JSP, and Tomcat (as well as
many other Java topics).  Here is an automated update on recent postings to
Tomcat-related FAQs.  Please direct flames and feedback to .

 - Alex

++ JavaServer Pages (JSP) FAQ:

Can my JSP page access initalization parameters from the servlet context?

I am calling my <font color="#0000FF">EJB</font> method &quot;<font color="#FF0000">transfer(request,destination)</font>&quot;
from inside JSP page.<br><br>

&quot;<font color="#FF0000">request</font>&quot;    is a HttpServletRequest
&quot;<font color="#FF0000">destiation</font>&quot; is a string<br><br>

it is throwing following exceptions.....<br><br>

<font color="#FF0000">java.rmi.MarshalException</font>: failed to marshal public
abstract void project.upload.Copy.transf
er(javax.servlet.http.HttpServletRequest,java.lang.String) throws java.rmi.RemoteException,j; 
nested exception is: weblogic.servlet.internal.ServletRequestImpl weblogic.servlet.internal.ServletRequestImpl<br><br><br>

actually i am trying to uplaod files and in JSP i use &lt;input type="file"&gt; tag
to select a file inside a form.the logic is this that request object also have the file stream
and using
<font color="#FF0000"> 
ServletInputStream in = request.getInputStream();</font> <br><br>

i can get the file stream and then save this stream in a new file<br><br>

<b>Why it is giving exception and any other way to upload files?</b><br><br>

If a directory does not have one of the welcome-file I want to redirect to a page, not show
the subdirectories and files.

How could I do it?

Using JSP with Tomcat 4, I've noticed that using the response.sendRedirect() method, or jsp:forward
tag to another directory on the same server is loosing all the session variables.

Does anyone know the reason for this and a work around?

I'm using jboss(2.4.1) +tomcat(3.2.3).<BR>
I need to share the same directory structure of jsp's for different applications (I have deployed
the jsp's as they are not in a war). Also I need to use the same libraries for all the applications.
So my questions are:<BR>  Does a declaration in server.xml like this:<I><B><BR>
&lt;Context path="/app1" docBase="/path/WebSites"/&gt; <BR>
&lt;Context path="/app2" docBase="/path/WebSites"/&gt; <BR></B></I>
means really different applications?<BR><BR>
2. Is there a way, if the above is true, to have different <I>web.xml</I> for
each of them, I mean to make Tomcat to look for <I>web.xml</I> elsewhere <I>WEB-INF</I>
for any of the app's?<BR><BR>
3. Another issue is how to share the same libraries, (without affecting the .bat files of
jboss/tomcat) between different applications that don't have the same docbase? Is there a
way to instruct Tomcat to search for application libraries elsewhere <I>WEB-INF/lib</I>?<BR><BR>

Is there a way to run a JSP that will give me the current classpath used by Tomcat?

++ Tomcat FAQ:

Tomcat does &quot;<i>unescape</i>&quot; the underscore (_) char when it
is part of a war file. Why? Is there any way to disable this?

How can I ensure that Tomcat compiles servlets with debugging info included (-g option of
the javac compiler)?

You can shut email notification off at the FAQ home
page(s) or:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message