• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in placing JSPs in webapps folder

 
Balaji
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I prepared a project prototype is some jsps. These jsps contains bean tags also. These jsps I prepared using JBuilder and configured Tomcat 4.1 as the server. I need to show these jsps to client. I installed Tomcat 4.1 in client's system and placed the jsps folder in webapps folder of tomcat. After starting the tomcat server, when I browsed for the pages, I am getting page not found exception. Could anyone give me a solution for this problem?

Thanks in advance,
Balaji
 
Angel Dobbs-Sciortino
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try putting the JSPs in webapps/ROOT.
 
Carl Sampson
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JSP's need to go in a web application within the webapps folder. webapps/ROOT is where to put them if you want to access them via just hitting the tomcat server like this-

http://localhost:8080/mypage.jsp

Otherwise create a subdirectory under webapps that has your jsp's, taglibs, etc in the standard j2ee webapp structure or create that structure elsewhere, war it up, and put the war file in webapps.
 
Balaji
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sampson and Sciortino,

I created a seperate folder in webapps folder and placed all my jsps. I accessed the page with proper path such as
http://localhost:8080/intranet/LoginPage.jsp where intranet is the folder under webapps folder. But I am getting error as Page not found. This page contains <bean:include> tags, does this tag needs any specific tag library or will it work without tag libraries?

Thanks in advance,
Balaji.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome back to JavaRanch, Balaji!

We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.

We request that display names follow the pattern FIRST_NAME + SPACE + LAST_NAME.

Thanks Pardner! Hope to see you 'round the Ranch!
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Balaji:
Thanks Sampson and Sciortino,

I created a seperate folder in webapps folder and placed all my jsps. I accessed the page with proper path such as
http://localhost:8080/intranet/LoginPage.jsp where intranet is the folder under webapps folder. But I am getting error as Page not found. This page contains <bean:include> tags, does this tag needs any specific tag library or will it work without tag libraries?

Thanks in advance,
Balaji.


This tag is member tag of Struts,

So you can see more detail at :::

http://struts.apache.org/doc-1.0.2/struts-bean.html
 
Ramesh Shanmugam
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
place all the pages under the Examples folder like

tomcat/webapps/examples/abcd
Here abcd is your folder

And access the page as http://localhost:8080/examples/abcd/sample.jsp
and try this..
 
friso dejonge
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
at the same place where you put your .jsp file, add another file (html, xml, css) or whatever and try to access that. If that works, then you know at least the path is correct.
 
Carl Sampson
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like that problem is not related to using the Struts custom-tag. But for future reference you do need to add the directive to the page to reference the tag as well as a reference to it in web.xml.

As for this problem, try putting another file in there that is static (html, image, etc) and hitting that. Or try just browsing the directory.
 
lesley evensen
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps a simplistic question, but did you try compiling your jsp before deploying it? If you did then the issue of including the tag library would be surfaced. You can probably test the path as others suggested, putting just an .html page under /intranet and browsing to it.
You should also deploy the library/ies your page is dependent on (maybe you already know that!)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic