You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jo...@fwd.at on 2003/04/01 00:14:48 UTC

JSPC Precompile using Ant - unique jsp name problem

hi there,

I've searched the whole forum but haven't found any definitive answer on 
this issue; since I'll try to repost with different language:

If somebody runs JSPC using ANT to precompile all the JSPs, the precompile 
fails if any of the JSPs in  different directories has the same name. 

/jsp/mydir1/index.jsp
/jsp/mydir2/index.jsp
==> JSPC fails with a quite confusing error message, which boils down to 
not having unique JSP names.

Uniquely naming all JSPs is probably not an option because index.jsp is 
quite convenient.
==> I've also scanned the Tomcat 4.1.24 release notes, but haven't found a 
fix there.

Does anybody know how to fix this JSP naming problem??

Thx alot
Johannes

Deployment trouble: Directory Listing For /

Posted by "Philip S. Wachtel" <sk...@cnsmail.com>.
Hi there,

I just joined the list, so if this question has been asked recently, please
forgive me.

I'm using Tomcat 4.1 on Redhat 7.3.  I know that the server is working as
the admin application seems to work, although it mangles the server.xml file
pretty good.

The trouble I'm having is that although I can see that my servlet is
deployed, I can't make the mapping work.  I know the servelt is deployed
because debugging information in the init() method is showing up in the
logs.

When I go to the url: http://myserver.com:8080/news?rdfFileName=healthcare

I just get: Directory Listing For / ... with no files in the list.

(Note: When I press enter, the browser replaces the url with almost the same
on, but with an extra slash:
http://nagios.cnsmail.com:8080/news/?rdfFileName=moreover_healthcare)

The log shows:
2003-04-01 11:18:09 StandardContext[/news]: Mapping contextPath='/news' with
requestURI='/news/' and relativeURI='/'
2003-04-01 11:18:09 StandardContext[/news]:   Trying exact match
2003-04-01 11:18:09 StandardContext[/news]:   Trying prefix match
2003-04-01 11:18:09 StandardContext[/news]:   Trying extension match
2003-04-01 11:18:09 StandardContext[/news]:   Trying default match
2003-04-01 11:18:09 StandardContext[/news]:  Mapped to servlet 'default'
with servlet path '/' and path info 'null' and update=true

I did not add any special config in the server.xml file -- only in the
web.xml file in the WEB-INF dir:
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
  <display-name>News Feed</display-name>
  <description>
    News Feed Application
  </description>

  <!-- Action Servlet Configuration -->
  <servlet>
    <servlet-name>news</servlet-name>
    <servlet-class>
      philservlet.PhilServlet
    </servlet-class>

    <load-on-startup>2</load-on-startup>
  </servlet>

  <!-- Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>news</servlet-name>
    <url-pattern>/news</url-pattern>
  </servlet-mapping>
</web-app>


Why, oh, why is this happening?
I appreciate your suggestions.

Regards,
Philip


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


thank you

Posted by Nelson Brito <nt...@fc.up.pt>.
Thank you very much!

nelson

On Tue, 1 Apr 2003, Michael D. Kirkpatrick wrote:

> Search for mod_jk

Nelson de Brito
Dept. de Quimica	  |
Fac. de Ciencias do Porto | tel. +351226082841
R. do Campo Alegre	  | fax. +351226082959
4169-007 Porto		  |


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Form Auth

Posted by "Michael D. Kirkpatrick" <wi...@psychodad.com>.
Search for mod_jk

It is rather easy to setup.  You run your apache web server on port 80
(default).
You run Tomcat on port 8080 (default).
You use mod_jk to define *.do and *.jsp to be served with Tomcat.
Note: Tomcat's home directory is different then Apache's.  You will have
to play with some settings or create aliases.

Nelson Brito wrote:

> Hi,
> I'm very new with tomcat and perhaps this question is a bit too
> dumb... but i'd like to know if i can still use apache as my web
> server, and load some sort of a tomcat module to serv my jsp??
> like i do with php...
> i can't find any doc about this on the manual :-(
>
> Thank you very much,
> nb
>
> Nelson de Brito
> Dept. de Quimica          |
> Fac. de Ciencias do Porto | tel. +351226082841
> R. do Campo Alegre        | fax. +351226082959
> 4169-007 Porto            |
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Form Auth

Posted by Nelson Brito <nt...@fc.up.pt>.
Hi,
I'm very new with tomcat and perhaps this question is a bit too
dumb... but i'd like to know if i can still use apache as my web
server, and load some sort of a tomcat module to serv my jsp??
like i do with php...
i can't find any doc about this on the manual :-(

Thank you very much,
nb

Nelson de Brito
Dept. de Quimica	  |
Fac. de Ciencias do Porto | tel. +351226082841
R. do Campo Alegre	  | fax. +351226082959
4169-007 Porto		  |


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Form Auth

Posted by "Michael D. Kirkpatrick" <wi...@psychodad.com>.
It returns "null".

I noticed that it places all the POST/GET information into a session to be
re-submitted to the actual page after successful login.  Know of a way that I can
access the session information to extract a specific string in it?



Henning Heil wrote:

> Hi Michael,
>
> ++++ Michael D. Kirkpatrick wrote on 01.04.2003 17:05 ++++
>
> >I am not quite sure if this question is suitable for this mailing list.  If
> >not, please forgive me.
> >
> >[snip]
> >
> >So here is my question.  How can I capture the original query string or make
> >the query string in web.xml dynamic?
> >
> in general I would not recommend to set the string in the web.xml.
> first part of your question: you can read out any parameter of a post or
> get string by request.getParameter(String parametername);
> second part: there are multiple ways to manipulate the request
> parameters: java -> request.setAttribute(String attributename, String
> value); or by hidden fields in html forms or with select-fields which
> are submitted . . .
>
> I would suggest:
>
> read out the site the user is coming from with
>
> String mysite = request.getParameter("site");
>
> (of course you have to add this to the string somewhere on the original
> page)
>
> write it to newly generated links:
>
> out.println("passwordsubmitter.jsp?site=" + mysite);
>
> or sth like this . . .
>
> >I am also looking for mailing lists for the following:
> >    Struts Questions
> >
> there's one on the apache.org site I think -> struts  . . .
>
> >    General Java Questions
> >    J2EE Questions
> >
> no mailing but extremely cool & helpful people there and also mailing
> mechanisms to keep track of your threads:
> http://forums.java.sun.com/
>
> >If anyone can point me in the right direction, it would be greatly
> >appreciated.
> >
> >Thanks in advance.
> >
> >
> Have fun,
>
> Henning
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Form Auth

Posted by Henning Heil <he...@dl.deutsche-leasing.de>.
Hi Michael,

++++ Michael D. Kirkpatrick wrote on 01.04.2003 17:05 ++++

>I am not quite sure if this question is suitable for this mailing list.  If
>not, please forgive me.
>
>[snip]
>
>So here is my question.  How can I capture the original query string or make
>the query string in web.xml dynamic?
>
in general I would not recommend to set the string in the web.xml.
first part of your question: you can read out any parameter of a post or 
get string by request.getParameter(String parametername);
second part: there are multiple ways to manipulate the request 
parameters: java -> request.setAttribute(String attributename, String 
value); or by hidden fields in html forms or with select-fields which 
are submitted . . .

I would suggest:

read out the site the user is coming from with

String mysite = request.getParameter("site");

(of course you have to add this to the string somewhere on the original 
page)

write it to newly generated links:

out.println("passwordsubmitter.jsp?site=" + mysite);

or sth like this . . .

>I am also looking for mailing lists for the following:
>    Struts Questions
>
there's one on the apache.org site I think -> struts  . . .

>    General Java Questions
>    J2EE Questions
>
no mailing but extremely cool & helpful people there and also mailing 
mechanisms to keep track of your threads:
http://forums.java.sun.com/

>If anyone can point me in the right direction, it would be greatly
>appreciated.
>
>Thanks in advance.
>  
>
Have fun,

Henning


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Form Auth

Posted by "Michael D. Kirkpatrick" <wi...@psychodad.com>.
Thanks.  I will look into it.

Paul Yunusov wrote:

> On Tuesday 01 April 2003 10:05 am, Michael D. Kirkpatrick wrote:
> > I am not quite sure if this question is suitable for this mailing list.  If
> > not, please forgive me.
> >
> > I am using the form authentication for adding security to one of my apps.
> > Since this app will be in use with several web sites, I am forced to pass
> > something like "?site=somesite" in my url.
> > The problem that I am running into is that on the actual login form, I do
> > not have access to the original query string.
> > The login page has 2 links: Create account and Recover Password.
> > I need that original query string so I can reference the proper web site's
> > information.
> > What I have access to is the query string of
> > "/some_app/login.jsp?name=value" for displaying the login screen.
> > That query is what I have placed in web.xml.
> >
> > So here is my question.  How can I capture the original query string or
> > make the query string in web.xml dynamic?
>
> I have a gut feeling you want to know how to keep a parameter across requests.
> There is an abstraction called "session" for storing data across multiple
> servlet requests from the same client. Check the
> javax.servlet.http.HttpSession interface and, in particular, its setAttribute
> and getAttribute methods.
>
> Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Form Auth

Posted by Paul Yunusov <py...@rogers.com>.
On Tuesday 01 April 2003 10:05 am, Michael D. Kirkpatrick wrote:
> I am not quite sure if this question is suitable for this mailing list.  If
> not, please forgive me.
>
> I am using the form authentication for adding security to one of my apps.
> Since this app will be in use with several web sites, I am forced to pass
> something like "?site=somesite" in my url.
> The problem that I am running into is that on the actual login form, I do
> not have access to the original query string.
> The login page has 2 links: Create account and Recover Password.
> I need that original query string so I can reference the proper web site's
> information.
> What I have access to is the query string of
> "/some_app/login.jsp?name=value" for displaying the login screen.
> That query is what I have placed in web.xml.
>
> So here is my question.  How can I capture the original query string or
> make the query string in web.xml dynamic?

I have a gut feeling you want to know how to keep a parameter across requests. 
There is an abstraction called "session" for storing data across multiple 
servlet requests from the same client. Check the 
javax.servlet.http.HttpSession interface and, in particular, its setAttribute 
and getAttribute methods.

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Form Auth

Posted by "Michael D. Kirkpatrick" <wi...@psychodad.com>.
I am not quite sure if this question is suitable for this mailing list.  If
not, please forgive me.

I am using the form authentication for adding security to one of my apps.
Since this app will be in use with several web sites, I am forced to pass
something like "?site=somesite" in my url.
The problem that I am running into is that on the actual login form, I do not
have access to the original query string.
The login page has 2 links: Create account and Recover Password.
I need that original query string so I can reference the proper web site's
information.
What I have access to is the query string of "/some_app/login.jsp?name=value"
for displaying the login screen.
That query is what I have placed in web.xml.

So here is my question.  How can I capture the original query string or make
the query string in web.xml dynamic?

I am also looking for mailing lists for the following:
    Struts Questions
    General Java Questions
    J2EE Questions

If anyone can point me in the right direction, it would be greatly
appreciated.

Thanks in advance.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org