Re: Servlet as Welcome File doesn't work

2003-12-01 Thread bsouther
That feature has been added in version 5x.
Prior to that you have to map to a static file or a JSP.


On Monday 01 December 2003 06:58 pm, you wrote:
> Hello.
>
> I'm using tomcat 4.1.29 on debian and I have the following problem:
> I need to get "/" handled by my Servlet "myPackage.Root", but I do not want
> to change the mapping of ordinary files.
> Just as a welcome file would, but welcome-file does not apply to servlets,
> right?
>
> My solutions so far is to map "/" to my servlet an map any other folder
> with distinct context's, what surely is'nt what it was meant to be.
>
> I did search the web and the usenet for a long time, since I assumed not to
> be the first to run into this problem. But I didn't find anything.
> Be aware that I did not enable the jsp-servlet, since I am not using jsps
> at all.
>
> If anyone can help me, I would appreciate it very much.
>
> Thanks,
>
> Steffen
>
>
> PS: No native English speaker here - sorry.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat & session invalidate

2003-11-30 Thread bsouther
The memory won't be released until the Garbage Collector (GC) is run. 
The JVM determines when to run GC based on the available memory.



On Friday 28 November 2003 05:38 am, you wrote:
> Hi,
> I've notice that Tomcat (v.4.1.29) does not release memory on session
> invalidate event...
> I try to create many session (with a stress tool like grinder) and i've set
> session life time to 1 minute.
> Tomcat memory occupation stretch to increase ... inexplicably, in my
> opinion.
> When destroy session event occurs memory does not recycle...
>
> Thanks for help
>
> ---
> giluka
>
> Questa e-mail e' stata verificata dal sistema di antivirus della Siva
> S.P.A.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple requests to the same servlet is problem

2003-10-29 Thread bsouther
Can you post the servlet code?
Are you using global variables in you logic?
If so, you probably have a threading issue.



On Wednesday 29 October 2003 08:07 am, you wrote:
>   Hello folks, i have one page with iframes, each iframe has a GET
> request, to a servlet that must bring description for a product code, and
> therefore each iframe has a different request like:
>
> url="/osctrl/exec/ProductDescription?code=478541.1"
>
>   But when tomcat seems to confuse those three request and all of then
> display errors or the first request is displayed for all! Why does this
> happen?
>
>   Regards,
>   Edson

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to cache the user's input in a jsp page?

2003-09-04 Thread bsouther


Is this what you're looking for?


<%
 String name = "";
 String age= "";

 if(request.getParameter("name") != null){
  name = request.getParameter("name");
  age   = request.getParameter("age");
 }
%>


 
 
  
   Name: 
   
   Age: 
   
Select One
>1
>2
>3
   
   
  





























On Thursday 04 September 2003 05:41 am, you wrote:
> What EXACTLY do you mean by 're-loaded'
> Where do you get the data that is used to populate the table with the
> number of required rows ?
>
> Cheers
> Duncan
>
> -Original Message-
> From: engp0510 [mailto:[EMAIL PROTECTED]
> Sent: 04 September 2003 09:43
> To: Tomcat Users List
> Subject: Re: How to cache the user's input in a jsp page?
>
>
> Thanks
> But it is nothing with "form" and "request".
> Maybe I should make me more clear:
>
>
> For the first time this JSP loaded, it is not sure how many rows of a
> table needed by user. Then user choos a select_box to set the rows
> number and then JSP was reloaded with table contain the number of rows
> user selected.
>
>
> ONCHANGE="location=this.options[this.selectedIndex].value;">
><%for(int i=1;i<=5;i++){%>
> value="\AddQuotation.jsp?actionfrom=<%=request_from%>&row_num=<%=i%>"<%i
> f(ro
> w_num==i){out.print("SELECTED");}%> >-<%=i%>-
><%}%>
>
>
>
> But user may set other fields before setting the number of rows, so when
> the JSP was reloaded, all filled fields ahould be cached, is it
> possible?
>
>
>
>
> - Original Message -
> From: "Kwok Peng Tuck" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Thursday, September 04, 2003 4:31 PM
> Subject: Re: How to cache the user's input in a jsp page?
>
> > In the servlet or jsp you could do :
> > String text =  request.getParameter("subject") ;
> >
> > Then do whatever you want with it.
> >
> > engp0510 wrote:
> > >Thanks
> > >I know maybe I should use session, but when I choose "select" box,
> > >the
>
> jsp
>
> > >page will be reloaded. How do I save the value of " > >maxLength=100 size=40 name=subject>" into session, that after
> > >reloaded
>
> the
>
> > >value should be the same as user input previously?
> > >
> > >- Original Message -
> > >From: "Duncan Strang" <[EMAIL PROTECTED]>
> > >To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > >Sent: Thursday, September 04, 2003 4:15 PM
> > >Subject: RE: How to cache the user's input in a jsp page?
> > >
> > >
> > >Check out JSP's implicit object collection
> > >
> > >For example, if you are using user sessions you can put any Object
> > >onto the session, this will then be available whenever the user
> > >accesses the page. To use the session object simply use
> > >
> > >session.setAttribute("identifier", Object);
> > >
> > >So to save an Integer (Objects only, not primitives) for example
> > >
> > >Integer foo = new integer(10);
> > >session.setAttribute("fooint" foo);
> > >
> > >To retrieve it next request use
> > >
> > >Integer foo2 = (Integer)session.getAttribute("fooint");
> > >
> > >There are other implicit Objects including application (the jsp view
> > >of the Servlet context) but this is globally visible so shouldn't be
> > >use to store session type variables (IMHO)
> > >
> > >Or you could write your own cache :)
> > >
> > >Cheers
> > >Duncan
> > >
> > >
> > >-Original Message-
> > >From: engp0510 [mailto:[EMAIL PROTECTED]
> > >Sent: 04 September 2003 09:00
> > >To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > >Subject: How to cache the user's input in a jsp page?
> > >
> > >
> > >Hi
> > >How to cache the user's input in a jsp page? The following is some
> > >code of my JSP:
> > >
> > ><%
> > >   int item_num = 5;
> > >   int row_num  = 1;
> > >   if(request.getParameter("row_num")!=null){
> > >  String rowstr = (request.getParameter("row_num"));
> > >  try{
> > > row_num = Integer.parseInt(rowstr);
> > >  }
> > >  catch(NumberFormatException ne){}
> > >   }
> > >%>
> > >...
> > >...
> > >
> > >  Subject  :
>
> 
>
> > >   
> > >  
> > >  
> > >
> > >
> > >
> > >..
> > >   > >ONCHANGE="location=this.options[this.selectedIndex].value;">
> > >   <%for(int i=1;i<=5;i++){%>
> > >> >value="\AddQuotation.jsp?actionfrom=<%=request_from%>&row_num=<%=i%>"
> > ><%i
> > >f(row_num==i){out.print("SELECTED");}%> >-<%=i%>-
> > >   <%}%>
> > >
> > >
> > >...
> > >   <%for(int ii=0;ii
> > >
> > >  <%=ii+1%>
> > >  
> > >    > >name=project_detail_<%=ii+1%>>
> > >  
> > >    > >name=quantity_<%=ii+1%>>
> > >  
> > >    > >name=unit_price_<%=ii+1%>>
> > >
> > >
> > >   <%}%>
> > >
> > >The choosing of select will refresh th