Filter problem

2005-06-23 Thread Jack Lauman
I have the following code for an access filter.  If I log in with the 
role of admin everything works as expected.  If I try to log in with 
the role of user I immediately get a permissions error that denies access.


I've added ${sessionScope.USER} to the jsp pages as well as adding 
entries for PWD and ROLE.  The correct information is in the session 
variables.


I'd appreciate any help in finding the error and fixing it.

Thanks,

Jack

public class AccessControlFilter
implements Filter
{
  public static final String NO_ACCESS_PAGE = no-access-page;
  public static final String NO_AUTH_PAGE = no-auth-page;
  private FilterConfig fc;
  private String noAccessPage;
  private String notLoggedInPage;
  public AccessControlFilter()
{
  fc = null;
}

/**
 * Destroy the Access Control Filter
 */
public void destroy()
{
  fc = null;
}

/**
 * Initialize the Access Control Filter
 */
public void init(FilterConfig config)
  throws ServletException
{
  fc = config;
  noAccessPage = fc.getInitParameter(no-access-page);
  if(noAccessPage == null)
noAccessPage = noaccess.jsp;

  notLoggedInPage = fc.getInitParameter(no-auth-page);
if(notLoggedInPage == null)
notLoggedInPage = notloggedin.jsp;
}

public void doFilter(ServletRequest req,
 ServletResponse resp,
 FilterChain chain)
  throws IOException, ServletException
{
  HttpServletRequest httpReq = (HttpServletRequest)req;
  HttpServletResponse httpResp = (HttpServletResponse)resp;

  String servletPath = httpReq.getServletPath();

  String username = (String)httpReq.getSession().getAttribute(USER);
  if(username == null)
  {
httpResp.sendRedirect(notLoggedInPage);
return;
  }
String role = (String)httpReq.getSession().getAttribute(ROLE);
if(role == null)
{
  httpResp.sendRedirect(notLoggedInPage);
  return;
}
if(role.equals(admin))
{
  chain.doFilter(req, resp);
  return;
}
if(role.equals(user))
{
  if(servletPath.startsWith(/secure/updateDb/add) ||
servletPath.startsWith(/secure/updateDb/delete) ||
servletPath.startsWith(/secure/updateDb/update) ||
servletPath.startsWith(/secure/updateDb/move) ||
servletPath.equals(/secure/updateDb/sectionAdd) ||
servletPath.equals(/secure/updateDb/sectionDelete)) 
   {

Integer id = new Integer(httpReq.getParameter(company));
if(id.equals(getAuthToken(username)))
{
  chain.doFilter(req, resp);
  return;
}
} else
  if(servletPath.equals(/secure/updateDb/changePassword))
{
  if(username.equals(httpReq.getParameter(userName)))
{
  chain.doFilter(req, resp);
  return;
}
  } else
if(servletPath.equals(/secure/index.jsp))
  {
  ServletContext servletcontext = fc.getServletContext();
  RequestDispatcher requestdispatcher = 
servletcontext.getRequestDispatcher(/secure/ControlPanel.jsp?company= 
+ getAuthToken(username));

  if(requestdispatcher == null)
  httpResp.sendError(500, Ccontrol panel doesn't exist.);
  requestdispatcher.forward(req, resp);
  return;
}
} else {
httpResp.sendRedirect(notLoggedInPage);
return;
}
httpResp.sendRedirect(noAccessPage);
}

private Integer getAuthToken(String servletPath)
{
Integer id = new Integer(-1);
try
{
Context ctx = null;
DataSource ds = null;
Connection conn = null;
Result result = null;
SQLCommandBean sql = new SQLCommandBean();
try {
  String envBase = java:comp/env/;
  ctx = new InitialContext();
  String dataSourceName = (String)ctx.lookup(envBase + 
dataSource);

  ds = (DataSource) ctx.lookup(envBase + dataSourceName);

  } catch (Exception e) {
System.out.println(DataSource context lookup failed:  + e);
  }

  try {
conn = ds.getConnection();
} catch (SQLException se) {
  System.out.println(DataSource getConnection failed:  + se);
  se.printStackTrace();
}

  try {
sql.setConnection(conn);

  } catch (Exception e) {
System.out.println(DataSource setConnection failed:  + e);
  }

  sql.setSqlValue(SELECT CompanyID FROM Company WHERE UserID = 
?);

  ArrayList arraylist = new ArrayList();
  arraylist.add(servletPath);
  sql.setValues(arraylist);
  result = 

JNDI / web.xml question

2005-02-09 Thread Jack Lauman
I'm trying to clean up a few files that have JNDI data access.  I want 
to move the datasource name to the web.xml for easier maintenance and to 
avoid having to hardcode it into the app.

If I have a datasource in the context-param area of the web.xml file, 
how can it be called?

context-param
   param-namejdbcDataSource/param-name
   param-valuejava:comp/env/jdbc/RestaurantDS/param-value
/context-param
pageContext.
getServletContext().getInitParameter(insert-context-param-name-here);
The above doesn't work here... does anyone know how this can be done?
Thanks,
Jack

private void initialize()
{
   try {
   Context ctx = null;
   DataSource ds = null;
   Connection conn = null;
   Result result = null;
   try {
   ctx = new InitialContext();
   ds = (DataSource)
ctx.lookup(java:comp/env/jdbc/RestaurantDS);
   } catch (Exception e) {
   System.out.println(DataSource context lookup failed:  + e);
   }
   try {
   conn = ds.getConnection();
   } catch (Exception e) {
   System.out.println(DataSource getConnection failed:  + e);
 e.printStackTrace();
   }

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


Re: Tag libraries and JSPs

2005-02-04 Thread Jack Lauman
David:
In JSTL v1.0.x it's:
%@ taglib prefix=c uri=http://java.sun.com/jstl/core%
In JSTL v1.1.x it's:
%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core%
It has never been what you indicated.
Jack
David Short wrote:
I just upgraded from Tomcat 5.0.28 to 5.5.4 and now my taglib declaration
doesn't seem to work anymore in my JSPs
%@ taglib prefix=c uri=http://java.sun.com/products/jstl/core; %
Is there new syntax for 5.5.4?

-
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]


Help with JDBC query

2005-01-23 Thread Jack Lauman
I'm getting the following error in an insert, the update works fine.
Is there a way to get a more informative error message about the error?
Does anyone see a syntax error that I missed?
I'm using MySQL 4.1.8 and Connector/J 3.0.16.
19:13:20,906 INFO  [STDOUT] -SQLException-
19:13:20,906 INFO  [STDOUT] SQLState: 42000
19:13:20,921 INFO  [STDOUT] Message: Syntax error or access violation 
message from server: You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right 
syntax to use near '' at line 1
19:13:20,921 INFO  [STDOUT] Vendor: 1064
19:13:20,937 INFO  [STDOUT] descriptiveCopy:

sql.setSqlValue(INSERT INTO Restaurant  +
(Name, Cuisine, ChefsName, Address_1, Address_2, +
Neighborhood, City, State, ZIP, Country, +
OfficePhone, ReservationPhone, FaxPhone, Email, Web, +
HandicappAccess, CreditCards, CostBreakfast, CostLunch, CostDinner, +
DressCode, Reservations, NonSmoking, OffStreetParking, OutsideDining, +
Banquet, BanquetCapacity, Catering, ServiceTypes, DeliveryService, +
LowCarbMenu, ChildMenu, ServesBooze, Entertainment, PhotoURL, +
ImageCredit, LogoURL, DescriptiveCopy, AtAGlance, NearBy, +
RestaurantOrder, Subscriber, SubscriptionExpired, UserID)  +
VALUES(?, ?, ?, ?, ?, +
   ?, ?, ?, ?, ?, +
   ?, ?, ?, ?, ?, +
   ?, ?, ?, ?, ?, +
   ?, ?, ?, ?, ?, +
   ?, ?, ?, ?, ?, +
   ?, ?, ?, ?, ?, +
   ?, ?, ?, ?, ?, +
   ?, ?, ?, ?);
} else {
// Update an existing restaurant
sql.setSqlValue(UPDATE Restaurant SET  +
Name = ?, Cuisine = ?, +
ChefsName = ?, Address_1 = ?, Address_2 = ?, Neighborhood = ?, City = ?, +
State = ?, ZIP = ?, Country = ?, OfficePhone = ?, ReservationPhone = ?, +
FaxPhone = ?, Email = ?, Web = ?, HandicappAccess = ?, CreditCards = ?, +
CostBreakfast = ?, CostLunch = ?, CostDinner = ?, DressCode = ?, 
Reservations = ?, +
NonSmoking = ?, OffStreetParking = ?, OutsideDining = ?, Banquet = ?, 
BanquetCapacity = ?, +
Catering = ?, ServiceTypes = ?, DeliveryService = ?, LowCarbMenu = ?, 
ChildMenu = ?, +
ServesBooze = ?, Entertainment = ?, PhotoURL = ?, ImageCredit = ?, 
LogoURL = ?,  +
DescriptiveCopy = ?, AtAGlance = ?, NearBy = ?  +
WHERE RestaurantID = ?);

}
List values = new ArrayList();
values.add(request.getParameter(name));
values.add(request.getParameter(cuisine));
values.add(request.getParameter(chef));
values.add(request.getParameter(address1));
values.add(request.getParameter(address2));
values.add(request.getParameter(neighborhood));
values.add(request.getParameter(city));
values.add(request.getParameter(state));
values.add(request.getParameter(zip));
values.add(request.getParameter(country));
values.add(request.getParameter(officePhone));
values.add(request.getParameter(reservationPhone));
values.add(request.getParameter(fax));
values.add(request.getParameter(email));
values.add(request.getParameter(web));
int access = 0;
String param = request.getParameter(access);
if(param != null  param.equals(on)){
access = 1;
}
values.add( + access);
/**
 * visa = 1, mc = 2, amex = 4, discover = 8, diners = 16
 *  other usable id's are: 32, 64 and 128
 *
 * This may have to be changed to accomodate Java 5.0 enum
 */
int cc = 0;
param = request.getParameter(visa);
if(param != null  param.equals(on)){
cc |= 1;
}
param = request.getParameter(mastercard);
if(param != null  param.equals(on)){
cc |= 2;
}
param = request.getParameter(americanExpress);
if(param != null  param.equals(on)){
cc |= 4;
}
param = request.getParameter(discover);
if(param != null  param.equals(on)){
cc |= 8;
}
param = request.getParameter(diners);
if(param != null  param.equals(on)){
cc |= 16;
}
values.add( + cc);
values.add(request.getParameter(costBreakfast));
values.add(request.getParameter(costLunch));
values.add(request.getParameter(costDinner));
values.add(request.getParameter(dressCode));
values.add(request.getParameter(reservations));
int nonSmoking = 0;
param = request.getParameter(nonSmoking);
if(param != null  param.equals(on)){
nonSmoking = 1;
}
values.add( + nonSmoking);
int offStreetParking = 0;
param = request.getParameter(offStreetParking);
if(param != null  param.equals(on)){
offStreetParking = 1;
}
values.add( + offStreetParking);
int outsideDining = 0;
param = request.getParameter(outsideDining);
if(param != null  param.equals(on)){
outsideDining = 1;
}
values.add( + outsideDining);
int banquet = 0;
param = request.getParameter(banquet);
if(param != null  param.equals(on)){
banquet = 1;
}
values.add( + banquet);
values.add(request.getParameter(banquetCapacity));
int catering = 0;
param = request.getParameter(catering);
if(param != null  param.equals(on)){
catering = 1;
}
values.add( + catering);
values.add(request.getParameter(serviceTypes));
int deliveryService = 0;
param = request.getParameter(deliveryService);
if(param != null  param.equals(on)){
deliveryService = 1;
}
values.add( + deliveryService);
int 

JSP/JDBC question

2005-01-19 Thread Jack Lauman
I'm getting the following error when my JSP form POSTs:
17:15:23,500 INFO  [STDOUT] -SQLException-
17:15:23,500 INFO  [STDOUT] SQLState: 42000
17:15:23,500 INFO  [STDOUT] Message: Syntax error or access violation 
message from server: You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right 
syntax to use near '?, Subscriber = ?, RenewalDate = ?, 
SubscriptionExpired = ?, Cuisine = ?, ChefsN' at line 1
17:15:23,500 INFO  [STDOUT] Vendor: 1064
17:15:23,500 INFO  [STDOUT] access: on

I'm running eclipse 3.0.1 and MySQL on the same machine.
Is there a way to display the exact contents of the POST that the form
submits?  I've tried using TcpMon from the Axis project but can't get
anything to show up.
Thanks,
Jack
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


JSTL/JSP/regexp Question

2004-12-01 Thread Jack Lauman
I'm using the following code to return results from drop down menues and 
user input text.
It works fine as long as the text is an exact case sensitive match to 
the data record.

What I want to do is evaluate the output the results of a user input 
search based on
'param.field' in figure 3.  i.e. If 'param.field' = 'name' use a regex 
or some other method
to return all records  that are a partial, case insensitive match to the 
input 'value' that
was submitted in the search request.  Is this possible to accomplish in 
JSTL?  If so I'd
like to know how.

Thanks,
Jack
Example1:
JavaScript Funciton:
function MM_jumpMenu(targ,selObj,restore, field){ //v3.0
eval(targ+.location='http://mydomain.com/filter.jsp?field=+field+value=+selObj. 
options[selObj.selectedIndex].value+');
if (restore) selObj.selectedIndex=0;
}
//--
/script

Example 2:
Form to submit the input and the field 'name' to be found in the bean 
created array:

form name=selectName method=get action=http:mydomain.com/filter.jsp
input type=hidden name=field value=name
input type=text name=value size=16 maxlength=40 value=
input type=image border=0 alt=Go! src=images/go.gif 
align=absmiddle width=22 height=23  
onChange=MM_jumpMenu('parent',this,0,'name')
nwc:filterOptions which=name/
/form

Example 3:
Display the results.  JSTL gets the results form a Map/Array of the 
entire record set that the bean
created.  (restaurant.id is the PK)

c:forEach items=${restaurantInfo.restaurants} var=restaurant
c:set target=${restaurant} property=filterField 
value=${param.field}/
c:if test=${restaurant.filterValue eq param.value}
tr
td width=155 align=center
div align=lefta 
href=http://mydomain.com/viewRestaurant.jsp?id=c:out 
value=${restaurant.id}/c:out value=${restaurant.name}//a/div
/td
td width=130
div align=leftc:out value=${restaurant.address1}//div
/td
td width=79
div align=leftc:out value=${restaurant.city}//div
/td
td width=107
div align=rightc:out value=${restaurant.reservationPhone}//div
/td
/tr
/c:if
/c:forEach


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


Re: JSTL/JSP/regexp Question

2004-12-01 Thread Jack Lauman
Tim:
This app is deployed with JBoss 3.2.7RC1/Tomcat 5.0.28.  The JDK is 
1.4.2_06.
The custom tag libraries were developed using JSTL 1.0.  I'm not sure how to
convert them.  Can you use a 1.0 tag in 1.1?  Below is an example of an 
SMTP mail
tag the I'm using.  Will this work in 1.1 or does it need to be rewritten?

Thanks,
Jack
package com.nwc.tags;
import java.io.IOException;
import java.io.PrintStream;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyContent;
import javax.servlet.jsp.tagext.BodyTagSupport;
import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager;
import sun.net.smtp.SmtpClient;
/**
* @jsp.tag name=sendmail
*  body-content=JSP
*  description=Sends mail to a standard SMTP server i.e. sendmail
* @version 1.15, 11/17/04
*/
public class SendMailTag
   extends BodyTagSupport {
  
   private transient String smtpEL;
   private transient String toEL;  
   private transient String fromEL;
   private transient String subjectEL;
   private transient String body;

   /**
* @jsp.attribute
* required=true
* rtexprvalue=false
* type=java.lang.String
*
* @param smtp sets codesmtp/code to the FQDN or IP address of 
the SMTP server to use.
*/
   public void setSmtp(String smtp) {
   smtpEL = smtp;
   }

   /**
* @jsp.attribute
* required=true
* rtexprvalue=false
* type=java.lang.String
*
* @param to sets codeto/code to the email recipients email address.
*/
   public void setTo(String to) {
   toEL = to;
   }
   /**
* @jsp.attribute
* required=true
* rtexprvalue=false
* type=java.lang.String
*
* @param from sets codefrom/code to the senders email address.
*/
   public void setFrom(String from) {
   fromEL = from;
   }
   /**
* @jsp.attribute
* required=true
* rtexprvalue=false
* type=java.lang.String
*
* @param subject codesubject/code to the subject of the email 
message.
*/
   public void setSubject(String subject) {
   subjectEL = subject;
   }

   /**
* @return EVAL_BODY_BUFFERED
* @throws JspException
* (non-Javadoc)
* @see javax.servlet.jsp.tagext.BodyTagSupport#doStartTag()
*/
   public int doStartTag() throws JspException {
   return EVAL_BODY_BUFFERED;
   }
   /**
* @return SKIP_BODY
* @throws JspException
* (non-Javadoc)
* @see javax.servlet.jsp.tagext.BodyTagSupport#doAfterBody()
*/
   public int doAfterBody() throws JspException {
   BodyContent bc = getBodyContent();
   // get the bodycontent as string
   if (bc != null) {
   body = bc.getString();
   } else {
   body = ;
   }
   return SKIP_BODY;
   }
   /**
* @return EVAL_PAGE
* @throws JspException
* (non-Javadoc)
* @see javax.servlet.jsp.tagext.BodyTagSupport#doEndTag()
*/
   public int doEndTag() throws JspException {
   /*
* Evaluate the EL expression, if any
*/
   String smtp = (String)
   ExpressionEvaluatorManager.evaluate(name, smtpEL,
   String.class, this, pageContext);
   String to = (String)
   ExpressionEvaluatorManager.evaluate(to, toEL,
   String.class, this, pageContext);
   String from = (String)
   ExpressionEvaluatorManager.evaluate(from, fromEL,
   String.class, this, pageContext);
   String subject = (String)
   ExpressionEvaluatorManager.evaluate(subject, subjectEL,
   String.class, this, pageContext);
   // Send the mail
   try {
   SmtpClient client = new SmtpClient(smtp);
   client.from(from);
   client.to(to);
   PrintStream message = client.startMessage();
   message.println(To:  + to);
   message.println(Subject:  + subject);
   message.println(body);
   client.closeServer();
   } catch (IOException e) {
   System.out.println(ERROR SENDING EMAIL: + e);
   }
   return EVAL_PAGE;
   }
   /**
* Releases all instance variables.
*
* @see javax.servlet.jsp.tagext.TagSupport#release()
*/
   public void release() {
   smtpEL = null;
   toEL = null;
   fromEL = null;
   super.release();
   }
}
Tim Funk wrote:
Ideally you'd be using tomcat5. (and jdk1.4) Then you can use JSTL 
functions like below ...

function
  namematch/name
  function-classmy.Foo/function-class
  function-signatureboolean match(java.lang.String,
java.lang.String)
  /function-signature
  example
c:if test='${fn:match(more, r.)}'
  /example
/function
--
package my;
public class Foo {
   public static boolean match(String s, String regex) {
   return s.matches(regex);
   }
}
-Tim
Jack Lauman wrote:
I'm using the following code to return results from drop down menues 
and user input

Re: JSTL/JSP/regexp Question

2004-12-01 Thread Jack Lauman
Tim:
I already have both 2.3/2.4 web.xml files.  If I switch to the 2.4 
format what do I need to do with
lines of code like this private transient String smtpEL; in the tag 
source?  I haven't seen any docs
on how to convert taglibs from 1.0 using EL to 1.1 where the EL is done 
by JSP 2.0.

What do I need to do here?  Any suggestions would be appreciated.
Thanks,
Jack
Tim Funk wrote:
If your webapp's web.xml is a 2.4 webapp. Then tomcat will do the EL 
translations before the value is passed to your custom tag. You won't 
have to use ExpressionEvaluatorManager because it would have been done 
for you.

-Tim
Jack Lauman wrote:
Tim:
This app is deployed with JBoss 3.2.7RC1/Tomcat 5.0.28.  The JDK is 
1.4.2_06.
The custom tag libraries were developed using JSTL 1.0.  I'm not sure 
how to
convert them.  Can you use a 1.0 tag in 1.1?  Below is an example of 
an SMTP mail
tag the I'm using.  Will this work in 1.1 or does it need to be 
rewritten?

Thanks,
Jack
package com.nwc.tags;
import java.io.IOException;
import java.io.PrintStream;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyContent;
import javax.servlet.jsp.tagext.BodyTagSupport;
import 
org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager;

import sun.net.smtp.SmtpClient;
-
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]


Filter Problem

2004-11-23 Thread Jack Lauman
I have an access control filter that is supposed to grant all access to 
users wirh the role of 'admin' and limited access to those with the role 
of  'user.  Specifically a 'user' can only manipulate the data that 
belongs to them.  It uses 'contextPath.startsWith' and the users 'id' 
(int) from the database appended to it to access their records.

If I logon as an 'admin' user it works fine.  If I login using a bad 
password it forwards to the notLoggedInPage.  It I login as a 'user' 
with a correct password it forwards to the noAccessPage.

I'm not sure what's wrong here and would appreciate any help in 
resolving this matter,

TIA,
Jack

import java.io.IOException;
import java.sql.Connection;
import java.util.ArrayList;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.jstl.sql.Result;
import javax.sql.DataSource;
import com.nwc.SQLCommandBean;
/**
*  Referenced classes of package com.nwc:
* sql : SQLCommandBean
*/
/**
* @web.filter
* name=AccessControlFilter
* display-name=JAAS Access Control Filter
* @web.filter-init-param
* name=no-access-page
* value=/restaurants/noaccess.jsp
* @web.filter-init-param
* name=no-auth-page
* value=/restaurants/notloggedin.jsp
* @web.filter-mapping
* url-pattern=/secure/*
* @version 1.17 11/21/2004
*/
public class AccessControlFilter
   implements Filter
{
  
   /**
* Comment for codeNO_ACCESS_PAGE/code
* Value: [EMAIL PROTECTED] NO_ACCESS_PAGE}
*/
   public static final String NO_ACCESS_PAGE = no-access-page;
  
   /**
* Comment for codeNO_AUTH_PAGE/code
* Value: [EMAIL PROTECTED] NO_AUTH_PAGE}
*/
   public static final String NO_AUTH_PAGE = no-auth-page;
  
   /**
* Field config
*/
   private FilterConfig fc;
  
   /**
* Field noAccessPage
*/
   private String noAccessPage;
  
   /**
* Field notLoggedInPage
*/
   private String notLoggedInPage;
  
   /**
*
*/
   public AccessControlFilter()
   {
   fc = null;
   }
  
   /**
* Initialize the Access Control Filter
*
*  (non-Javadoc)
* @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
*/
   public void init(FilterConfig config)
   throws ServletException
   {
   fc = config;
   noAccessPage = fc.getInitParameter(no-access-page);
   if(noAccessPage == null)
   noAccessPage = noaccess.jsp;
  
   notLoggedInPage = fc.getInitParameter(no-auth-page);
   if(notLoggedInPage == null)
   notLoggedInPage = notloggedin.jsp;
   }
  
   /**
* Destroy the Access Control Filter
*
*  (non-Javadoc)
* @see javax.servlet.Filter#destroy()
*/
   public void destroy()
   {
   fc = null;
   }
  
   /**
* Implements javx.servlet.Filter.doFilter
*
* @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse, javax.servlet.FilterChain)
*/
   public void doFilter(ServletRequest req,
ServletResponse resp,
FilterChain chain)
   throws IOException, ServletException
   {
   HttpServletRequest httpReq = (HttpServletRequest)req;
   HttpServletResponse httpResp = (HttpServletResponse)resp;
/   
 String contextPath = httpReq.getContextPath();
/
   String username = (String)httpReq.getSession().getAttribute(USER);
   if(username == null)
   {
   httpResp.sendRedirect(notLoggedInPage);
   return;
   }
   String role = (String)httpReq.getSession().getAttribute(ROLE);
   if(role == null)
   {
   httpResp.sendRedirect(notLoggedInPage);
   return;
   }
   if(role.equals(admin))
   {
   chain.doFilter(req, resp);
   return;
   }
   if(role.equals(user))
   {
   if(contextPath.startsWith(/secure/updateDb/add) ||
   contextPath.startsWith(/secure/updateDb/delete) ||
   contextPath.startsWith(/secure/updateDb/update) ||
   contextPath.startsWith(/secure/updateDb/move) ||
   contextPath.equals(/secure/updateDb/sectionAdd) ||
   contextPath.equals(/secure/updateDb/sectionDelete) ||
   
contextPath.startsWith(/secure/updateDb/sectionMove) ||
   contextPath.equals(/secure/updateDb/validTimes) ||
   contextPath.equals(/secure/updateDb/menuDelete) ||
   contextPath.equals(/secure/updateDb/menuAdd) ||
   contextPath.startsWith(/secure/updateDb/menuMove) ||
   

Re: Filter Problem

2004-11-23 Thread Jack Lauman
Can you append the two together to get the desired result?
Jack
Tim Funk wrote:
getContextPath is the path name of the webapp.
For example, if my webapp is registered at /more. Then my contextPath 
is /more.

If I request /more/cowbell.jsp. The contextPath  is /more and the 
servletPath is /cowbell.jsp.


-Tim
Jack Lauman wrote:
I have an access control filter that is supposed to grant all access 
to users wirh the role of 'admin' and limited access to those with 
the role of  'user.  Specifically a 'user' can only manipulate the 
data that belongs to them.  It uses 'contextPath.startsWith' and the 
users 'id' (int) from the database appended to it to access their 
records.

If I logon as an 'admin' user it works fine.  If I login using a bad 
password it forwards to the notLoggedInPage.  It I login as a 'user' 
with a correct password it forwards to the noAccessPage.

I'm not sure what's wrong here and would appreciate any help in 
resolving this matter,

-
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: Filter Problem

2004-11-23 Thread Jack Lauman
Tim:
Thanks for your help.  It's fixed.
Jack
Tim Funk wrote:
You probably want to ignore context path. Its servletPath you really 
care about.

-Tim
Jack Lauman wrote:
Can you append the two together to get the desired result?
Jack
Tim Funk wrote:
getContextPath is the path name of the webapp.
For example, if my webapp is registered at /more. Then my 
contextPath is /more.

If I request /more/cowbell.jsp. The contextPath  is /more and the 
servletPath is /cowbell.jsp.


-Tim
Jack Lauman wrote:
I have an access control filter that is supposed to grant all 
access to users wirh the role of 'admin' and limited access to 
those with the role of  'user.  Specifically a 'user' can only 
manipulate the data that belongs to them.  It uses 
'contextPath.startsWith' and the users 'id' (int) from the database 
appended to it to access their records.

If I logon as an 'admin' user it works fine.  If I login using a 
bad password it forwards to the notLoggedInPage.  It I login as a 
'user' with a correct password it forwards to the noAccessPage.

I'm not sure what's wrong here and would appreciate any help in 
resolving this matter,


-
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]


JavaScript/JSP Question

2004-11-23 Thread Jack Lauman
I'm using the following JavaScript to create lists of restaurants by 
Location and Cuisine.
Is there a way to modify the script to accept a value for the restaurant 
name that would
be similar to a %LIKE% function in MySQL when the user hits the submit 
button?

Thanks,
Jack
script language=JavaScript
!--
function MM_jumpMenu(targ,selObj,restore, field){ //v3.0
  
eval(targ+.location='http://www.mydomain.com/restaurant/filter.jsp?field=+field+value=+selObj.options[selObj.selectedIndex].value+;'); 

if (restore) selObj.selectedIndex=0;
}
//--
/script
form name=selectLocation method=get 
location=http://www.mydomain.com/restaurant/filter.jsp;
input type=hidden name=field value=city
select name=location size=1 
onChange=MM_jumpMenu('parent',this,0,'city')


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


error: duplicate local variable

2004-09-11 Thread Jack Lauman
I have the following piece of code that changes a password.  Eclipse 
gives the following
error message for line 11: duplicate local variable 'values'

Any help would be appreciated.
Thanks,
Jack
else if(pathInfo.equals(/changePassword)) {
  sql.setSqlValue(SELECT * FROM User WHERE UserID = ? AND Password = 
MD5(?));
 List values = new ArrayList();
 values.add(request.getParameter(userName));
 values.add(request.getParameter(oldPassword));
 sql.setValues(values);
 Result res = sql.executeQuery();
 if(res != null  res.getRowCount()  0)
{
 sql.setSqlValue(UPDATE User SET Password = MD5(?) WHERE 
UserID = ?);
   List values = new ArrayList();  Error 
duplicate local variable 'values'
   values.add(request.getParameter(newPassword));
   values.add(request.getParameter(userName));
   sql.setValues(values);
   sql.executeUpdate();
   result = 1;
   }
   else{
  response.sendError(500, Incorrect old password.);
  }
   }

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


DataSource Question

2004-08-29 Thread Jack Lauman
I'm using the following code in a servlet to get a JDBC connection:
Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup(java:comp/env/jdbc/DBNameDS);
Connection conn = ds.getConnection();
It works fine... but I would like to be able to substitute DBNameDS
with the actual name of the ds as defined in the web.xml file.
How can this be done?
Jack

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


Repost... no response from numerous posts

2004-06-11 Thread Jack Lauman
I've posted this same question on the apache and tomcat lists for the 
past six weeks and gotten no answers.  Not even an insult saying the 
question was stupid.  If I could find the answer in the docs I wouldn't 
be asking.

I have virtual host in apache 2.0.49 with mod_jk2 its DocumentRoot is 
domain.com it has a subdirectory called members (i.e. 
domain.com/members) that has an html doc with links to three different 
tomcat apps.  (i.e. domain.com/members/index.html with a link of 
http://www.domain.com/members/minutes/index.jsp).

On the tomcat 5.0.24 side I have a minutes webapp (minutes.war) in the 
default context (i.e. $TOMCAT_HOME/webapps/minutes.war) and deploys 
under the directory minutes.  (The members directory does not exist on 
the tomcat side).

How do you map the apache path of 
http://www.domain.com/members/minutes/index.jsp to the tomcat minutes app?

In the past using both of these would worked:
In mod_webapp/warp connector I could use:
WebAppDeploy minutes warpConnection /members/minutes/
In mod_jk I could use:
JkMount /members/minutes/*.jsp Worker
JkMount /members/minutes/*.do Worker
The question
Is this possible in mod_jk2 and if so how do you do it?
TIA
Jack
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Repost... no response from numerous posts

2004-06-11 Thread Jack Lauman
Apache and tomcat are on the same box.  I'd prefer to be able to do it 
the way I did in the past.  Has this feature been intentionally removed 
from jk2?

Jack
Keene, David wrote:
Try looking at mod_rewrite with the proxy mode on.  There were a couple
of email yesterday about it.
dave
-Original Message-
From: Jack Lauman [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 11, 2004 5:08 PM
To: Tomcat Users List
Subject: Repost... no response from numerous posts

I've posted this same question on the apache and tomcat lists for the 
past six weeks and gotten no answers.  Not even an insult saying the 
question was stupid.  If I could find the answer in the docs I wouldn't 
be asking.

I have virtual host in apache 2.0.49 with mod_jk2 its DocumentRoot is 
domain.com it has a subdirectory called members (i.e. 
domain.com/members) that has an html doc with links to three different 
tomcat apps.  (i.e. domain.com/members/index.html with a link of 
http://www.domain.com/members/minutes/index.jsp).

On the tomcat 5.0.24 side I have a minutes webapp (minutes.war) in the 
default context (i.e. $TOMCAT_HOME/webapps/minutes.war) and deploys 
under the directory minutes.  (The members directory does not exist on 
the tomcat side).

How do you map the apache path of 
http://www.domain.com/members/minutes/index.jsp to the tomcat minutes
app?

In the past using both of these would worked:
In mod_webapp/warp connector I could use:
WebAppDeploy minutes warpConnection /members/minutes/
In mod_jk I could use:
JkMount /members/minutes/*.jsp Worker
JkMount /members/minutes/*.do Worker
The question
Is this possible in mod_jk2 and if so how do you do it?
TIA
Jack
-
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]


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


Re: Error using taglibs - unable to find setter

2004-05-25 Thread Jack Lauman
I have a similar problem with a simpler situation.  I have a simple JSTL 
tag and bean that alternate the colors in a table.  If delpoyed under 
JBoss 3.0.7 with Tomcat 4.1.24 it works.  If I deploy it under JBoss 
3.2.3RC2 with Tomcat 5.0.24 I get the same Unable to find setter method 
for attribute: XXX that you're getting.  I've also tried it under a 
stand alone version of Tomcat and get the same error.

I've tried finding the error using Eclipse 2.1.3 and Idea 4.0.2 but 
neither report any warnings or errors.

Any ideas for a solution would be appreciated.
Jack
M.Hockings wrote:
Is the settter for dType  setdType(String value) or setDType(String 
value)?  I think that it will need to be the latter.

Mike
Ravi Mutyala wrote:
Hi,
I created a tag which extends from the html:text tag.
I'm using tomcat 4.1.30.
when I use this tag, I get the following error. 
-
org.apache.jasper.JasperException:
/win_002_PMT_Manage_Cstmr_Prtfl.jsp(70,26) Unable to find setter
method for attribute: dType
at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94) 

at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428) 

at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:186) 

at
org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:1753) 

at
org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:1356) 

at
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1179) 

at
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:707)

The line in the jsp uses the tag that i created. the tag has the
setter method for  dType.
The same taglib is working in the application that is presently
deployed in weblogic. We are trying to migrate the same to
tomcat  and I am getting the above error.
Any clues?
Thanks in advance
/
Ravi.
tag code:
tag code.

package com.mycompany.presentation.taglib.html;
import org.apache.struts.taglib.html.TextTag;
import java.lang.reflect.Method;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyContent;
import org.apache.struts.util.ResponseUtils;
import org.apache.struts.Globals;
import java.util.Iterator;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.util.RequestUtils;
import com.mycompany.presentation.constants.*;
import FormatConverter.*;
import javax.servlet.http.HttpSession;
import com.mycompany.utility.domainvalidations.*;
import org.apache.taglibs.display.ColumnTag;
import java.util.*;
import javax.servlet.http.HttpServletRequest;
public class wmText
   extends org.apache.struts.taglib.html.TextTag implements
Cloneable {
 protected String dType;
 protected String functionCall;
 protected String mandatory;
 protected String name = Globals.ERROR_KEY;  protected Iterator iter;
 
 protected String mode;
  DisplaySingleton ds  = DisplaySingleton.getInstance();
String dateInputFormat = ds.getDateInputFormat();
char separator = dateInputFormat.charAt(2);
 String decimalSeparator = ds.getDecimalSeparator();
 String thousandSeparator = ds.getThousandsSeparator();
 
 Class clz;

 public wmText() {
   super();
 }
 public String getDType() {
   return (this.dType);
 }
 public void setDType(String dType) {
   this.dType = dType;
 }
 public void setMandatory(String mandatory)
 {
   this.mandatory = mandatory;
 }
 public String getMandatory()
 {
   return (this.mandatory);
 }
 public String getMaxSize(String dType) {
   String getSize = getSize;
   Integer intObj = null;
   dType = com.mycompany.domainvalidations. + dType;
   try {   clz = Class.forName(dType);
 Method method = clz.getMethod(getSize, null);  intObj = 
(Integer) method.invoke(null, null);
   } catch (Exception e) {
 e.printStackTrace();
   }
   return intObj.toString();
 }

 public String getFunctionCall() {
   return (this.functionCall);
 }
 public void setFunctionCall(String functionCall) {
   this.functionCall = functionCall;
 }
 public String resolveFunctionCall(String dType) {
   String fCall = ;
   int decPlaces = 0;  if (dType.equals(D_Price)) {   
decPlaces =
FormatConverter.FormatConverterMngr.getDecimalPlaces(1);
 fCall = this.value=
validateNumberForStrutsElement(this.value,','+thousandSeparator+'+decimalSeparator+', 

+ decPlaces + ,true +
 );
   }
   if (dType.equals(D_Forex)) {   decPlaces =
FormatConverter.FormatConverterMngr.getDecimalPlaces(2);
 fCall = this.value=
validateNumberForStrutsElement(this.value,','+thousandSeparator+'+decimalSeparator+', 

+ decPlaces + ,true +
 );
   }
   if (dType.equals(D_Quantity)) {   decPlaces =
FormatConverter.FormatConverterMngr.getDecimalPlaces(3);
 fCall = this.value=

Re: JK2 uri context question

2004-05-18 Thread Jack Lauman
Here's a more detailed description of the problem:
Apache 2.0.49 site 'www.domain.com' has a subdirectory called 'members'. 
 Users entering this directory are authenticated using .htaccess.  The 
index.html file in the 'members' directory has a hyperlink to a webapp 
called 'minutes' (http://www.domain.com/members/minutes/index.jsp).

On the Tomcat 5.0.24 side there is a webapp called minutes.war in the 
'webapp' deployment directory.

How can I map the 'minutes' app so that apache thinks is under the 
apache 'members' directory?

This works...  http://www.domain.com/members/index.jsp
This doesn't...  http://www.domain.com/members/minutes/index.jsp
In mod_jk and webapp it was possible to do this.  How can it be done 
using mod_jk2?

Thanks,
Jack
Nikola Milutinovic wrote:
Jack Lauman wrote:
I have a site where users enter the members area through a URL like this:
http://www.domain.com/members/minutes.jsp
My workers2.properties file
[uri:/minutes/*]
group:ajp13:localhost:8009
How do you remap the members directory so that jk2 know that it point 
to a tomcat app called minutes in the root context?

With the above, you map one set of URI to a worker, which (in case of 
ajp13) will deliver it to some Tomcat instance. Tomcat instance will 
parse the URI (yes, it does that) and decide which context (web 
application) it belongs to.

In short, both your Apache and Tomcat must have a matching definition of 
VHosts and paths. I believe there is also a path parameter in the 
[uri:...], which can map to a new path, so paths can differ. I've 
never done it myself - I had matching paths.

Nix.
-
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]


JK2 uri context question

2004-05-17 Thread Jack Lauman
I have a site where users enter the members area through a URL like this:
http://www.domain.com/members/minutes.jsp
My workers2.properties file
[uri:/minutes/*]
group:ajp13:localhost:8009
How do you remap the members directory so that jk2 know that it point to 
a tomcat app called minutes in the root context?

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


JK2 equivalent of JkMount

2004-05-17 Thread Jack Lauman
Is there a JK2 equivalent of JkMount?  If there is what is the JK2 
syntax for:

JkMount /members/minutes/*.jsp worker1
Are there any docs or examples for this?
Jack
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: where to define path to workers2.properties

2004-05-06 Thread Jack Lauman
This worked for me just subsitiute your path to workers2.properties

JkSet config.file /usr/local/apache2/conf/workers2.properties

Jack

Stefan Burkard wrote:
hi tomcat-users

i have installed and running apache/tomcat/jk2 on a linux-box. in the 
meantime i updated apache and because i use a directory with 
version-number, the path to the apache-rootdir changed.

now my mod_jk2-module searches the workers2.properties configfile still 
in the old apache-directory. can i anywhere define the path to the 
workers2.properties file?

i found some examples for windows where the path is written to the 
registry, but no example for linux

thanks and greetings
stefan
-
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]


Syntax Question

2004-03-01 Thread Jack Lauman
I want to add a variable to the web.xml file and be able to call in
from within a servlet, taglib or bean.

In a JSP 2.0 page using JSTL 1.1 I can use:

%=application.getInitParameter(variable_name)%

Can this be done?  If so, what's the correct syntax to do it.

Thanks,

Jack


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



JSP Error

2004-02-28 Thread Jack Lauman
I'm trying to deploy a simple JSP(2.0) page with JSTL(1.1) core tags
using Tomcat 5.0.19.  The project was build using eclipse(2.1.2) and
builds and deploys without errors.

Any help resolving this problem would be appreciated.

type Exception report

message 

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception 

javax.servlet.ServletException: javax/servlet/jsp/tagext/TagExtraInfo
   
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:256)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

root cause 

java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagExtraInfo
java.lang.ClassLoader.defineClass0(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:537)
   
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
   
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1677)
   
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:900)
   
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1350)
   
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1230)
   
org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:453)
   
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:291)
   
org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:205)
   
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:458)
   
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:523)
   
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1577)
org.apache.jasper.compiler.Parser.parse(Parser.java:171)
   
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:258)
   
org.apache.jasper.compiler.ParserController.parse(ParserController.java:139)
   
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
   
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
   
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
   
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
   
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

note The full stack trace of the root cause is available in the Tomcat
logs.



Apache Tomcat/5.0.19


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



Re: Access static content ...

2003-11-07 Thread Jack Lauman
I'm using JBoss with Tomcat 4.1.27.  I manipulate the URL by adding
param-values that are parts of the actual URL to the web.xml file
I think this will work with a stand alone Tomcat.  It looks like
'commons-sandbox' project 'chains' is similar.

i.e.

web-app
  context-param
param-namebaseURL/param-name
param-valuewww.nwcascades.com/param-value
  /context-param
...

We include keywords, dropdown selects (as CDATA), almost anything
that is static from one page to the next.  Make maintenance a great
deal easier.

In the JSP pages we use things similar to the following to separate
the static content on apache and the dynamic content generated by
JBoss/Tomcat.

base href=http://%=application.getInitParameter(baseUrl)%/
title%=application.getInitParameter(titleText)%/title
...

We found that the time it takes to do this is well worth it if you
have a global change that affects a large number of pages.

Hope it helps,

Jack
Rodrigo Ruiz wrote:
 
 The problem is the /resources entry. If you map it to the default
 servlet, the directory name itself will not be part of the path, but a
 root for the actual one, so the default servlet will understand you
 want to get the path following resources, and it is . I guess the
 same will happen with the contents of the directory.
 
 It seems that the default servlet cannot be configured to serve files
 from an alternative directory.
 
 You could try one of the following:
   - Create your own servlet for resources requests. Perhaps you could
 subclass DefaultServlet, or use it in any other way.
   - Implement a Filter that redirects any request not to resources to
 your own servlet, and let the default configuration to work for the
 resources directory.
 
 Samuel Le Berrigaud wrote:
 
  Thanks for your help,
 
  I'll do it another way I think and I'll probably come back on that
  problem later on.
 
  SaM
 
  Tim Funk wrote:
 
  Then there is either
  - a bug in tomcat
  - a config error (most likely) but don't know what could be the culprit
 
  I never heard of this before. Seems quite odd.
 
  -Tim
 
  Samuel Le Berrigaud wrote:
 
  Yes
 
  Tim Funk wrote:
 
  [Need more coffee]
 
  Does that mean that http://myserver/context/resources is serving a
  dir listing of the contents from http://myserver/context ?
  (instead of /context/resources)
 
  -Tim
 
 
 
 
 
  -
  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]
 
 
 
 -
 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]



mod_jk problem

2003-10-05 Thread Jack Lauman
I'm trying to get apache 2.0.47, mod_jk-cvs to work with tc-4.1.27.

I can successfully load and execute the tc examples.

I have 3 webapps that are for a single url ie: www.java.com
They are all accessed from a subdirectory called members which
has a simple .htaccess .htpasswd scheme.

When I access the app using ie: www.java.com/members/app-1/index.jsp
I get the jsp file returned to the browseras text.  If I load it as:
localhost:8080/members/app-1/index.jsp I get the correct response.

Also the mod_jk log defined in mod_jk.conf indicates that tomcat
is attempting to map every single directory in apache.  Any help
would be appreciated.

Thanks,

Jack


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



Re: How To: JkSet, JkSet2 JkUriSet

2003-10-03 Thread Jack Lauman
I think this is part of the problem.  My server root is:
/usr/lib/apache2 with a sym link from /usr/lib/apache2/conf to
the actual config dir at /etc/httpd/conf.

Apache loads JK2 and server-info see's it, but no config options
are listed.  So I assume apache can't find workers2.properties.

Thanks,

Jack

Bill Barker wrote:
 
 Doing the easy part only (mind you, I haven't tested this)
 JkSet server.root /usr/local/apache
 
 Jack Lauman [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Are there ary docs for JkSet, JkSet2  JkUriSet?
 
  Also is ther a way to override {$server.root} so the mod_jk2 can
  find it's configuration file?  I can't get the shm file to initialize
  because it can't find it.
 
  After the shm file fails to initialize the log files indicate that
  it found the config file in /etc/httpd/conf/workers2.properties
 
  Any help would be appreciated.
 
  Jack Lauman
 
 -
 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: How To: JkSet, JkSet2 JkUriSet

2003-10-03 Thread Jack Lauman
New info:  If I add JkSet server.root /usr/lib/apache2 to httpd.conf
I get the following error:
[notice] mod-jk2: Unrecognized option server.root /usr/lib/apache2

Any ideas on how to resolve this?

Note: I built this from the cvs yesterday, I've successfully built
and run mod_jk and mod_webapp without any problems.  I believe
the problem with mod_jk2 is that it doesn't inform apache2 where
it's config file is.

Jack

Jack Lauman wrote:
 
 I think this is part of the problem.  My server root is:
 /usr/lib/apache2 with a sym link from /usr/lib/apache2/conf to
 the actual config dir at /etc/httpd/conf.
 
 Apache loads JK2 and server-info see's it, but no config options
 are listed.  So I assume apache can't find workers2.properties.
 
 Thanks,
 
 Jack
 
 Bill Barker wrote:
 
  Doing the easy part only (mind you, I haven't tested this)
  JkSet server.root /usr/local/apache
 
  Jack Lauman [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
   Are there ary docs for JkSet, JkSet2  JkUriSet?
  
   Also is ther a way to override {$server.root} so the mod_jk2 can
   find it's configuration file?  I can't get the shm file to initialize
   because it can't find it.
  
   After the shm file fails to initialize the log files indicate that
   it found the config file in /etc/httpd/conf/workers2.properties
  
   Any help would be appreciated.
  
   Jack Lauman
 
  -
  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]


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



mod_jk2 config question

2003-10-03 Thread Jack Lauman
I found that unless apache2 is installed in the default location
an the environment variable serverRoot has to be set to the actual
location of apache2.  (This should be included in the how-to as
jk2 won't work without it if the default location for serverRoot
is changed)

Having set serverRoot, the tomcat 4.1.27 logs indicate that the
workers2.properties files has been found and has initialized
correctly.  Apache's 'server-info' indicates that mod_jk2 is loaded
but no configuration variables have been set from the 
workers2.properties file.  Is there another env variable that needs
to be set?

Any help would be appreciated.

Jack Lauman


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



How To: JkSet, JkSet2 JkUriSet

2003-10-02 Thread Jack Lauman
Are there ary docs for JkSet, JkSet2  JkUriSet?

Also is ther a way to override {$server.root} so the mod_jk2 can
find it's configuration file?  I can't get the shm file to initialize
because it can't find it.

After the shm file fails to initialize the log files indicate that
it found the config file in /etc/httpd/conf/workers2.properties

Any help would be appreciated.

Jack Lauman


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



Errors with mod_jk v1.2.4

2003-06-10 Thread Jack Lauman
Im getting the following errors with mod_jk v1.2.4, apache v2.0.46,
JBoss v3.0.7, RedHat v9.0 with the latest patches and j2sdk1.4.1_03.

Contrary to the messages in /var/log/httpd/mod_jk.log , mod_jk is
actually working.

I would apprecate any help on resolving this.

Regards,

Jack Lauman

[Tue Jun 10 20:35:43 2003]  [jk_ajp_common.c (738)]: ERROR: can't
receive the response message from tomcat, network problems or tomcat is
down. err=-1
[Tue Jun 10 20:35:43 2003]  [jk_ajp_common.c (1137)]: Error reading
reply from tomcat. Tomcat is down or network problems.
[Tue Jun 10 20:35:43 2003]  [jk_ajp_common.c (1290)]: ERROR: Receiving
from tomcat failed, recoverable operation. err=0
[Tue Jun 10 20:35:43 2003]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=0
[Tue Jun 10 20:35:47 2003]  [jk_ajp_common.c (738)]: ERROR: can't
receive the response message from tomcat, network problems or tomcat is
down. err=-1
[Tue Jun 10 20:35:47 2003]  [jk_ajp_common.c (1137)]: Error reading
reply from tomcat. Tomcat is down or network problems.
[Tue Jun 10 20:35:47 2003]  [jk_ajp_common.c (1290)]: ERROR: Receiving
from tomcat failed, recoverable operation. err=0
[Tue Jun 10 20:35:47 2003]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=0
[Tue Jun 10 20:37:30 2003]  [jk_ajp_common.c (1011)]: Error sending
request body
[Tue Jun 10 20:37:30 2003]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=0
[Tue Jun 10 20:37:53 2003]  [jk_ajp_common.c (1011)]: Error sending
request body
[Tue Jun 10 20:37:53 2003]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=0
[Tue Jun 10 20:37:53 2003]  [jk_ajp_common.c (738)]: ERROR: can't
receive the response message from tomcat, network problems or tomcat is
down. err=-1
[Tue Jun 10 20:37:53 2003]  [jk_ajp_common.c (1137)]: Error reading
reply from tomcat. Tomcat is down or network problems.
[Tue Jun 10 20:37:53 2003]  [jk_ajp_common.c (1290)]: ERROR: Receiving
from tomcat failed, recoverable operation. err=0
[Tue Jun 10 20:37:53 2003]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=0
[Tue Jun 10 20:38:03 2003]  [jk_ajp_common.c (1011)]: Error sending
request body
[Tue Jun 10 20:38:03 2003]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=0
[Tue Jun 10 20:38:11 2003]  [jk_ajp_common.c (1011)]: Error sending
request body
[Tue Jun 10 20:38:11 2003]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=0
[Tue Jun 10 20:38:20 2003]  [jk_ajp_common.c (738)]: ERROR: can't
receive the response message from tomcat, network problems or tomcat is
down. err=-1
[Tue Jun 10 20:38:20 2003]  [jk_ajp_common.c (1137)]: Error reading
reply from tomcat. Tomcat is down or network problems.
[Tue Jun 10 20:38:20 2003]  [jk_ajp_common.c (1290)]: ERROR: Receiving
from tomcat failed, recoverable operation. err=0
[Tue Jun 10 20:38:20 2003]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=0
[Tue Jun 10 20:38:33 2003]  [jk_ajp_common.c (1052)]: ERROR sending data
to client. Connection aborted or network problems
[Tue Jun 10 20:38:33 2003]  [jk_ajp_common.c (1303)]: ERROR: Client
connection aborted or network problems
[Tue Jun 10 20:38:34 2003]  [jk_ajp_common.c (1011)]: Error sending
request body
[Tue Jun 10 20:38:34 2003]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=0
[Tue Jun 10 20:38:44 2003]  [jk_ajp_common.c (1052)]: ERROR sending data
to client. Connection aborted or network problems
[Tue Jun 10 20:38:44 2003]  [jk_ajp_common.c (1303)]: ERROR: Client
connection aborted or network problems
[Tue Jun 10 20:38:45 2003]  [jk_ajp_common.c (1011)]: Error sending
request body
[Tue Jun 10 20:38:45 2003]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=0
[Tue Jun 10 20:39:24 2003]  [jk_ajp_common.c (1011)]: Error sending
request body
[Tue Jun 10 20:39:24 2003]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=0
[Tue Jun 10 20:40:03 2003]  [jk_ajp_common.c (1011)]: Error sending
request body
[Tue Jun 10 20:40:03 2003]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=0
[Tue Jun 10 20:40:30 2003]  [jk_ajp_common.c (1011)]: Error sending
request body
[Tue Jun 10 20:40:30 2003]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=0


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



Re: Java_Home

2003-03-13 Thread Jack Lauman
Sandra:

Get the J2SDK not the J2SDKEE

Set JAVA_HOME to C:\j2sdk1.4.1_02 or jdk1.3.1_07
Set J2EE_HOME to C:\j2sdkee1.3.1 (Not needed to run Tomcat)
Set CATALINA_HOME to C:\jakarta-tomcat-4.1.18 (or whatever you run)

Regards,

Jack Lauman
nwcascades.com
Birch Bay, WA

 Hunter, Sandra wrote:
 
 I am relatively new to Tomcat, having used it but not installed it,
 before.
 I have set my JAVA_HOME path to the folder named j2sdkee1.3.1
 However this is the result I get:
 
 C:\%CATALINA_HOME%\bin\startup
 The JAVA_HOME environment variable is not defined correctly
 This environment variable is needed to run this program
 The system cannot find the batch label specified - end
 Using CATALINA_BASE:   C:\jakarta-tomcat-4.0.6
 Using CATALINA_HOME:   C:\jakarta-tomcat-4.0.6
 Using CATALINA_TMPDIR: C:\jakarta-tomcat-4.0.6\temp
 Using JAVA_HOME:   C:\j2sdkee1.3.1
 The system cannot find the file -Djava.endorsed.dirs=.
 
 Any ideas are gratefully received.
 
 
 Sandra Patricia Hunter
 Systems Development and Web Design
 
 ---
 -
 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]



Tomcat 4.0 CVS won't start...

2002-04-07 Thread Jack Lauman

I get the following error in catalina.out with todays build from the
cvs.  Tomcat will not start as a result of this error.  Ran fine
yesterday.

Would appreciate any suggestions on how to resolve it.

Regards,

Jack

log4j:ERROR No appenders could be found for category
(org.apache.commons.digester.Digester).
log4j:ERROR Please initialize the log4j system properly.
Catalina.start: java.lang.NullPointerException
java.lang.NullPointerException
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2009)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2029)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1032)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:434)
at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:216)
at
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:594)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:817)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:748)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1454)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:529)
at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:585)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1148)
at org.apache.commons.digester.Digester.parse(Digester.java:1263)
at org.apache.catalina.startup.Catalina.start(Catalina.java:442)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:397)
at org.apache.catalina.startup.Catalina.process(Catalina.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




standardContext.namingInitFailed

2002-02-06 Thread Jack Lauman

I'm getting the following error in my log files after each webapp is
loaded:

StandardContext[/soap]: Cannot find message associated with key
standardContext.namingInitFailed

I assume this has something to do with JNDI... how can I fix it?

Jack

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Tomcat fails to start...

2001-12-25 Thread Jack Lauman

Tomcat 4.x (CVS 12-25-2001) fails to start.

I'm using the following configuration:

RedHat 7.0 (glibc 2.2.4-18.7.0.3)
jdk1.3.1_02
commons-utils-1.1
commons-collections-1.0
commons-digester-1.1.1
commons-dbcp-20011222
commons-modeler-20011222
commons-pool-20011222
crimson-1.1.3
xerces-1.4.4

I got the following error when executing $CATALINA_HOME/bin/startup.sh
and would appreciate any assistance in resolving it.

Thanks,

Jack

End event threw exception
java.lang.ClassNotFoundException:
org.apache.catalina.ServerSocketFactory
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:992)
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:155)
at org.apache.commons.digester.Digester.endElement(Digester.java:757)
at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1550)
at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1809)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at org.apache.commons.digester.Digester.parse(Digester.java:1170)
at org.apache.catalina.startup.Catalina.start(Catalina.java:444)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
at org.apache.catalina.startup.Catalina.process(Catalina.java:178)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:246)
Catalina.start: java.lang.ClassNotFoundException:
org.apache.catalina.ServerSocketFactory
java.lang.ClassNotFoundException:
org.apache.catalina.ServerSocketFactory
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:1763)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:1785)
at org.apache.commons.digester.Digester.endElement(Digester.java:760)
at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1550)
at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1809)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at org.apache.commons.digester.Digester.parse(Digester.java:1170)
at org.apache.catalina.startup.Catalina.start(Catalina.java:444)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
at org.apache.catalina.startup.Catalina.process(Catalina.java:178)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:246)

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Jikes Config and Tomcat 4.0

2001-12-10 Thread Jack Lauman

I asked the same question about 2 weeks ago and never got a response.
The docs in web.xml are pretty vague, maybe a commented out example
could be added the distributions web.xml to reduce the confusion.

Regards,

Jack

Jakob Lemler wrote:
 
 Hi all,
 
 tried to install Jikes 1.15 and Tomcat 4.0.1 with jdk 1.3.1_01.
 
 Problem: When Tomcat starts Jikes to compile a jsp, it did not find the
 java classes (java.lang, java.util ...).
 Instead it searches only some Tomcat directories.
 An external declared classpath variable did not help either.
 
 Here a quote of my web.xml file in $CATALINA_HOME$\conf:
 
   !-- If you wish to use Jikes to compile JSP pages:
 --
   !-- * Set the classpath initialization parameter appropriately
 --
   !--   for this web application.
 --
   !-- * Set the jspCompilerPlugin initialization parameter to
 --
   !--   org.apache.jasper.compiler.JikesJavaCompiler.
 --
 
   servlet
 servlet-namejsp/servlet-name
 servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
 init-param
   param-namelogVerbosityLevel/param-name
   param-valueINFORMATION/param-value
 /init-param
 init-param
   param-nameclasspath/param-name
   param-valuec:\jdk\jre\lib\rt.jar;./param-value
 /init-param
 init-param
   param-namejspCompilerPlugin/param-name
 
 param-valueorg.apache.jasper.compiler.JikesJavaCompiler/param-value
 /init-param
 load-on-startup3/load-on-startup
   /servlet
 
 What´s wrong? Hope this is not a faq... ;-)
 
 Bye and thanks in advance
 Jakob
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




WEB.XML Syntax for using Jikes in TC-4.1-DEV

2001-11-29 Thread Jack Lauman

What is the correct syntax for setting Jikes as the default JSP
compiler in Tomcat 4.1-DEV.  (I'm cvs sources).

I've tried adding the following initialization parameters, Tomcat
starts and loads without errors but it doesn't seen to be using Jikes.

servlet
   servlet-namejsp/servlet-name
   servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
   init-param
  param-namejspCompilerPlugin/param-name
 
param-valueorg.apache.jasper.compilerJikesJavaCompiler/param-value
   /init-param
   init-param
  param-namelogVerbosityLevel/param-name
  param-valueINFO/param-value
   /init-param
   load-on-startup3/load-on-startup
/servlet

I'd appreciate any help in resolving this problem.

Thanks,

Jack

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Urgent: Tomcat-3.2.3 doesn't compile pages jsp

2001-10-04 Thread Jack Lauman

Try the following, your're 'server-info' report does not indicate
that mod_jk is configured:

Make sure you have something like the following the Apache
httpd.conf file:

Include /usr/java/tomcat/conf/mod_jk-auto.conf
JkWorkersFile /usr/java/tomcat/conf/workers.properties
JkLogFile /usr/java/tomcat/logs/mod_jk.log
JkLogLevel error

This entry is within the 'virtual host' section for each URL
using Tomcat: (use ajp12 (default) or ajp13)

JkMount /*.jsp ajp13

Regards,

Jack


Mapoteca Rio wrote:
 
 Thanks, Sriram.
 I execute o apachectl status and verify that mod_jk
 has been loaded. Do you have another suggestion?
 
 att. mapoteca-rio
 
 --- Sriram Narayanan [EMAIL PROTECTED] wrote:
  Umm.. perhaps that's apache returning the contents
  of the page ?
 
  I guess Tomcat's responding on port 8080, and
  Apache's respoding on port 80, and somehow Apache is
  not making use of Tomcat.
 
  Please have a look at the Apache console, and check
  whether the mod_jk has been loaded.
 
  Regards,
 
  Sriram
 
  10/4/01 8:03:58 PM, Mapoteca Rio
  [EMAIL PROTECTED] wrote:
 
  Hi,
  
  I use Apache 1.3.12, jdk 1.3.1 , Tomcat 3.2.3 and
  mod_jk. When a running
  /host/examples/jsp/numberguess.jsp in port 8080
  this aplication works and when I run in port 80, I
  see
  this page with the code. I think that tomcat
  doesn't
  compile this page. Can anyone help me?
  
  Thanks
  
  mapoteca-rio
  
  
  __
  Do You Yahoo!?
  NEW from Yahoo! GeoCities - quick and easy web site
  hosting, just $8.95/month.
  http://geocities.yahoo.com/ps/info1
  
 
 
 
 
 
 _
  Do You Yahoo!?
  Get your free @yahoo.com address at
  http://mail.yahoo.com
 
 
 __
 Do You Yahoo!?
 NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
 http://geocities.yahoo.com/ps/info1
 
   
 Server Version: Apache/1.3.12 (Unix) mod_perl/1.24 mod_jk
 Server Built: May 6 2001 09:33:57
 API Version: 19990320:7
 Run Mode: standalone
 User/Group: nobody(60001)/60001
 Hostname/port: xxx.xxx:80
 Daemons: start: 5 min idle: 5 max idle: 10 max: 150
 Max Requests: per child: 0 keep alive: on max per connection: 100
 Threads: per child: 0
 Excess requests: per child: 0
 Timeouts: connection: 300 keep-alive: 15
 Server Root: /var/apache
 Config File: /etc/apache/httpd.conf
 PID File: /var/run/httpd.pid
 Scoreboard File: /var/run/httpd.scoreboard
 
 Module Name: mod_perl.c
 Content handlers: perl-script , httpd/unix-directory
 Configuration Phase Participation: Child Init, Create Directory Config, Merge 
Directory Configs, Create Server Config, Merge Server Configs
 Request Phase Participation: Post-Read Request, Header Parse, Translate Path, Check 
Access, Verify User ID, Verify User Access, Check Type, Fixups, Logging
 Module Directives:
 Perl - Perl code
 /Perl - End Perl code
 =pod - Start of POD
 =back - End of =over
 =cut - End of POD
 __END__ - Stop reading config
 PerlFreshRestart - Tell mod_perl to reload modules and flush Apache::Registry cache 
on restart
 PerlTaintCheck - Turn on -T switch
 PerlWarn - Turn on -w switch
 PerlScript - this directive is deprecated, use `PerlRequire'
 PerlRequire - A Perl script name, pulled in via require
 PerlModule - List of Perl modules
 PerlSetVar - Perl config var and value
 PerlAddVar - Perl config var and value
 PerlSetEnv - Perl %ENV key and value
 PerlPassEnv - pass environment variables to %ENV
 PerlSendHeader - Tell mod_perl to parse and send HTTP headers
 PerlSetupEnv - Tell mod_perl to setup %ENV by default
 PerlHandler - the Perl handler routine name
 PerlTransHandler - the Perl Translation handler routine name
 PerlAuthenHandler - the Perl Authentication handler routine name
 PerlAuthzHandler - the Perl Authorization handler routine name
 PerlAccessHandler - the Perl Access handler routine name
 PerlTypeHandler - the Perl Type check handler routine name
 PerlFixupHandler - the Perl Fixup handler routine name
 PerlLogHandler - the Perl Log handler routine name
 PerlCleanupHandler - the Perl Cleanup handler routine name
 PerlInitHandler - the Perl Init handler routine name
 PerlHeaderParserHandler - the Perl Header Parser handler routine name
 PerlChildInitHandler - the Perl Child init handler routine name
 PerlChildExitHandler - the Perl Child exit handler routine name
 PerlPostReadRequestHandler - the Perl Post Read Request handler routine name
 PerlDispatchHandler - the Perl Dispatch handler routine name
 PerlRestartHandler - the Perl Restart handler routine name
 Current Configuration:
 
 Module Name: mod_setenvif.c
 Content handlers: none
 Configuration Phase Participation: Create Server Config, Merge Server Configs
 Request Phase Participation: Post-Read Request
 Module Directives:
 SetEnvIf - A header-name, regex and a list of variables.
 SetEnvIfNoCase - a 

Re: mod_webapp errors....

2001-08-31 Thread Jack Lauman

Myself.  No RPM's.  (Deleted the original install ones).
mod_jk from 3.2.3 and php 4.0.5 compile with apxs with no problems.

Jack

Pier Fumagalli wrote:
 
 Broken APXS... It's an issue I need to address... It seems it always arises
 from RedHat distributions... Did you compile Apache yourself or you're using
 a RPM?
 
 Pier
 
 Jack Lauman [EMAIL PROTECTED] wrote:
 
  Apache 1.3.20, php 4.05, mod_perl 1.26, etc are all on the system.
  They and other thing also compile and execute just fine.  I just
  don't have a clue whats causing this.
 
  Jack
 
  Roberto B. wrote:
 
  To compile webapp_module you must have in to your system APX ( Apache
  webserver development kit ), libtool v1.3.3 or newer and autoconf
 
  Roberto.
 
  - Original Message -
  From: Jack Lauman [EMAIL PROTECTED]
  To: Tomcat User List [EMAIL PROTECTED]
  Sent: Tuesday, August 28, 2001 2:16 AM
  Subject: mod_webapp errors
 
  I have been trying to compile mod_webapp from the cvs sources but
  keep running into the following error.  I know that others have
  reported the same error in the past week or so but I havn't seen
  any rolution to the problem.  Has anyone got this to compile?
 
  Compiling sources in /app/webapp-module-1.0-tc40b7/apache-1.3...
  make[1]: Entering directory `/app/webapp-module-1.0-tc40b7/apache-1.3'
  Linking Apache 1.3 WebApp Module
  /app/webapp-module-1.0-tc40b7/apr/libtool: mod_webapp.lo: command not
  found
  make[1]: *** [mod_webapp.so] Error 127
  make[1]: Leaving directory `/app/webapp-module-1.0-tc40b7/apache-1.3'
  make: *** [local-all] Error 2
 
  Configuration:
  RedHat 7.0 on a P3 w/1Gb RAM
  GCC: 2.96
  libtool: 1.3.5
  automake 1.4
  make: 3.79.1
  bison: 1.28
  JDK: 1.3.1 (Sun)
 
  I'd appreciate any help in resolving this.
 
  Thanks,
 
  Jack Lauman



Re: mod_webapp errors....

2001-08-30 Thread Jack Lauman

Nothing... but other modules including php build without any errors.
What should it return?

Jack

jean-frederic clere wrote:
 
 That is apxs problems: probably the apache does not support DSO.
 What does apxs -q LD_SHLIB returns?
 
 Roberto B. wrote:
 
  To compile webapp_module you must have in to your system APX ( Apache
  webserver development kit ), libtool v1.3.3 or newer and autoconf
 
  Roberto.
 
  - Original Message -
  From: Jack Lauman [EMAIL PROTECTED]
  To: Tomcat User List [EMAIL PROTECTED]
  Sent: Tuesday, August 28, 2001 2:16 AM
  Subject: mod_webapp errors
 
   I have been trying to compile mod_webapp from the cvs sources but
   keep running into the following error.  I know that others have
   reported the same error in the past week or so but I havn't seen
   any rolution to the problem.  Has anyone got this to compile?
  
   Compiling sources in /app/webapp-module-1.0-tc40b7/apache-1.3...
   make[1]: Entering directory `/app/webapp-module-1.0-tc40b7/apache-1.3'
   Linking Apache 1.3 WebApp Module
   /app/webapp-module-1.0-tc40b7/apr/libtool: mod_webapp.lo: command not
   found
   make[1]: *** [mod_webapp.so] Error 127
   make[1]: Leaving directory `/app/webapp-module-1.0-tc40b7/apache-1.3'
   make: *** [local-all] Error 2
  
   Configuration:
   RedHat 7.0 on a P3 w/1Gb RAM
   GCC: 2.96
   libtool: 1.3.5
   automake 1.4
   make: 3.79.1
   bison: 1.28
   JDK: 1.3.1 (Sun)
  
   I'd appreciate any help in resolving this.
  
   Thanks,
  
   Jack Lauman



Re: mod_webapp errors....

2001-08-28 Thread Jack Lauman

Apache 1.3.20, php 4.05, mod_perl 1.26, etc are all on the system.
They and other thing also compile and execute just fine.  I just
don't have a clue whats causing this.

Jack

Roberto B. wrote:
 
 To compile webapp_module you must have in to your system APX ( Apache
 webserver development kit ), libtool v1.3.3 or newer and autoconf
 
 Roberto.
 
 - Original Message -
 From: Jack Lauman [EMAIL PROTECTED]
 To: Tomcat User List [EMAIL PROTECTED]
 Sent: Tuesday, August 28, 2001 2:16 AM
 Subject: mod_webapp errors
 
  I have been trying to compile mod_webapp from the cvs sources but
  keep running into the following error.  I know that others have
  reported the same error in the past week or so but I havn't seen
  any rolution to the problem.  Has anyone got this to compile?
 
  Compiling sources in /app/webapp-module-1.0-tc40b7/apache-1.3...
  make[1]: Entering directory `/app/webapp-module-1.0-tc40b7/apache-1.3'
  Linking Apache 1.3 WebApp Module
  /app/webapp-module-1.0-tc40b7/apr/libtool: mod_webapp.lo: command not
  found
  make[1]: *** [mod_webapp.so] Error 127
  make[1]: Leaving directory `/app/webapp-module-1.0-tc40b7/apache-1.3'
  make: *** [local-all] Error 2
 
  Configuration:
  RedHat 7.0 on a P3 w/1Gb RAM
  GCC: 2.96
  libtool: 1.3.5
  automake 1.4
  make: 3.79.1
  bison: 1.28
  JDK: 1.3.1 (Sun)
 
  I'd appreciate any help in resolving this.
 
  Thanks,
 
  Jack Lauman



mod_webapp errors....

2001-08-27 Thread Jack Lauman

I have been trying to compile mod_webapp from the cvs sources but
keep running into the following error.  I know that others have 
reported the same error in the past week or so but I havn't seen
any rolution to the problem.  Has anyone got this to compile?

Compiling sources in /app/webapp-module-1.0-tc40b7/apache-1.3...
make[1]: Entering directory `/app/webapp-module-1.0-tc40b7/apache-1.3'
Linking Apache 1.3 WebApp Module
/app/webapp-module-1.0-tc40b7/apr/libtool: mod_webapp.lo: command not
found
make[1]: *** [mod_webapp.so] Error 127
make[1]: Leaving directory `/app/webapp-module-1.0-tc40b7/apache-1.3'
make: *** [local-all] Error 2

Configuration:
RedHat 7.0 on a P3 w/1Gb RAM
GCC: 2.96
libtool: 1.3.5
automake 1.4
make: 3.79.1
bison: 1.28
JDK: 1.3.1 (Sun)

I'd appreciate any help in resolving this.

Thanks,

Jack Lauman



[Fwd: Re: VOTE: HTML in Messages and politeness]

2001-07-29 Thread Jack Lauman

[X] +1 - Plain Text only. Strip HTML on the mailing list.

I agree strip out the HTML.

 Original Message 
Subject: Re: VOTE: HTML in Messages and politeness

On 29 Jul 2001 15:42:01 +0100, Pier P. Fumagalli wrote:

  One thing I can ask to you guys is, do you want me to strip HTML out of 
 your
  messages and reject emails only with HTML content type? Plenary vote open
  until 11:59 PM GMT of Monday 07/30/2001.
 

[X] +1 - Plain Text only. Strip HTML on the mailing list.



Re: PoolMan woes

2001-07-03 Thread Jack Lauman

Matt:

I ran into the same problem several days ago.  If I used the
poolman.xml.example as poolman.xml... tomcat just plain died without
warning.  No errors, nothing.

When I tried using the poolman.xml.template as poolman.xml...
it worked flawlessly.

Hope it helps,

Jack Lauman

Matt Barre wrote:
 
 I am trying to get PoolMan and TomCat to play nicely together.
 I am developing on Win2k, Tomcat 3.2.
 
 My first attempt was to use version 2.0.4 of Poolman with Tomcat 3.2...upon access
 PoolMan.jsp, Tomcat stops running. No errors, no warnings, its terminal window just
 vanishes. I tried increasing the heap size, but that didn't seem to help.
 
 Next I tried installing PoolMan 1.4.1. This doesn't crash TomCat but mysteriously it 
can't
 find its poolman.props file. I've tried putting it in directories that I'm absolutely
 positive are in my ClassPath without luck.
 
 I've read the docs pretty extensively I think, but can't seem to come up with an 
answer.
 My overall goal is to simply add connection pooling to tomcat. If anyone can give me 
some
 pointers, thanks in advance.
 
 Matt



Re: openbsd and mod_jk.so build problem

2001-05-26 Thread Jack Lauman

I had the same problem with JDK1.3.1rc2... It's looking for jni.h and
jni_md.h.  I put them in /usr/include and the problem went away.

Hope it helps,

Jack

joan wrote:
 
 hey,
 I tried to build mod_jk.so on openbsd but I failed...
 My environment is as follows:
   * OpenBSD 2.8 Current/ i386
   * JDK 1.1.8 (built from ports)
   * Tomcat 3.2.1
 
 I used from
 /usr/local/jakarta/jakarta-tomcat-3.2.1-src/src/native/apache1.3
 
 root@localhost#/usr/sbin/apxs -c -I/usr/local/jdk1.1.8/include
 -I/usr/local/jdk1.1.8/include/freebsd -DFREEBSD -I/usr/lib/apache/include
 -I../jk mod_jk.c ../jk/*.c
 
 and the output was:
 cc -O2 -DDEV_RANDOM=/dev/arandom -DMOD_SSL=206106 -DEAPI -DUSE_EXPAT -I../li
 b/expat-lite -fPIC -DSHARED_MODULE -I/usr/lib/apache/include -I/usr/local/jd
 k1.1.8/include -I/usr/local/jdk1.1.8/include/freebsd -I/usr/lib/apache/inclu
 de -I../jk -DFREEBSD  -c mod_jk.c
 cc -O2 -DDEV_RANDOM=/dev/arandom -DMOD_SSL=206106 -DEAPI -DUSE_EXPAT -I../li
 b/expat-lite -fPIC -DSHARED_MODULE -I/usr/lib/apache/include -I/usr/local/jd
 k1.1.8/include -I/usr/local/jdk1.1.8/include/freebsd -I/usr/lib/apache/inclu
 de -I../jk -DFREEBSD  -c ../jk/jk_ajp12_worker.c
 cc -O2 -DDEV_RANDOM=/dev/arandom -DMOD_SSL=206106 -DEAPI -DUSE_EXPAT -I../li
 b/expat-lite -fPIC -DSHARED_MODULE -I/usr/lib/apache/include -I/usr/local/jd
 k1.1.8/include -I/usr/local/jdk1.1.8/include/freebsd -I/usr/lib/apache/inclu
 de -I../jk -DFREEBSD  -c ../jk/jk_ajp13.c
 cc -O2 -DDEV_RANDOM=/dev/arandom -DMOD_SSL=206106 -DEAPI -DUSE_EXPAT -I../li
 b/expat-lite -fPIC -DSHARED_MODULE -I/usr/lib/apache/include -I/usr/local/jd
 k1.1.8/include -I/usr/local/jdk1.1.8/include/freebsd -I/usr/lib/apache/inclu
 de -I../jk -DFREEBSD  -c ../jk/jk_ajp13_worker.c
 cc -O2 -DDEV_RANDOM=/dev/arandom -DMOD_SSL=206106 -DEAPI -DUSE_EXPAT -I../li
 b/expat-lite -fPIC -DSHARED_MODULE -I/usr/lib/apache/include -I/usr/local/jd
 k1.1.8/include -I/usr/local/jdk1.1.8/include/freebsd -I/usr/lib/apache/inclu
 de -I../jk -DFREEBSD  -c ../jk/jk_connect.c
 cc -O2 -DDEV_RANDOM=/dev/arandom -DMOD_SSL=206106 -DEAPI -DUSE_EXPAT -I../li
 b/expat-lite -fPIC -DSHARED_MODULE -I/usr/lib/apache/include -I/usr/local/jd
 k1.1.8/include -I/usr/local/jdk1.1.8/include/freebsd -I/usr/lib/apache/inclu
 de -I../jk -DFREEBSD  -c ../jk/jk_jni_worker.c
 ../jk/jk_jni_worker.c:764: warning:
 #warning ---
 ../jk/jk_jni_worker.c:765: warning: #warning NO JAVA 2 HEADERS! SUPPORT FOR
 JAVA 2 FEATURES DISABLED
 ../jk/jk_jni_worker.c:766: warning:
 #warning ---
 ../jk/jk_jni_worker.c: In function `load_jvm_dll':
 ../jk/jk_jni_worker.c:724: `RTLD_NOW' undeclared (first use in this
 function)
 ../jk/jk_jni_worker.c:724: (Each undeclared identifier is reported only once
 ../jk/jk_jni_worker.c:724: for each function it appears in.)
 ../jk/jk_jni_worker.c:724: `RTLD_GLOBAL' undeclared (first use in this
 function)
 apxs:Break: Command failed with rc=65536
 root@localhost#
 
 I searched all the mailing list but I did not found the solution...
 Tue, 06 Feb 2001,Tobias Oberstein wrote a similar message but no good
 response was replied...
 
 On Freebsd 4.3 Released I've successfully built a working mod_jk.so.
 The shell script with tomcat-3.2.1 is buggy on freebsd but works well on
 linux.
 So I used the apxs command that fails for openbsd and that is described at
 the beginning of the message
 
 So, is there anyone who succesfully built mod_jk.so on openbsd?
 Please help me...
 
 Thanks



Re: Cleaned virus file \' + userName + \');/EM/FONT/DIV DIVFONT face=Arial size=2That resultset would contain the first record.nbsp; But I can't seem to grab the data. Below is a sample of my code that I think pertains to my problem.nb

2001-05-15 Thread Jack Lauman

To all:

You have my appologies... the damn thing was being configured when 
it received some questionable mail.  It's been fixed.

Regards,

Jack

Steve Downey wrote:
 
 Some HTML mail triggered the virus detection software on our mail system.
 
 The virus wall is set to return a message to the sender, telling them that a
 virus was detected. This is not entirely appropriate for a mailing list. I'm
 working with my security architect to fine tune this behaviour
 
 I haven't analyzed this particular incident, yet. Last week's was a rather
 nasty Outlook remailer.
 
  -Original Message-
  From: Moin Anjum H. [mailto:[EMAIL PROTECTED]]
  Sent: Monday, May 14, 2001 11:52 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Cleaned virus file \' + userName +
  \');/EM/FONT/DIV DIVFONT face=Arial size=2That resultset
  would contain the first record.nbsp; But I can't seem to
  grab the data.
  Below is a sample of my code that I think pertains to my problem.nb
 
 
  Hi,
 
  Can anybody explain me what is this InterScan E-Mail Virus is about.
 
  Best Regards
  Moin.
 
  NetFolio-AntiVirus-Wall wrote:
 
   InterScan E-Mail VirusWall has cleaned all the viruses contained
   in the following attached file.  The sender of the original file
   was [EMAIL PROTECTED].
  
   This electronic
  mail transmission
   may contain confidential information and is intended only
  for the person(s)
   named.  Any use, copying or disclosure by any other person
  is strictly
   prohibited.  If you have received this transmission in
  error, please notify
   the sender via e-mail. 
  
  
  
   Name: ' userName ')EMFONTDIV DIVFONT faceArial size2That res
  ' userName ')EMFONTDIV DIVFONT faceArial size2That res
   Type: unspecified type (application/octet-stream)
  
  Encoding: x-uuencode
 
 This electronic mail transmission
 may contain confidential information and is intended only for the person(s)
 named.  Any use, copying or disclosure by any other person is strictly
 prohibited.  If you have received this transmission in error, please notify
 the sender via e-mail. 



mod_webapp configuration

2001-05-13 Thread Jack Lauman

Does anyone know the proper syntax for configuring mod_webapp
in server.xml (tomcat 4.0dev5) and httpd.conf (apache 1.3.19)?

The notes in server.xml referr to 'WebAppMount' which apparently
doesn't exist.

server-info provides the following:

Module Name: mod_webapp.c 
Content handlers: webapp-handler 
Configuration Phase Participation: Child Init
Request Phase Participation: Translate Path
Module Directives: 
 WebAppInfo - 
 WebAppConnection - [optional parameter] 
 WebAppDeploy - 
Current Configuration: 
/etc/httpd/conf/httpd.conf 
 WebAppConnection warpConnection warp localhost:8008
 WebAppDeploy examples warpConnection
http://www3.nwcascades.com/examples/
 WebAppInfo examples

Apache will load without SSL but core dumps with it.  But I don't get
the
examples page.

I'd appreciate any suggestions.

Thanks, 

Jack



Re: Using SOAP on TOMCAT

2001-05-08 Thread Jack Lauman

It's looking for the IBM Bean Scripting Framework you can find
it here: http://oss.software.ibm.com/developerworks/projects/bsf

Jack

Tommaso Righetti wrote:
 
 HI, I am finally able to deploy services. However, when I'm running the
 sample code which comes with the packet form apache (the calculator) I'm
 getting the following error: C:\Working\xml-soap\samples\CALCUL~1java
 samples.calculator.Calculator http://localhost:8080/xml-soap/rpcrouter.jsp
 Ouch, the call failed: Fault Code = SOAP-ENV:Server.BadTargetObjectURI Fault
 String = Unable to load BSF: script services not available without BSF:
 Unable to load class com.ibm.bsf.BSFManager I believe that I have all the
 classes set properly but I was not able to locate the class that it is
 complaining about. Does anyone know where this class is supposed to be?
 Thanks,
 Tommaso!!!
 
 Tommaso Righetti
 
 HiT Internet Technologies SpA
 Engineering  Consulting
 Via Pace, 5 - Loc. Le Cocche
 37010 AFFI (VERONA)
 Tel.045/6209711
 Fax.045/6209712
 Email:  [EMAIL PROTECTED]
 Web:http://www.hit.com



Compiling mod_webapp.c

2001-03-28 Thread Jack Lauman

I downloaded the tomcat v4.0 from CVS, how do I get the Apache module
to compile under RedHat 7.0?

Jack