struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Mitchell" <jmitc...@telocity.com>
Subject RE: Login process
Date Mon, 01 Jul 2002 18:18:30 GMT
> -----Original Message-----
> From: Heligon Sandra [mailto:Sandra.Heligon@nextream.fr]
> Sent: Monday, July 01, 2002 1:09 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Login process
>
>
> I am new with Web and Struts and some items escape me.
> I don't understand how the user can reach a page without
> using action forwarding.

Anyone with a browser and knowledge of the files that exist in your web
application can send a  request to get that file from your server.

If the user doesn't know the name of the file, then they just leave the
filename blank and let the web server handle it from a default list
(specified in its configuration)

Now, what happens when the request comes in depends on your particular
server(s) setup.

That's why there's a difference when you go here:
http://nextream.fr

and when you go here:
http://www.nextream.fr

it takes you to here:
http://www.nextream.fr/nextream/

which serves the default document, (probably index.htm or default.htm)
which loads a flash file located here:
http://www.nextream.fr/nextream/documents/flash/home.swf

which looks like crap at full screen (in browser).

and here:
http://struts.nextream.fr
       ^^^^^^
that's what's known as "virtual host"
http://httpd.apache.org/docs/vhosts/



You see, the server interprets the url string and reacts appropriately.
This doesn't require an in-depth knowledge of http protocols, just knowing
the basics will get you by.



> I thought that all JSP pages had
> to be associated with an action.

Not true, you can create and entire site with just jsp (and I'm ashamed to
admit, I've done several myself)

> If the JSP page is not in the WEB-INF directory the user
> can reach it with a simple URL ?

Yes

> How the servlet engine(Tomcat) can execute it?

If outside of WEB-INF, then anyone can request the file (you can create a
hyperlink that they click on)
If under the WEB-INF, then you must forward the request to the file.

In fact, you can forward from jsp to jsp to jsp to action to jsp to ........


> Could you send me your example, please ?
>

Absolutely, I used to have a spot for this on my server, but I've made
changes to the server setup. (It's now using the JBoss 3.0.1RC1/Tomcat4.0.4
build)
I'll send you the zip file.

> thanks a lot in advance.
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message