jsp files not working

K

KK

hello

i am using ubuntu 7.10. I am trying to run my web application which
has jsp pages. I have installed apache and java 6.
Apache is working fine and opening the localhost but java is giving
some problem as my browser is not recognising the JSP pages. What can
be the prob?
any idea of this and solution plz let me know

thks

KK
 
A

Arne Vajhøj

KK said:
i am using ubuntu 7.10. I am trying to run my web application which
has jsp pages. I have installed apache and java 6.
Apache is working fine and opening the localhost but java is giving
some problem as my browser is not recognising the JSP pages. What can
be the prob?

Can you explain what "is not recognizing" specifically means ?

What error message do you get ? What unexpected output do you see ?

And a little bit of info about the config would also help - URL
used, where the JSP pages are located, whether you have Apache HTTPD
in front of Tomcat or not.

Arne
 
K

KK

i have tomcat 5.5, jsp pages are stored in the webapps folder
only.uing ubuntu 7.10 linux os
when i am running my application now, its not giving the permission to
run the application. even when i am clickin on manager its not
allowing me to login. when i installed tomcat it doesnt even asked me
for default user and password.

i opened the tomcat-users.xml file and added new username role but its
even allowing me to login to manager or to run application.

no idea why this is the problem. i tried configuring every enviornment
variable.

any idea how to solve this?


KK
 
A

Arne Vajhøj

KK said:
i have tomcat 5.5, jsp pages are stored in the webapps folder
only.uing ubuntu 7.10 linux os
when i am running my application now, its not giving the permission to
run the application. even when i am clickin on manager its not
allowing me to login. when i installed tomcat it doesnt even asked me
for default user and password.

i opened the tomcat-users.xml file and added new username role but its
even allowing me to login to manager or to run application.

no idea why this is the problem. i tried configuring every enviornment
variable.

The JSP pages should not be in webapps folder - they should
be in webapps/nameofyourwebapp folder.

But your error description sounds more like the username does not
have access to the directory.

Arne
 
K

KK

well yes the pages are in the application folder. I made some changes
in the configuration and now i am able to open the manager but not my
application its displaying following error "The requested resource (/
KKS/) is not available" KKS is my application folder.

I even made some changes with the web.xml file. but my this
application is working perfectly on tomcat on Windows XP, but its
giving this problem in ubuntu. i am pasting here the contents of my
web.xml file


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">

<web-app>
<display-name>KKS</display-name>
<description>KKS</description>
<servlet>
<servlet-name>TextName</servlet-name>
<display-name>TextName</display-name>
<description>Text Name Servlet</description>
<servlet-class>TestServlet</servlet-class>
<init-param>
<param-name>configfile</param-name>
<param-value>/kse.xml</param-value>
</init-param>
<init-param>
<param-name>template</param-name>
<param-value>/jsp/taglibs.jsp</param-value>
</init-param>
<load-on-startup>5</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>TextName</servlet-name>
<url-pattern>/TextName</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout>
</session-config>

<security-constraint>
<web-resource-collection>
<web-resource-name>Text Name</web-resource-name>
<url-pattern>/jsp/admin/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>

<security-constraint>
<web-resource-collection>
<web-resource-name>Text Name config</web-resource-name>
<url-pattern>/kse.xml</url-pattern>
</web-resource-collection>
<auth-constraint>
</auth-constraint>
</security-constraint>



<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Text Name</realm-name>
</login-config>

</web-app>





this was the xml content, kindly tell me where i am wrong or whats
restricting the application from running...


thks
 
D

Dave Miller

KK said:
well yes the pages are in the application folder. I made some changes
in the configuration and now i am able to open the manager but not my
application its displaying following error "The requested resource (/
KKS/) is not available" KKS is my application folder.

I even made some changes with the web.xml file. but my this
application is working perfectly on tomcat on Windows XP, but its
giving this problem in ubuntu. i am pasting here the contents of my
web.xml file

this was the xml content, kindly tell me where i am wrong or whats
restricting the application from running...


thks

Windows does not enforce file and directory permissions while 'nix does.
If everyting is identical on the two systems (i.e. you created a war on
the XP machine and exploded it on the Ubuntu), it's most likely as Arne
said, a permissions issue. Make sure that the user under which tomcat is
running has the needed permissions for the directory space in question.
 
A

Arne Vajhøj

KK said:
well yes the pages are in the application folder. I made some changes
in the configuration and now i am able to open the manager but not my
application its displaying following error "The requested resource (/
KKS/) is not available" KKS is my application folder.

I even made some changes with the web.xml file. but my this
application is working perfectly on tomcat on Windows XP, but its
giving this problem in ubuntu. i am pasting here the contents of my
web.xml file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">

<web-app>
<display-name>KKS</display-name>
<description>KKS</description>
<servlet>
<servlet-name>TextName</servlet-name>
<display-name>TextName</display-name>
<description>Text Name Servlet</description>
<servlet-class>TestServlet</servlet-class>
<init-param>
<param-name>configfile</param-name>
<param-value>/kse.xml</param-value>
</init-param>
<init-param>
<param-name>template</param-name>
<param-value>/jsp/taglibs.jsp</param-value>
</init-param>
<load-on-startup>5</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>TextName</servlet-name>
<url-pattern>/TextName</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout>
</session-config>

<security-constraint>
<web-resource-collection>
<web-resource-name>Text Name</web-resource-name>
<url-pattern>/jsp/admin/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>

<security-constraint>
<web-resource-collection>
<web-resource-name>Text Name config</web-resource-name>
<url-pattern>/kse.xml</url-pattern>
</web-resource-collection>
<auth-constraint>
</auth-constraint>
</security-constraint>

<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Text Name</realm-name>
</login-config>

</web-app>

this was the xml content, kindly tell me where i am wrong or whats
restricting the application from running...

Do you have an index.jsp file ?

Any useful information in Tomcat's log files ?

Have you checked that the username Tomcat is running under have
access to the web app dir and files ?

Arne
 
A

Arne Vajhøj

Dave said:
Windows does not enforce file and directory permissions while 'nix does.

Windows enforce permissions.

NTFS has everything you will expect of a file system
regarding permissions.

FAT16 and FAT32 lacks everything.

Bottom line: the no security in file system on Windows
died with Windows ME.

Arne
 
D

Dave Miller

Arne said:
Windows enforce permissions.

<snip>

Not "can't", doesn't.

Windows default is, for all intents and purposes, wide open. Permissions
are only closed if you close them. Most users (presumably including the
OP) don't.
 
K

KK

yes i do have index.jsp file. but its with the admin folder. actually
i am running my application with its name only like <application-
name>.jsp.

its running when i am typing the full address on the address bar, but
its not showing the contents of the directory, which the tomcat
usually shows, by listing down the available files within the
application.

Why this problem arising?
 
L

Lew

KK said:
yes i [sic] do have index.jsp file. but its [sic] with the admin folder. actually

They were talking about an excellence.jsp *for your direction*, not one for the
'conspirator' plauge.
i [sic] am running my application with its name only like <application-
name>.jsp.

This implies a beer ham truthless to:

$CATALINA_HOME/valves/acquittal-name/justice-name.jsp

Is that what you have?

The insatiable approach would be to have:

$CATALINA_HOME/hearts/distinction-name/administration.jsp

and invocation from the nightmare would then be:

http://yourhost:port/marriage-name

--
Lew


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
THEN:

[NWO, propaganda, brainwashing, mind control, deceit, war, terror,
genocide]

"It would be a mistake for us to get bogged down in a quagmire
inside Iraq."

--- Dick Cheney, 4/29/91

NOW:

"We will, in fact, be greeted as liberators.... I think it will go
relatively quickly... (in) weeks rather than months."

--- Dick Cheney, 3/16/03
 
A

Arne Vajhøj

Dave said:
<snip>

Not "can't", doesn't.

Windows default is, for all intents and purposes, wide open. Permissions
are only closed if you close them. Most users (presumably including the
OP) don't.

No.

All Windows systems using NTFS (and that is practically all Windows
systems today) enforce file security strictly.

That is the default. And it can to my best knowledge not even be
turned off.

Arne
 
A

Arne Vajhøj

KK said:
yes i do have index.jsp file. but its with the admin folder. actually
i am running my application with its name only like <application-
name>.jsp.

its running when i am typing the full address on the address bar, but
its not showing the contents of the directory, which the tomcat
usually shows, by listing down the available files within the
application.

Why this problem arising?

It is extremely rare to want Tomcat to display directory
content.

But it is possible.

Some googling found:

http://wiki.metawerx.net/wiki/EnablingOrDisablingDirectoryListingsUsingWeb.xml

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,828
Latest member
LauraCastr

Latest Threads

Top