• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

The requested resource (/basic/date.jsp) is not available.

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI

I have installed ...
1) jdk 1.7.0_03
2)tomcat 6.0.35

I have tested tomcat by accesing http://localhost:8080.
Its working fine.
and also jdk is working fine.
I want to learn jsp.
I have create one folder in webapps named basic.
In basic i have created one more folder WEB-INF.
i have created one file called date.jsp which stored in basic folder
and one more file i have created called web.xml which stored in WEB-INF folder.

date.jsp



web.xml>>>>


and restart the tomcat server.
and fired the url

http://localhost:8080/basic/date.jsp


but getting error like ...........

==========================
HTTP Status 404 - /basic/date.jsp

type Status report

message /basic/date.jsp

description The requested resource (/basic/date.jsp) is not available.
Apache Tomcat/6.0.35
============================

Please help me to fixed this issue.
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

pravin gajbhiye wrote:I have create one folder in webaap named basic.


webaap? Is that real or a typo. If the latter, please take as much care in posting as you would incoming. Programming is all about accuracy and precision. Please be precise and correct when posting.

If you really did spell it "webaap", well, that's obviously wrong.

 
Bartender
Posts: 1051
5
Hibernate Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Remove the basic folder but maintain the structure under it from the webapp folder.
 
Bear Bibeault
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information. Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers.

I've gone ahead and added the code tags for you. See how much easier the code is to read?
 
pravin gajbhiye
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thax for quick reply.
But i did not get.
How it remove?
 
Bear Bibeault
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

James Boswell wrote:Remove the basic folder but maintain the structure under it from the webapp folder.


Not correct. webapps should contain the web root of the application; it does not serve as the web root itself.
 
pravin gajbhiye
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I have removed the basic folder and created file dateToday.jsp in webapps
and also created WEB-INF folder in webapps.In WEB-INF created file web.xml.
and restart the server.
But giving same error.
 
Bear Bibeault
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way, your web.xml is not correct for Tomcat 6 -- the Servlets 2.3 DTD is for older versions of Tomcat.
 
pravin gajbhiye
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you provide me the right web.xml.?
 
Bear Bibeault
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You'll need to learn how to look that sort of thing up for yourself. Here's a link to the FAQ: https://coderanch.com/how-to/java/ServletsWebXml
 
pravin gajbhiye
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying this url

http://localhost:8080/ROOT/index.jsp

But its also not working.
is there any Zar code for jsp that I have to download?
 
Bear Bibeault
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

pravin gajbhiye wrote:I am trying this url

http://localhost:8080/ROOT/index.jsp

But its also not working.


Trying random stuff isn't going to help. What happens when you just hit: http://localhost:8080/ ?

is there any Zar code for jsp that I have to download?


Zar code?
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would prefer to search for a simple servlet tutorial and understand the details. Then you can implement one on your own.
 
pravin gajbhiye
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when i hit http://localhost:8080/ , it shows Apache Software Foundation site.
 
Bear Bibeault
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, so that means that Tomcat is running. Have you checked the logs to see if there are errors that prevent your app from deploying?

After that, I'd get the Tomcat Manager set up so you can see what's running and what's not. See the Tomcat documentation for details.
 
pravin gajbhiye
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Now I am reffering HeadFirst for servlet and Jsp .
I have created here Beer-v1 project.
here i have created one servlet class, one module i.e. plain java class, and one html form.
I am taking the output or response on the screen through servlet by using PrintWriter.So its working properly.
But when i used jsp for response by calling the jsp file from servlet its giving error.I have compiled the servlet after calling jsp file.It gets compiled properly.
but thrwing the error >>>> The requested resource (/Beer-v1/result.jsp) is not available.
I have put jsp and html files in Beer-v1 folder.
web.xml > WEB-INF
.class files in classes/com.example.model and classes/com.example.model.

But the one thing is that I saved html file in Beer-v1 folder, i observed that the type of file is Html, but i saved jsp file then the type file is text.
 
pravin gajbhiye
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Above problem is resolved. but result.jsp which is calling from servlet using RequestDispatcher view=request.getRequestDispatcher("result.jsp");
to show output. but showing blank screen.
In adress bar it shows address http://localhost:8080/Beer-v1/BeerSelect.do instead of http://localhost:8080/Beer-v1/result.jsp
 
Bear Bibeault
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

pravin gajbhiye wrote:In adress bar it shows address http://localhost:8080/Beer-v1/BeerSelect.do instead of http://localhost:8080/Beer-v1/result.jsp


That is correct.
 
pravin gajbhiye
Greenhorn
Posts: 21
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Finally I got expected result. Thax to all.Its resolved now.
 
Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic