i put the source under %TOMCAT_HOME%\webapps\ngetest\
i call it localhost:8080/ngetest/LoginPage.jsp
but when i hit the submit button it goes to
localhost:8080/LoginPageResult.jsp

my questions are:
1. can i call it localhost:8080/LoginPage.jsp? how?
2. if can not, how to make the action goes to the correct app? without
changing the code in the jsp?

i havent tried the other zip files.

thanks

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Harley Rana
Sent: Sunday, June 03, 2001 7:56 AM
To: Orion-Interest
Subject: RE: how to run jsps and servlet on orion?



Hey Hasan, I've just put together a sample application that's has it all
with servlets, jsp, and ejb.

To start you want to make a root directory for your site; c:\site
Then you can put jsp's right in that root directory; c:\site\Login.jsp (will
be http://localhost/Login.jsp)
Now create a directory c:\site\Web-inf, that's where you put web.xml witch
defines your servlets and their URL mappings.
Servlets (and web beans) go in c:\site\Web-Inf\classes\
So if you had a servlet called your.package.LoginServlet it would be in
c:\site\Web-Inf\classes\your\package\LoginServlet
Now your ready to serve the files by changing this tag in application.xml
<web-module id="TestSite" path="../../site/" /> (it complains if you specify
a drive like c:)

That's all you need to do to serve web app, but if you want to package the
site into a .war file you change the path in the application to the .war
file.
To make c:\site into the .war you enter this; jar -cvf site.war *.jsp
WEB-INF/web.xml WEB-INF/classes/your/package/*.class

EJBs are a bit more complex to deploy.  To start put the 3 ejb files in the
same location as the servlets,
c:\site\Web-inf\classes\your\package\EJBHome,Remote etc...
Now make a directory c:\site\Web-inf\META-INF\, that's where you put
ejb-jar.xml and application.xml
Then when you have finished and compiled the ejb enter this command to make
package the bean; jar -cvf LoginBean.jar META-INF/ejb-jar.xml
your/package/*.class
Now you package the bean into an application; jar -cvf LoginApplication.ear
LoginBean.jar META-INF/application.xml
Then put the .ear file into the application directory in Orion, and add the
line <application name="LoginApplication"
path="../applications/LoginApplication.ear"/> which binds the application.

I have included the config files, the application files, and the source.  If
you get any problems deploy, replace the config files, and put the package
files in orion\applications.

Have fun with that!
Let me know how you go and if you have any questions.
Harley Rana.






Reply via email to