Re: Problem in Tomcat 5.0.19 - Help Needed

2004-03-26 Thread Andres Ledesma
Hi Ramachandran,

You can check out your session, if it is new, include the page, otherwise do 
not do it.

Andrew

On Friday 26 March 2004 09:10, shanmugampl wrote:
> Hi Ramachandran,
>
>Are you using any custom tags(your own) in your menuinclude.jsp?
> Could you post your jsp page to get a clear insight about the issue.
>
> Thanks
> Shan
>
> Ramachandran wrote:
> >Hi All,
> >
> >I am using Tomcat 5.0.19. I am using file called menuinclude.jsp in all
> > the files using 
> >
> >When i run the application, the page visited first time is displaying the
> >menu correctly. But when we visited the same page again, the menu is
> >displayed twice nad visited again repeated thriceand so on
> >
> >Can any one tell me what is the problem.
> >
> >But it is not happening in Tomcat 3.2 at all
> >
> >Help Needed
> >
> >
> >-
> >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]

-- 
"No hay camino a la felicidad, la felicidad es el camino"


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



another servlet-mapping question,.............

2004-02-25 Thread Andres Ledesma
Hi everybody, 

I got several servlets mapped on the web.xml file that works pretty fine on my 
local tomcat installation, but when uploaded to the hosting server, I get a 
400 Server Statuts Error, it complains the path to the server does not exist 
!!!

My web.xml for the servlets is like this code ...


validate_user
com.bs.crm.validateUser 

..


validate_user
/validate_user  




Anybody can help  me ??

Thanx in advance !!

Andrew


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



Re: restricting access to jsp pages

2004-01-15 Thread Andres Ledesma

> I thought about that... and I would like to set up a role in
> tomcat-users to accomplish that.  However, I don't want the user to have
> to log in, rather I want to have my "guard" servlet authenticate the
> user and then forward the request with the role filled in
> programmatically.  However, I can't find in the docs how Tomcat knows
> whether the user has logged in yet, so I can't programmatically fill in
> the user name.
>
> Can someone direct me to the documentation (or source code) that looks
> for the user/role?
>

Well, the servlet can set attributes on the user's session and latter you can 
check whether this attributes have been set, you can even know whether it's a 
new session or an older one. 

There is a book 'moreservlets ans jsp' thar explains it very well, but is a 
sage of 'core servlets and jsp', that is entirely in 'www.moreservlets.com'.
Any way, I send you a snippet of code where I verify and set something in the 
session 

  /** Processes requests for both HTTP GET and POST 
methods.
 * @param request servlet request
 * @param response servlet response
 */
protected void processRequest(HttpServletRequest request, 
HttpServletResponse response)
throws ServletException, IOException {

String username = request.getParameter("username");
String password = request.getParameter("password");

HttpSession session = request.getSession(true);

try{
aUser usr = new aUser();

if( usr.IsAValidUser(username, password) ) 
{

UserSession user = (UserSession)session.getAttribute("user");
if ( user == null)
{
user = new UserSession();
user.setIsLogged(true);
user.setIsClient(true);

session.setAttribute("user", user);

}
else
{
user.setIsLogged(true);
user.setIsClient(true);
}


}

}
catch(Exception e)
{
;
}

..  ;

}

Hope this help 

Andrew


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



Re: restricting access to jsp pages

2004-01-14 Thread Andres Ledesma
Hi, 

I have not much experience with jsp, but I do not think this is the right way 
of doing that, your app have not to be inside WEB-INF. 

To prevent people accessing your pages, you check the user session, if for 
example, this pages can be view only by registered users only after a login, 
or something that is already there by I do not know very well, but I you can 
do a little research by yourself are the filters.

Hope this help. If you find something usefull, say something back ..

Good luck !

Andrew


On Thursday 15 January 2004 00:30, Ben Souther wrote:
> Hiding the JSPs is easy.
> Put them under the WEB-INF directory.
>
> On Wednesday 14 January 2004 06:43 pm, you wrote:
> > Greetings!
> >
> > I am using struts 1.1 with Tomcat 4.1.  I want to disallow a user to get
> > direct access to my static pages.  That is, if the user types a url that
> > ends in anything but ".do", I want them redirected to "/Welcome.do".  On
> > the other hand, I want to be able to access jsp pages and such via the
> > forwarding mechanism of struts.  When I try to simply redirect all
> > requests that end in ".jsp", I get a redirection limit reached error...
> > apparently the struts redirects to jsp pages are also being caught.
> >
> > Is there a simple solution to this?  It seems like there should be...
> >
> > Thank you,
> > Michael
> >
> >
> >
> > -
> > 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]

-- 
"No hay camino a la felicidad, la felicidad es el camino"


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



Re: Making index.jsp work as welcome page after upgrade

2004-01-07 Thread Andres Ledesma
ok...forget the second posting... I can't help you...


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



Re: Making index.jsp work as welcome page after upgrade

2004-01-07 Thread Andres Ledesma
sorry, I think I did not write what I meant to say.

the point is to set the default port to 80, instead of just comment the 
default setting of port 8080.

It should be something like ...





sorry again 


"No hay camino a la felicidad, la felicidad es el camino"


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



Re: Making index.jsp work as welcome page after upgrade

2004-01-07 Thread Andres Ledesma
I was following this thread, And it occurs to me that instead of comment the 
port:8080 line, write port:80

give it a try !!


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



Re: 404: File Not Found = Stupidity?

2003-12-23 Thread Andres Ledesma
Thanks a lot, very usefull the link now is top of the Bookmarks list..:-)
At the end I had the same problem, bad web.xml config


Andrew


On Wednesday 24 December 2003 03:19, Ben Souther wrote:
> > I'm pretty new on servlets stufff...can anybody send me an snippet of the
> > web.xml with   tags...
>
> You don't need a snippet. Tomcat shipps with a complete, working web.xml
> file. Look in the WEB-INF dir of the examples directory.
>
> > Got a question : on the class directory of the tomcat, there should be
> > placed the .class o the .java ?
>
> The .java files are just the source code.  Tomcat only looks at the
> compiled .class files.  This page will tell you all you need to know about
> the directory structure:
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html
>
> On Tuesday 23 December 2003 09:07 pm, you wrote:
> > Hi fellows
> >
> > I'm pretty new on servlets stufff...can anybody send me an snippet of the
> > web.xml with   tags...
> >
> > Got a question : on the class directory of the tomcat, there should be
> > placed the .class o the .java ?
> >
> > I'm having the same error, the .class is in the proper directory...
> >
> > Thanx in advance
> >
> > Andrew
> >
> >
> >
> >
> >
> > -
> > 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]

-- 
"No hay camino a la felicidad, la felicidad es el camino"


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



Re: 404: File Not Found = Stupidity?

2003-12-23 Thread Andres Ledesma
Hi fellows

I'm pretty new on servlets stufff...can anybody send me an snippet of the 
web.xml with   tags... 

Got a question : on the class directory of the tomcat, there should be placed 
the .class o the .java ? 

I'm having the same error, the .class is in the proper directory...

Thanx in advance

Andrew





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



newbie simple question... SOLVED !!!

2003-12-11 Thread Andres Ledesma
 Hi everybody again,

I went to the logs and found the cause of the error, so if anybody was going 
to anwser, I thanks, but it's not necessary already.


Andres Ledesma
Ibilnet Software Inc.
==
"Solo quienes se arriesgan a llegar lejos, saben cuan lejos se puede llegar"

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



newbie simple question...

2003-12-11 Thread Andres Ledesma
Hi everybody,

I'm pretty new to Tomcat and jsp development, I'm running tomcat 4.1 over red 
hat 8. 

I redirected default port to 80 on server.xml, and created an index.jsp page 
in wich I insert other jsp pages I created as templates usign :

 
 
... etc

In the beginning it worked fine, but at some point it stoped working, so after 
issuing an http://localhost, just a blank page appears, so obviously, that 
header.jsp and footer.sjp are not found anymore..

Testin I did insert a <%= new java.util.Date() %> just above the include 
directive, and it works fine, I get the Date Time anwser, but not the page I 
asked to be inserted for...

I been looking around, trying to find something in previous postings, but I 
couldn't get anything, so I write here hope anybody can help.

Thanks in advance

-- 
Andres Ledesma
Ibilnet Software Inc.
==
"Solo quienes se arriesgan a llegar lejos, saben cuan lejos se puede llegar"

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



Re: Apache Tomcat Security

2002-10-10 Thread Andres Ledesma

Include PostgreSQL  as you did with mySQL

Thanks...

Andrew



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